Octave 7 compatibility fix: add --link-stand-alone when getting LDFLAGS from mkoctfile

Since Octave 7, LDFLAGS as returned by mkoctfile include -shared, which is
undesirable for generic LDFLAGS. Pass the --link-stand-alone option to strip
this flag.
fix-tolerance-parameters
Sébastien Villemot 2022-04-15 14:32:54 +02:00
parent 10af04c6d8
commit 2f6120de0c
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
2 changed files with 5 additions and 1 deletions

View File

@ -34,7 +34,9 @@ AR=$($MKOCTFILE -p AR)
RANLIB=$($MKOCTFILE -p RANLIB)
CFLAGS=$($MKOCTFILE -p CFLAGS)
CXXFLAGS=$($MKOCTFILE -p CXXFLAGS)
LDFLAGS=$($MKOCTFILE -p LDFLAGS)
# The --link-stand-alone is needed since Octave 7 to avoid inserting -shared, which
# is undesirable for generic LDFLAGS.
LDFLAGS=$($MKOCTFILE --link-stand-alone -p LDFLAGS)
AC_CANONICAL_HOST

View File

@ -2,6 +2,8 @@
## Make sure to keep -static-libgcc, -static-libstdc++ and -static-libgfortran
## in DL_LDFLAGS when updating this file.
## Do not add -shared in LDFLAGS (i.e. this file should mimick “mkoctfile
## --link-stand-alone”, see the top of mex/build/configure.ac).
## Also keep BINDIR in DEFAULT_LDFLAGS (for UMFPACK).
# Exit immediately on any error.