Test whether linker supports --hash-style option.
authordrepper <drepper>
Mon, 10 Jul 2006 21:45:29 +0000 (21:45 +0000)
committerdrepper <drepper>
Mon, 10 Jul 2006 21:45:29 +0000 (21:45 +0000)
configure.in

index 79fa32e..924b040 100644 (file)
@@ -1589,6 +1589,22 @@ EOF
   rm -f conftest*])
 
   AC_SUBST(libc_cv_fpie)
+
+  AC_CACHE_CHECK(for --hash-style option,
+                libc_cv_hashstyle, [dnl
+  cat > conftest.c <<EOF
+int _start (void) { return 42; }
+EOF
+  if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
+                             -fPIC -shared -o conftest.so conftest.c
+                             -Wl,--hash-style=both -nostdlib 1>&AS_MESSAGE_LOG_FD])
+  then
+    libc_cv_hashstyle=yes
+  else
+    libc_cv_hashstyle=no
+  fi
+  rm -f conftest*])
+  AC_SUBST(libc_cv_hashstyle)
 fi
 
 AC_CACHE_CHECK(for -fno-toplevel-reorder, libc_cv_fno_toplevel_reorder, [dnl