[Bug c/42457] New: AVR fails to build unless LTO is disabled
hutchinsonandy at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Dec 22 03:18:00 GMT 2009
AVR will fail to build with (default) LTO enabled.
LTO becomes enabled when a working libelf implementation is found.
Mike Stein brought this to my attention and I have been able to replicate it
now I have loaded libelf.
The undefined symbol `builtin_define_std' is defined in c-cppbuiltin.c. It
would appear this is not linked for some of lto compilations - yet target avr.c
is.
The root cause seems to be that avr target uses `builtin_define_std' inside a
staic function `avr_cpu_cpp_builtins' (avr.c) - whereas is used to be used
inside a macro (avr.h). On most (all?) other targets it is used inside a macro
When the macro is not used, there is no definition needed and no link error.
A relevant change on avr target was made 149519
2009-07-11 Anatoly Sokolov <aesok@post.ru>
* config/avr/avr.h (TARGET_CPU_CPP_BUILTINS): Redefine.
(avr_extra_arch_macro) Remove declatation.
* config/avr/avr.c (avr_cpu_cpp_builtins): New function.
(avr_extra_arch_macro) Declare as static.
* config/avr/avr-protos.h (avr_cpu_cpp_builtins): Dclare.
Using --disable-lto switch for configure allows build to complete.
--
Summary: AVR fails to build unless LTO is disabled
Product: gcc
Version: lto
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hutchinsonandy at gcc dot gnu dot org
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: avr-unknown-none
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42457
More information about the Gcc-bugs
mailing list