This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/42690] Undefined reference errors with -flto -fuse-linker-plugin
- From: "d dot g dot gorbachev at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Jan 2010 22:15:09 -0000
- Subject: [Bug lto/42690] Undefined reference errors with -flto -fuse-linker-plugin
- References: <bug-42690-16926@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from d dot g dot gorbachev at gmail dot com 2010-01-14 22:15 -------
> Is the undefined reference to libgcc? Is it being linked statically?
Yes. In both cases (with and without -DBUG), the ld command line is
/usr/local/bin/ld -plugin
/usr/local/libexec/gcc/i686-pc-linux-gnu/4.5.0/liblto_plugin.so
-plugin-opt=/usr/local/libexec/gcc/i686-pc-linux-gnu/4.5.0/lto-wrapper
-plugin-opt=i686-pc-linux-gnu-gcc-4.5.0 -plugin-opt=-flto
-plugin-opt=-fuse-linker-plugin -plugin-opt=-mtune=generic --eh-frame-hdr -m
elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o
/usr/local/lib/gcc/i686-pc-linux-gnu/4.5.0/crtbegin.o
-L/usr/local/lib/gcc/i686-pc-linux-gnu/4.5.0
-L/usr/local/lib/gcc/i686-pc-linux-gnu/4.5.0/../../../../i686-pc-linux-gnu/lib
-L/usr/local/lib/gcc/i686-pc-linux-gnu/4.5.0/../../.. /tmp/ccEIWEH2.o -lgcc -lc
-lgcc /usr/local/lib/gcc/i686-pc-linux-gnu/4.5.0/crtend.o /usr/lib/crtn.o
However, this error only happens with -DBUG.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42690