This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug bootstrap/50237] [4.7 regression] comparison failure caused by HAVE_INITFINI_ARRAY check
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 30 Aug 2011 15:40:49 +0000
- Subject: [Bug bootstrap/50237] [4.7 regression] comparison failure caused by HAVE_INITFINI_ARRAY check
- Auto-submitted: auto-generated
- References: <bug-50237-4@http.gcc.gnu.org/bugzilla/>
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.