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 target/56533] Linker problem on avr with lto and main function inside archive


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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> 2013-03-05 12:38:51 UTC ---
    + /usr/bin/avr-gcc -mmcu=atmega328p -Os -flto -fwhole-program realmain.o
main.a

please provide the console output produced when adding -v to the above
commandline.  I suspect that you fall foul of using -fwhole-program without
making the whole program visible to gcc via -flto by means of not using
a compiler that can handle LTO of static archives.

In general, don't use -fwhole-program with -flto, -flto is smart enough
to discover things more intelligently.


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