Build system: various macOS cleanups
– remove clang support – we no longer support 32-bit – simplify Darwin specific hacks for Octave MEX filestime-shift
parent
f80c513025
commit
93a8e60265
|
@ -64,7 +64,7 @@ case ${MATLAB_ARCH} in
|
|||
OPENMP_LDFLAGS="-Wl,-Bstatic,--whole-archive -lgomp -Wl,-Bdynamic,--no-whole-archive"
|
||||
ax_mexopts_ok="yes"
|
||||
;;
|
||||
maci | maci64)
|
||||
maci64)
|
||||
MACOSX_DEPLOYMENT_TARGET='10.9'
|
||||
MATLAB_DEFS="$MATLAB_DEFS -DNDEBUG"
|
||||
MATLAB_CFLAGS="-fno-common -arch x86_64 -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -fexceptions"
|
||||
|
@ -72,7 +72,10 @@ case ${MATLAB_ARCH} in
|
|||
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="$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"
|
||||
;;
|
||||
*)
|
||||
|
|
|
@ -59,19 +59,6 @@ AX_PROG_LN_S
|
|||
AC_PROG_MKDIR_P
|
||||
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
|
||||
|
||||
# Check for dlopen(), needed by k_order_perturbation DLL
|
||||
|
|
|
@ -39,8 +39,8 @@ LDFLAGS="$($MKOCTFILE -p LFLAGS) $($MKOCTFILE -p LDFLAGS)"
|
|||
AC_CANONICAL_HOST
|
||||
case ${host_os} in
|
||||
darwin*)
|
||||
CXXFLAGS="$($MKOCTFILE -p ALL_CXXFLAGS) -Wall -Wno-parentheses -Wold-style-cast -O2"
|
||||
LDFLAGS+=" $($MKOCTFILE -p OCTAVE_LIBS)"
|
||||
dnl The mkoctfile from Octave.app 4.4.1 does not add optimization flags in CXXFLAGS
|
||||
CXXFLAGS+=" -O2"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
Loading…
Reference in New Issue