Unverified Commit 93a8e602 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Build system: various macOS cleanups

– remove clang support
– we no longer support 32-bit
– simplify Darwin specific hacks for Octave MEX files
parent f80c5130
...@@ -64,7 +64,7 @@ case ${MATLAB_ARCH} in ...@@ -64,7 +64,7 @@ case ${MATLAB_ARCH} in
OPENMP_LDFLAGS="-Wl,-Bstatic,--whole-archive -lgomp -Wl,-Bdynamic,--no-whole-archive" OPENMP_LDFLAGS="-Wl,-Bstatic,--whole-archive -lgomp -Wl,-Bdynamic,--no-whole-archive"
ax_mexopts_ok="yes" ax_mexopts_ok="yes"
;; ;;
maci | maci64) maci64)
MACOSX_DEPLOYMENT_TARGET='10.9' MACOSX_DEPLOYMENT_TARGET='10.9'
MATLAB_DEFS="$MATLAB_DEFS -DNDEBUG" MATLAB_DEFS="$MATLAB_DEFS -DNDEBUG"
MATLAB_CFLAGS="-fno-common -arch x86_64 -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -fexceptions" MATLAB_CFLAGS="-fno-common -arch x86_64 -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -fexceptions"
...@@ -72,7 +72,10 @@ case ${MATLAB_ARCH} in ...@@ -72,7 +72,10 @@ case ${MATLAB_ARCH} in
MATLAB_FCFLAGS="-g -O2 -fexceptions -fbackslash -arch x86_64" MATLAB_FCFLAGS="-g -O2 -fexceptions -fbackslash -arch x86_64"
MATLAB_LDFLAGS_NOMAP="-Wl,-twolevel_namespace -undefined error -arch x86_64 -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -bundle" MATLAB_LDFLAGS_NOMAP="-Wl,-twolevel_namespace -undefined error -arch x86_64 -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -bundle"
MATLAB_LDFLAGS="$MATLAB_LDFLAGS_NOMAP -Wl,-exported_symbols_list,\$(abs_top_srcdir)/mexFunction-MacOSX.map" MATLAB_LDFLAGS="$MATLAB_LDFLAGS_NOMAP -Wl,-exported_symbols_list,\$(abs_top_srcdir)/mexFunction-MacOSX.map"
MATLAB_LIBS="-L$MATLAB/bin/maci64 -lmx -lmex -lmat -lmwlapack -lmwblas" # 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++"
ax_mexopts_ok="yes" ax_mexopts_ok="yes"
;; ;;
*) *)
......
...@@ -59,19 +59,6 @@ AX_PROG_LN_S ...@@ -59,19 +59,6 @@ AX_PROG_LN_S
AC_PROG_MKDIR_P AC_PROG_MKDIR_P
AM_PROG_AR AM_PROG_AR
case ${host_os} in
*darwin*)
string=$($CXX --version)
if test "${string#*clang}" != "$string"; then
CXXFLAGS="$CXXFLAGS -stdlib=libc++"
MATLAB_LIBS="$MATLAB_LIBS -lc++"
MATLAB_LDFLAGS="$MATLAB_LDFLAGS -Wl,-syslibroot,$(xcrun -sdk macosx --show-sdk-path)"
else
MATLAB_LIBS="$MATLAB_LIBS -lstdc++"
fi
;;
esac
AX_CXX11_THREAD AX_CXX11_THREAD
# Check for dlopen(), needed by k_order_perturbation DLL # Check for dlopen(), needed by k_order_perturbation DLL
......
...@@ -39,8 +39,8 @@ LDFLAGS="$($MKOCTFILE -p LFLAGS) $($MKOCTFILE -p LDFLAGS)" ...@@ -39,8 +39,8 @@ LDFLAGS="$($MKOCTFILE -p LFLAGS) $($MKOCTFILE -p LDFLAGS)"
AC_CANONICAL_HOST AC_CANONICAL_HOST
case ${host_os} in case ${host_os} in
darwin*) darwin*)
CXXFLAGS="$($MKOCTFILE -p ALL_CXXFLAGS) -Wall -Wno-parentheses -Wold-style-cast -O2" dnl The mkoctfile from Octave.app 4.4.1 does not add optimization flags in CXXFLAGS
LDFLAGS+=" $($MKOCTFILE -p OCTAVE_LIBS)" CXXFLAGS+=" -O2"
;; ;;
esac esac
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment