[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wrong postdep_objects for CXX when using "-flto -fuse-linker-plugin"

From: Ralf Wildenhues
Subject: Re: wrong postdep_objects for CXX when using "-flto -fuse-linker-plugin"
Date: Mon, 20 Dec 2010 08:06:10 +0100
User-agent: Mutt/1.5.20 (2010-08-04)

* Ralf Wildenhues wrote on Sun, Dec 05, 2010 at 09:47:54PM CET:
> * Brice De Bruyne wrote on Sat, Dec 04, 2010 at 04:17:25PM CET:
> > It seems the postdep_objects are set wrong when CXXFLAGS contains
> > "-fuse-linker-plugin".
> > CFLAGS don't matter it seems...
> > 
> > Following patch to libltdl/m4/libtool.m4 and then running
> > ./bootstrap fixes this problem:
> CXXFLAGS shouldn't matter here, if it does then that is a bug.

I'm pushing the following in your name, and adding you to THANKS.
Please report back if this patch is not sufficient.


2010-12-20  Brice De Bruyne  <address@hidden>  (tiny change)

        Also turn off -fuse-linker-plugin for postdep_objects computation.
        * libltdl/m4/libtool.m4 (_LT_SYS_HIDDEN_LIBDEPS): Add
        -fno-use-linker-plugin to temporary compile flags if necessary,
        to fix C++ postdep_objects setting with -flto
        * NEWS, THANKS: Update.

diff --git a/NEWS b/NEWS
index 0aeca57..8d6965d 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,8 @@ New in 2.4.2 2010-12-??: git version 2.4.1a, Libtool team:
   - The bug that leaked developer tool paths into the release tarballs
     from ./bootstrap is fixed.
   - Improved support for the Cuda Compiler Driver (nvcc) on Darwin.
+  - For GCC LTO support, the -fuse-linker-plugin switch is now also removed
+    when computing compiler postdeps.
 * Important incompatible changes:
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index 5e716b2..21b12fd 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -6922,6 +6922,7 @@ _lt_libdeps_save_CFLAGS=$CFLAGS
 case "$CC $CFLAGS " in #(
 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
 dnl Parse the compiler output and extract the necessary

reply via email to

[Prev in Thread] Current Thread [Next in Thread]