Use .init_array section only if __ELF__ is defined.
authorH.J. Lu <hongjiu.lu@intel.com>
Mon, 22 Aug 2011 15:53:13 +0000 (15:53 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Mon, 22 Aug 2011 15:53:13 +0000 (08:53 -0700)
2011-08-22  H.J. Lu  <hongjiu.lu@intel.com>

* acinclude.m4 (gcc_AC_INITFINI_ARRAY): Error if __ELF__ isn't
defined.
* configure: Regenerated.

From-SVN: r177963

gcc/ChangeLog
gcc/acinclude.m4
gcc/configure

index b0aaf468f54370b1d7faf17bd7d40e25863126c1..afe19730cf15951faa99ba779986369a5cda1d7d 100644 (file)
@@ -1,3 +1,9 @@
+2011-08-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * acinclude.m4 (gcc_AC_INITFINI_ARRAY): Error if __ELF__ isn't
+       defined.
+       * configure: Regenerated.
+
 2011-08-22  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/50133
index 74c86dbfab7be603bd20fd9232e6f834cdea113e..a8ecd2d4f6ded40e7f42ae7ceb4f30cab0019aa6 100644 (file)
@@ -377,6 +377,9 @@ AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support,
                 gcc_cv_initfini_array, [dnl
   if test "x${build}" = "x${target}" && test "x${build}" = "x${host}"; then
     AC_RUN_IFELSE([AC_LANG_SOURCE([
+#ifndef __ELF__
+#error Not an ELF OS
+#endif
 #ifdef __ia64__
 /* We turn on .preinit_array/.init_array/.fini_array support for ia64
    if it can be used.  */
index 94daddcd40c59f91fd575ef230c3caf73d7bddcb..749dd2e6078e63b120e2cfc9e703e394922e7462 100755 (executable)
@@ -10705,6 +10705,9 @@ else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+#ifndef __ELF__
+#error Not an ELF OS
+#endif
 #ifdef __ia64__
 /* We turn on .preinit_array/.init_array/.fini_array support for ia64
    if it can be used.  */
@@ -17827,7 +17830,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 17830 "configure"
+#line 17833 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -17933,7 +17936,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 17936 "configure"
+#line 17939 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H