On Mon, Aug 22, 2011 at 11:53 AM, Joseph S. Myers <jos...@codesourcery.com> wrote: > On Mon, 22 Aug 2011, H.J. Lu wrote: > >> On Sun, Aug 21, 2011 at 10:37 PM, Jakub Jelinek <ja...@redhat.com> wrote: >> nd/or add another test to it that tests >> > that you can actually use >> > .section .init_array >> > and it will use correct section flags for the section. >> > >> >> We need this information in config.gcc. But config.gcc is used >> before assembler and readelf are detected. I am running out of >> ideas. Any suggestions? > > Require a good assembler on ELF targets and just enable this by default > for them without trying a configure test that won't work for cross > compilation (AC_RUN_IFELSE is bad). > > The toplevel config/elf.m4 provides a good notion of what is or is not > ELF (if there are problems, we can fix that file). Only a handful of > targets support non-GNU assemblers; for the vast bulk of targets we should > assume a not-too-old GNU assembler. That way, the configure test can be > used to cause a configure-time error if the assembler is defective and it > doesn't matter that the test is late. >
A working .init_array support needs assembler, linker and libc. That is why AC_RUN_IFELSE is used. -- H.J.