]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Disable GCC LTO for verbose library extraction.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 29 Aug 2010 15:30:19 +0000 (17:30 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 29 Aug 2010 15:30:19 +0000 (17:30 +0200)
* 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>
ChangeLog
libltdl/m4/libtool.m4

index 6421defd90400653cb808a596b93fde8ab80130a..f7e2943534d0775e03d9480a016a82ae932bf664 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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,
index ffe20db3bf8af891a9502e534decf418291f79c6..0a5f5b1301bda2d7ca1a59919f7a0a22862a4e57 100644 (file)
@@ -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],