From 0a3f4220dfc331a25e8bd476e70c0261d77beaf0 Mon Sep 17 00:00:00 2001
From: Willi Mutschler <willi@mutschler.eu>
Date: Wed, 11 Oct 2023 00:29:55 +0200
Subject: [PATCH] macOS: use ld_classic as workaround for linker issue with
 XCode 15

XCode 15 (on Ventura and Sonoma) has a linker issue, see https://github.com/mesonbuild/meson/issues/12282, workaround is to use ld_classic
---
 scripts/homebrew-native.ini | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/scripts/homebrew-native.ini b/scripts/homebrew-native.ini
index e1622b7ffa..41efd280bf 100644
--- a/scripts/homebrew-native.ini
+++ b/scripts/homebrew-native.ini
@@ -1,4 +1,4 @@
-# Meson native file for compiling under Homebrew
+# Meson native file for compiling under Homebrew / x86_64
 
 [binaries]
 cpp = 'g++-13'
@@ -8,4 +8,8 @@ bison = '/usr/local/opt/bison/bin/bison'
 
 [built-in options]
 cpp_args = [ '-I/usr/local/include', '-B', '/usr/local/lib' ]
-#fortran_args = [ '-B', '/Users/sebastien/slicot' ]
+# XCode 15 (on Ventura and Sonoma) has a linker issue, see https://github.com/mesonbuild/meson/issues/12282, workaround is to use ld_classic
+cpp_link_args = [ '-Wl,-ld_classic' ]
+c_link_args = [ '-Wl,-ld_classic' ]
+fortran_link_args = [ '-Wl,-ld_classic' ]
+#fortran_args = [ '-B', '/Users/sebastien/slicot' ]
\ No newline at end of file
-- 
GitLab