aboutsummaryrefslogtreecommitdiff
path: root/ld/configure
diff options
context:
space:
mode:
authorRomain Geissler <romain.geissler@gmail.com>2017-08-08 07:25:39 +0930
committerAlan Modra <amodra@gmail.com>2017-08-08 07:25:39 +0930
commit2760f24c4942853eac7b921e4b8843d57a602654 (patch)
tree032df5cd9ee9386bd44239b733038f23f4388733 /ld/configure
parent8f5e83fb735af978b99ea6e22574560bf667d1d6 (diff)
downloadgdb-2760f24c4942853eac7b921e4b8843d57a602654.zip
gdb-2760f24c4942853eac7b921e4b8843d57a602654.tar.gz
gdb-2760f24c4942853eac7b921e4b8843d57a602654.tar.bz2
Add configure flag to enable gnu hash style by default.
ld/ * configure.ac: Add --enable-default-hash-style option. * ldmain.c (main): Set link_info.emit_hash to DEFAULT_EMIT_SYSV_HASH. Set link_info.emit_gnu_hash to DEFAULT_EMIT_GNU_HASH. * configure: Regenerate. * config.in: Regenerate. gold/ * configure.ac: Add --enable-default-hash-style option. * options.h (hash_style): Use DEFAULT_HASH_STYLE as default value. * configure: Regenerate. * config.in: Regenerate.
Diffstat (limited to 'ld/configure')
-rwxr-xr-xld/configure47
1 files changed, 45 insertions, 2 deletions
diff --git a/ld/configure b/ld/configure
index 640902b..de709d3 100755
--- a/ld/configure
+++ b/ld/configure
@@ -790,6 +790,7 @@ enable_got
enable_compressed_debug_sections
enable_new_dtags
enable_relro
+enable_default_hash_style
enable_werror
enable_build_warnings
enable_nls
@@ -1450,6 +1451,8 @@ Optional Features:
compress debug sections by default]
--enable-new-dtags set DT_RUNPATH instead of DT_RPATH by default]
--enable-relro enable -z relro in ELF linker by default
+ --enable-default-hash-style={sysv,gnu,both}
+ use this default hash style
--enable-werror treat compile warnings as errors
--enable-build-warnings enable build-time compiler warnings
--disable-nls do not use Native Language Support
@@ -11722,7 +11725,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11725 "configure"
+#line 11728 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11828,7 +11831,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11831 "configure"
+#line 11834 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -15564,6 +15567,34 @@ if test "${enable_relro+set}" = set; then :
esac
fi
+# Decide which "--hash-style" to use by default
+# Provide a configure time option to override our default.
+# Check whether --enable-default-hash-style was given.
+if test "${enable_default_hash_style+set}" = set; then :
+ enableval=$enable_default_hash_style; case "${enable_default_hash_style}" in
+ sysv | gnu | both) ;;
+ *) as_fn_error "bad value ${enable_default_hash_style} for enable-default-hash-style option" "$LINENO" 5 ;;
+esac
+else
+ case "${target}" in
+ # Enable gnu hash only on GNU targets, but not mips
+ mips*-*-*) enable_default_hash_style=sysv ;;
+ *-*-gnu* | *-*-linux* | *-*-nacl*) enable_default_hash_style=both ;;
+ *) enable_default_hash_style=sysv ;;
+esac
+fi
+
+
+case "${enable_default_hash_style}" in
+ sysv | both) ac_default_emit_sysv_hash=1 ;;
+ *) ac_default_emit_sysv_hash=0 ;;
+esac
+
+case "${enable_default_hash_style}" in
+ gnu | both) ac_default_emit_gnu_hash=1 ;;
+ *) ac_default_emit_gnu_hash=0 ;;
+esac
+
# Set the 'development' global.
. $srcdir/../bfd/development.sh
@@ -17228,6 +17259,18 @@ _ACEOF
+cat >>confdefs.h <<_ACEOF
+#define DEFAULT_EMIT_SYSV_HASH $ac_default_emit_sysv_hash
+_ACEOF
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define DEFAULT_EMIT_GNU_HASH $ac_default_emit_gnu_hash
+_ACEOF
+
+
+