aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-03-16 02:47:08 +0000
committerUlrich Drepper <drepper@redhat.com>2002-03-16 02:47:08 +0000
commit5241882ce2d21c23035a00d252b2c4668529fb31 (patch)
tree747403e40fbf06a597bfaec121f70731a907843e /configure.in
parentc06b947ef189e2fa8bc9586c4010aa2dae6facb9 (diff)
downloadglibc-5241882ce2d21c23035a00d252b2c4668529fb31.tar
glibc-5241882ce2d21c23035a00d252b2c4668529fb31.tar.gz
glibc-5241882ce2d21c23035a00d252b2c4668529fb31.tar.bz2
glibc-5241882ce2d21c23035a00d252b2c4668529fb31.zip
Update.
2002-03-15 H.J. Lu <hjl@gnu.org> Ulrich Drepper <drepper@redhat.com> * configure.in: Check for availability of init_array/fini_array/preinit_array handling in binutils. * config.h.in (HAVE_INITFINI_ARRAY): New macro. * config.make.in (have-initfini-array): New variable.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in29
1 files changed, 29 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index c48c4c1ca6..484614949f 100644
--- a/configure.in
+++ b/configure.in
@@ -1039,6 +1039,35 @@ EOF
fi
fi
+ AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support,
+ libc_cv_initfinit_array, [dnl
+ cat > conftest.c <<EOF
+int _start (void) { return 0; }
+int __start (void) { return 0; }
+int foo (void) { return 1; }
+#ifdef __i386__
+asm (".section .init_array\n\t.long foo");
+#else
+# error "define appropriately for the architecture"
+#endif
+EOF
+ if AC_TRY_COMMAND([${CC-cc} -o conftest conftest.c
+ -static -nostartfiles -nostdlib 1>&AC_FD_CC])
+ then
+ if readelf -S conftest | fgrep INIT_ARRAY > /dev/null; then
+ libc_cv_initfinit_array=yes
+ else
+ libc_cv_initfinit_array=no
+ fi
+ else
+ libc_cv_initfinit_array=no
+ fi
+ rm -f conftest*])
+ AC_SUBST(libc_cv_initfinit_array)
+ if test $libc_cv_initfinit_array = yes; then
+ AC_DEFINE(HAVE_INITFINI_ARRAY)
+ fi
+
AC_CACHE_CHECK(for -z nodelete option,
libc_cv_z_nodelete, [dnl
cat > conftest.c <<EOF