When LTO is enabled AVR fails all whopr/lto tests: Testsuite fails all lto/whopr tests: Example: Executing on host: /media/verbatim/gcchead/obj-dir/gcc/xgcc -B/media/verbatim/gcchead/obj-dir/gcc/ /media/verbatim/gcchead/trunk/gcc/testsuite/gcc.c-torture/execute/builtins/abs-1.c /media/verbatim/gcchead/trunk/gcc/testsuite/gcc.c-torture/execute/builtins/abs-1-lib.c /media/verbatim/gcchead/trunk/gcc/testsuite/gcc.c-torture/execute/builtins/lib/main.c -w -O2 -flto -fno-builtin-abs -DSTACK_SIZE=2048 -DNO_TRAMPOLINES -DSIGNAL_SUPPRESS -mmcu=atmega128 /home/andy/winavrfiles/avrtest/dejagnuboards/exit.c -Wl,-u,vfprintf -lprintf_flt -Wl,-Tbss=0x802000,--defsym=__heap_end=0x80ffff -lm -o /media/verbatim/gcchead/obj-dir/gcc/testsuite/gcc/abs-1.x6 (timeout = 300) spawn /media/verbatim/gcchead/obj-dir/gcc/xgcc -B/media/verbatim/gcchead/obj-dir/gcc/ /media/verbatim/gcchead/trunk/gcc/testsuite/gcc.c-torture/execute/builtins/abs-1.c /media/verbatim/gcchead/trunk/gcc/testsuite/gcc.c-torture/execute/builtins/abs-1-lib.c /media/verbatim/gcchead/trunk/gcc/testsuite/gcc.c-torture/execute/builtins/lib/main.c -w -O2 -flto -fno-builtin-abs -DSTACK_SIZE=2048 -DNO_TRAMPOLINES -DSIGNAL_SUPPRESS -mmcu=atmega128 /home/andy/winavrfiles/avrtest/dejagnuboards/exit.c -Wl,-u,vfprintf -lprintf_flt -Wl,-Tbss=0x802000,--defsym=__heap_end=0x80ffff -lm -o /media/verbatim/gcchead/obj-dir/gcc/testsuite/gcc/abs-1.x6 /home/andy/local/avr/lib/gcc/avr/4.5.0/../../../../avr/bin/ld: -f may not be used without -shared compiler exited with status 1 output is: /home/andy/local/avr/lib/gcc/avr/4.5.0/../../../../avr/bin/ld: -f may not be used without -shared FAIL: gcc.c-torture/execute/builtins/abs-1.c compilation, -O2 -flto Note LTO was built using patch from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42457
Due to target defining linker name. Fixed 4.5 HEAD Author: hutchinsonandy Date: Mon Jan 11 23:12:14 2010 New Revision: 155819 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155819 Log: 2010-01-11 Andy Hutchinson <hutchinsonandy@gcc.gnu.org> * config/avr/avr.h (LINKER_NAME): Remove. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/avr.h