[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: Brice De Bruyne
Subject: Re: wrong postdep_objects for CXX when using "-flto -fuse-linker-plugin"
Date: Sat, 04 Dec 2010 16:17:25 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; nl; rv: Gecko/20101013 Lightning/1.0b2 Thunderbird/3.1.5


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:

--- libtool-2.4.1a/libltdl/m4/libtool.m4 2010-11-16 11:10:09.000000000 +0100 +++ libtool-2.4.1a-1/libltdl/m4/libtool.m4 2010-12-04 16:07:53.628086809 +0100
@@ -6900,9 +6900,16 @@

 case "$CC $CFLAGS " in #(
 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
+case "$CC $CXXFLAGS " in #(
+*\ -flto*\ *) CXXFLAGS="$CXXFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CXXFLAGS="$CXXFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CXXFLAGS="$CXXFLAGS -fno-use-linker-plugin" ;;

 dnl Parse the compiler output and extract the necessary
@@ -7000,6 +7007,7 @@

 $RM -f confest.$objext

 # PORTME: override above test on systems where it is broken
 m4_if([$1], [CXX],

On 04-12-10 15:40, Brice De Bruyne wrote:

The configure-script seems to misconfigure the postdep_objects_CXX when CFLAGS contains "-flto -fuse-linker-plugin" (using binutils- and gcc-4.6-20101127):

eg (libtool-2.4.1a):
CFLAGS="-flto -fuse-linker-plugin" CXXFLAGS="-flto -fuse-linker-plugin" ./configure && grep postdep_objects libtool

postdep_objects="/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/crtendS.o /usr/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../crtn.o /usr/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../crti.o /usr/lib/gcc/i686-pc-linux-gnu/4.6.0/crtbeginS.o /usr/lib/gcc/i686-pc-linux-gnu/4.6.0/crtendS.o /usr/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../crtn.o"

instead of:

postdep_objects="/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/crtendS.o /usr/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../crtn.o"

This does not happen when only -flto or only -fuse-linker-plugin is in CFLAGS, it only happens when they are both in CFLAGS...

I suppose the error comes from the check in libtool.m4....

Thanks for looking in to this!


Attachment: libtool-2.4.1a-linker_plugin.patch
Description: Text document

reply via email to

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