From 482ec5fb67782d80083c208d75c18f3a5a2f78d2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Tue, 6 Sep 2022 11:53:40 +0200
Subject: [PATCH] macOS: bump to GCC 12 (for compilation and for use_dll)

---
 .gitlab-ci.yml   | 2 +-
 src/ModelTree.cc | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b6845541..4851b9d2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -83,7 +83,7 @@ build_macos_x86_64:
     - macOS
   script:
     - autoreconf -si
-    - './configure CC=gcc-11 CXX=g++-11 LDFLAGS="-static-libgcc -s" LEX=/usr/local/opt/flex/bin/flex YACC=/usr/local/opt/bison/bin/bison'
+    - './configure CC=gcc-12 CXX=g++-12 LDFLAGS="-static-libgcc -s" LEX=/usr/local/opt/flex/bin/flex YACC=/usr/local/opt/bison/bin/bison'
     - make -j$(nproc)
     - mkdir -p $CI_COMMIT_SHA/macos-x86_64
     - tar -caf $CI_COMMIT_SHA/macos-x86_64/dynare-preprocessor.tar.gz -C src dynare-preprocessor
diff --git a/src/ModelTree.cc b/src/ModelTree.cc
index b03581ca..d69b605b 100644
--- a/src/ModelTree.cc
+++ b/src/ModelTree.cc
@@ -1601,8 +1601,8 @@ ModelTree::matlab_arch(const string &mexext)
 string
 ModelTree::findGccOnMacos(const string &mexext)
 {
-  const string macos_gcc_version{"11"}; // doc/manual/source/installation-and-configuration.rst
-                                        // should be updated when this is changed
+  const string macos_gcc_version {"12"}; // doc/manual/source/installation-and-configuration.rst
+                                         // should be updated when this is changed
   char dynare_preprocessor_path[PATH_MAX];
   uint32_t size = PATH_MAX;
   string local_gcc_path;
-- 
GitLab