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: "espindola at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jan 2010 16:29:56 -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 #2 from espindola at gcc dot gnu dot org 2010-01-12 16:29 -------
Is the undefined reference to libgcc? Is it being linked statically? When
linking libgcc statically the driver has to pass
-plugin-opt=-pass-through=/foo/bar/libgcc.a to ld. This is done in gcc.c:
%{static|static-libgcc:-plugin-opt=-pass-through=%(lto_libgcc)} \
%{static:-plugin-opt=-pass-through=-lc} \
So, is there a better way to detect that we are linking libgcc statically?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42690