From b0894e1f4f17208c2a0c60c9636f3621d28dfcce Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 22 Aug 2011 15:53:13 +0000 Subject: Use .init_array section only if __ELF__ is defined. 2011-08-22 H.J. Lu * acinclude.m4 (gcc_AC_INITFINI_ARRAY): Error if __ELF__ isn't defined. * configure: Regenerated. From-SVN: r177963 --- gcc/ChangeLog | 6 ++++++ gcc/acinclude.m4 | 3 +++ gcc/configure | 7 +++++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b0aaf46..afe1973 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-08-22 H.J. Lu + + * acinclude.m4 (gcc_AC_INITFINI_ARRAY): Error if __ELF__ isn't + defined. + * configure: Regenerated. + 2011-08-22 Jakub Jelinek PR tree-optimization/50133 diff --git a/gcc/acinclude.m4 b/gcc/acinclude.m4 index 74c86db..a8ecd2d 100644 --- a/gcc/acinclude.m4 +++ b/gcc/acinclude.m4 @@ -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. */ diff --git a/gcc/configure b/gcc/configure index 94daddc..749dd2e 100755 --- a/gcc/configure +++ b/gcc/configure @@ -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 -- cgit v1.1