From 9b946ca0af4d8858d97d85f4c73bef39f6aa3802 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Fri, 4 Sep 2020 10:44:47 +0200
Subject: [PATCH] macOS package: fix compilation of x13as against gfortran 10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Add -std=legacy to FFLAGS.

Do the same for the Windows package, even though we don’t yet use version 10 of
gfortran (but that will of course happen at some point).
---
 macOS/deps/Makefile   | 4 ++--
 windows/deps/Makefile | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/macOS/deps/Makefile b/macOS/deps/Makefile
index 35977b1b44..277186f0db 100644
--- a/macOS/deps/Makefile
+++ b/macOS/deps/Makefile
@@ -1,4 +1,4 @@
-# Copyright © 2019 Dynare Team
+# Copyright © 2019-2020 Dynare Team
 #
 # This file is part of Dynare.
 #
@@ -144,7 +144,7 @@ sources64/x13as-$(X13AS_VERSION): tarballs/x13assrc_V$(X13AS_VERSION).tar.gz
 
 lib64/x13as/x13as: sources64/x13as-$(X13AS_VERSION)
 	cd $< && sed -i '' 's/-static//g' makefile.gf
-	make -C $< -f makefile.gf FC=gfortran LINKER=ld FFLAGS="-O2" LDFLAGS="-macosx_version_min 10.14.0 -lSystem $(shell gfortran -print-file-name=libgfortran.a) $(shell gfortran -print-file-name=libquadmath.a) $(shell gfortran -print-libgcc-file-name) $(shell gfortran -print-file-name=libgcc_eh.a)" PROGRAM=x13as
+	make -C $< -f makefile.gf FC=gfortran LINKER=ld FFLAGS="-O2 -std=legacy" LDFLAGS="-macosx_version_min 10.14.0 -lSystem $(shell gfortran -print-file-name=libgfortran.a) $(shell gfortran -print-file-name=libquadmath.a) $(shell gfortran -print-libgcc-file-name) $(shell gfortran -print-file-name=libgcc_eh.a)" PROGRAM=x13as
 	strip $</x13as
 	mkdir -p $(dir $@)
 	cp $</x13as $@
diff --git a/windows/deps/Makefile b/windows/deps/Makefile
index 0e904fa860..2cbc39b763 100644
--- a/windows/deps/Makefile
+++ b/windows/deps/Makefile
@@ -207,7 +207,7 @@ sources64/x13as-$(X13AS_VERSION): tarballs/x13assrc_V$(X13AS_VERSION).tar.gz
 	tar xf $< --directory $@
 
 lib64/x13as/x13as.exe: sources64/x13as-$(X13AS_VERSION)
-	make -C $< -f makefile.gf FC=x86_64-w64-mingw32-gfortran LINKER=x86_64-w64-mingw32-gfortran FFLAGS="-O2" PROGRAM=x13as.exe
+	make -C $< -f makefile.gf FC=x86_64-w64-mingw32-gfortran LINKER=x86_64-w64-mingw32-gfortran FFLAGS="-O2 -std=legacy" PROGRAM=x13as.exe
 	x86_64-w64-mingw32-strip $</x13as.exe
 	mkdir -p $(dir $@)
 	cp $</x13as.exe $@
-- 
GitLab