This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug driver/42690] Undefined reference errors with -flto -fuse-linker-plugin



------- Comment #13 from d dot g dot gorbachev at gmail dot com  2010-01-16 16:55 -------
(In reply to comment #12)

> What options other than -nostdlib prevent gcc from linking libgcc and
> libc in the produced binary?

I know of -nodefaultlibs.

> To implement this we should always pass -plugin-opt=-pass-through=
> %(lto_libgcc) and -plugin-opt=-pass-through=-lc to the linker unless
> something like -nostdlib is used.

Wouldn't it be better to add %{fuse-linker-plugin:
-plugin-opt=-pass-through=...} to LIBGCC_SPEC and to LIB_SPEC?

However, the driver does not really know, whether we link with libgcc and/or
libc. Someone can use -nodefaultlibs together with -lc -lgcc and the linker
will still fail.


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]