http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50237
--- Comment #7 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2011-08-30 15:40:49 UTC --- On Tue, 30 Aug 2011, ebotcazou at gcc dot gnu.org wrote: > The fix is to turn the check into a target check, i.e. test the target > binutils. > See configure.ac:1884 and below. And a proper target check should not be testing execution of the generated code to work properly with cross compilation. The following are unconditionally safe: * Testing the target triplet. In particular, use ACX_ELF_TARGET_IFELSE (config/elf.m4) to eliminate non-ELF targets. * Testing uses of the assembler and linker, and using target objdump (when using GNU binutils) to examine the result, as long as the linker uses do not require any target libraries to be present. * Examining target headers (see the code checking for glibc versions in $target_header_dir/features.h). The first two should be able to tell if the assembler and linker have all the required features. init_array and fini_array are standard ELF features so I think the default should be to assume they will work on the target (if ELF) unless a reason arises to blacklist particular targets.