From 3bdb07d11ee1b4b6b6ccb03bd481b5af6eaad0b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Mon, 24 May 2021 18:23:59 +0200
Subject: [PATCH] Build system: remove -lstdc++ when linking MEX for MATLAB
 under macOS

It is unneeded.
---
 m4/ax_mexopts.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/m4/ax_mexopts.m4 b/m4/ax_mexopts.m4
index 51fbfe816c..3ecd9268f2 100644
--- a/m4/ax_mexopts.m4
+++ b/m4/ax_mexopts.m4
@@ -66,7 +66,7 @@ case ${MATLAB_ARCH} in
     # This -L flag is put here, hence later on the linker command line, so as
     # to avoid linking against the HDF5 shipped by MATLAB (which would
     # otherwise override the HDF5 from Homebrew)
-    MATLAB_LIBS="-L$MATLAB/bin/maci64 -lmx -lmex -lmat -lmwlapack -lmwblas -lstdc++"
+    MATLAB_LIBS="-L$MATLAB/bin/maci64 -lmx -lmex -lmat -lmwlapack -lmwblas"
     ax_mexopts_ok="yes"
     ;;
   *)
-- 
GitLab