http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47244

           Summary: [4.6 Regression] plugin linker is used unconditionally
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: rgue...@gcc.gnu.org
                CC: hubi...@gcc.gnu.org


We now seem to always pass -plugin ./liblto_plugin.so ... to collect2, even
when not using LTO.  This causes us to always use the linker configured
for plugin use (--with-plugin-ld) via the collect-ld script and thus
with --with-plugin-ld=gold gold will be always used (which breaks the build
of libgo for me as gold is too old appearantly).

int main() { return 0; }

> strace -e execve -f ./xgcc -B. t.c -v -Wl,-debug 2>&1 | grep gold
Configured with: /space/rguenther/src/svn/trunk/configure --disable-bootstrap
--disable-nls --disable-libstdcxx-pch --enable-lto --enable-gold
--with-plugin-ld=/usr/bin/gold
--enable-languages=c,ada,c++,fortran,java,lto,objc,obj-c++,go
[pid  7648] execve("/usr/bin/gold", ["/usr/bin/gold", "-plugin",
"./liblto_plugin.so", "-plugin-opt=./lto-wrapper",
"-plugin-opt=-fresolution=/tmp/cc"..., "-plugin-opt=-pass-through=-lgcc",
"-plugin-opt=-pass-through=-lgcc_"..., "-plugin-opt=-pass-through=-lc",
"-plugin-opt=-pass-through=-lgcc", "-plugin-opt=-pass-through=-lgcc_"...,
"--eh-frame-hdr", "-m", "elf_x86_64", "-dynamic-linker",
"/lib64/ld-linux-x86-64.so.2", "/usr/lib/../lib64/crt1.o", ...], [/* 91 vars
*/]) = 0
rguent...@murzim:/abuild/rguenther/trunk-g/gcc> strace -e execve -f ./xgcc -B.
t.c -v -Wl,-debug 2>&1 | grep gold
Configured with: /space/rguenther/src/svn/trunk/configure --disable-bootstrap
--disable-nls --disable-libstdcxx-pch --enable-lto --enable-gold
--with-plugin-ld=/usr/bin/gold
--enable-languages=c,ada,c++,fortran,java,lto,objc,obj-c++,go
[pid  7667] execve("/usr/bin/gold", ["/usr/bin/gold", "-plugin",
"./liblto_plugin.so", "-plugin-opt=./lto-wrapper",
"-plugin-opt=-fresolution=/tmp/cc"..., "-plugin-opt=-pass-through=-lgcc",
"-plugin-opt=-pass-through=-lgcc_"..., "-plugin-opt=-pass-through=-lc",
"-plugin-opt=-pass-through=-lgcc", "-plugin-opt=-pass-through=-lgcc_"...,
"--eh-frame-hdr", "-m", "elf_x86_64", "-dynamic-linker",
"/lib64/ld-linux-x86-64.so.2", "/usr/lib/../lib64/crt1.o", ...], [/* 91 vars
*/]) = 0

Reply via email to