Use .init_array section only if __ELF__ is defined.

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
This commit is contained in:
H.J. Lu 2011-08-22 15:53:13 +00:00 committed by H.J. Lu
parent ad88538650
commit b0894e1f4f
3 changed files with 14 additions and 2 deletions

View 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

View 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. */

7
gcc/configure vendored
View File

@ -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