As detailed in the PR, H.J.'s .init_array/.fini_array patch 2011-08-20 H.J. Lu <hongjiu...@intel.com>
PR other/46770 * config.gcc (tm_file): Add initfini-array.h if .init_arrary/.fini_array are supported. broke Solaris bootstrap since the testcase incorrectly succeeds on Solaris, failing to notice that none of the constructors and destructors were ever run. The following patch fixes that, allows i386-pc-solaris2.11 bootstrap to succeed and was also bootstrapped on x86_64-unknown-linux-gnu (CentOS 5.5 with gas/gld 2.21). The testcase still fails on my Linux system, so I'm uncertain if the fix is right. Ok for mainline? Rainer 2011-08-26 Rainer Orth <r...@cebitec.uni-bielefeld.de> PR target/50166 * acinclude.m4 (gcc_AC_INITFINI_ARRAY): Check count in main. * configure: Regenerate.
# HG changeset patch # Parent f622b6f398b4f552dcc1450c8caf6368a5937748 Disable .init_array/.fini_array support on Solaris (PR target/50166) diff --git a/gcc/acinclude.m4 b/gcc/acinclude.m4 --- a/gcc/acinclude.m4 +++ b/gcc/acinclude.m4 @@ -477,6 +477,8 @@ void (*const dtors65535[]) () int main () { + if (count != 65535) + abort (); return 0; } #endif diff --git a/gcc/configure b/gcc/configure --- a/gcc/configure +++ b/gcc/configure @@ -10888,6 +10888,8 @@ void (*const dtors65535) () int main () { + if (count != 65535) + abort (); return 0; } #endif @@ -17913,7 +17915,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 17916 "configure" +#line 17918 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18019,7 +18021,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18022 "configure" +#line 18024 "configure" #include "confdefs.h" #if HAVE_DLFCN_H
-- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University