mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-01-30 14:30:15 +08:00
Disable GCC LTO for verbose library extraction.
* libltdl/m4/libtool.m4 (_LT_SYS_HIDDEN_LIBDEPS): Temporarily append -fno-lto or -fno-whopr to CFLAGS if CC or CFLAGS (which are substituted with the per-language variables here) contain -flto or match -fwhopr*, respectively. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
This commit is contained in:
parent
bf1d52eb53
commit
ada610770b
@ -1,5 +1,11 @@
|
||||
2010-08-29 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
Disable GCC LTO for verbose library extraction.
|
||||
* libltdl/m4/libtool.m4 (_LT_SYS_HIDDEN_LIBDEPS): Temporarily
|
||||
append -fno-lto or -fno-whopr to CFLAGS if CC or CFLAGS (which
|
||||
are substituted with the per-language variables here) contain
|
||||
-flto or match -fwhopr*, respectively.
|
||||
|
||||
Save and restore CFLAGS properly inside libtool.m4 macros.
|
||||
* libltdl/m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): Use different
|
||||
temporary variables for saved and restored values of $LIBS,
|
||||
|
8
libltdl/m4/libtool.m4
vendored
8
libltdl/m4/libtool.m4
vendored
@ -6832,6 +6832,13 @@ public class foo {
|
||||
};
|
||||
_LT_EOF
|
||||
])
|
||||
|
||||
_lt_libdeps_save_CFLAGS=$CFLAGS
|
||||
case "$CC $CFLAGS " in #(
|
||||
*\ -flto\ *) CFLAGS="$CFLAGS -fno-lto" ;;
|
||||
*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
|
||||
esac
|
||||
|
||||
dnl Parse the compiler output and extract the necessary
|
||||
dnl objects, libraries and library flags.
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
@ -6925,6 +6932,7 @@ else
|
||||
fi
|
||||
|
||||
$RM -f confest.$objext
|
||||
CFLAGS=$_lt_libdeps_save_CFLAGS
|
||||
|
||||
# PORTME: override above test on systems where it is broken
|
||||
m4_if([$1], [CXX],
|
||||
|
Loading…
Reference in New Issue
Block a user