On Mon, Mar 19, 2012 at 1:34 PM, DJ Delorie <d...@redhat.com> wrote:
>
> This breaks constructors on pretty much every elf+newlib target,
> because newlib and gcc both use HAVE_INITFINI_ARRAY (and have for many
> years) but the tests don't match.  GCC puts ctors in .ctors but libgcc
> is built without support for them (newlib's generated config headers
> define HAVE_INITFINI_ARRAY, which causes gcc's initini-array.h to set
> USE_INITFINI_ARRAY, which shuts off libgcc's ctor/dtor support), so
> they don't run.

This should have been fixed by:
2012-02-23  Ulrich Weigand  <ulrich.weig...@de.ibm.com>

        * acinclude.m4: Use HAVE_INITFINI_ARRAY_SUPPORT instead of
        HAVE_INITFINI_ARRAY to work around namespace pollution in
        certain versions of newlib system headers.
        * config.in: Regenerate.
        * configure: Regenerate.
        * config/initfini-array.h: Use HAVE_INITFINI_ARRAY_SUPPORT
        instead of HAVE_INITFINI_ARRAY.

Thanks,
Andrew Pinski


>
>> 2011-08-20  H.J. Lu  <hongjiu...@intel.com>
>>
>>       PR target/46770
>>       * config.gcc (tm_file): Add initfini-array.h if
>>       .init_arrary/.fini_array are supported.
>>
>>       * crtstuff.c: Don't generate .ctors nor .dtors sections if
>>       USE_INITFINI_ARRAY is defined.
>>
>>       * output.h (default_elf_init_array_asm_out_constructor): New.
>>       (default_elf_fini_array_asm_out_destructor): Likewise.
>>       * varasm.c (elf_init_array_section): Likewise.
>>       (elf_fini_array_section): Likewise.
>>       (get_elf_initfini_array_priority_section): Likewise.
>>       (default_elf_init_array_asm_out_constructor): Likewise.
>>       (default_elf_fini_array_asm_out_destructor): Likewise.
>>
>>       * config/initfini-array.h: New.

Reply via email to