X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gold%2Fconfigure.ac;h=d7fa1f88e8bdae617f04eeee76dd6f1ad9ec8d84;hb=73b9be8b5301c4ac056e10c38a47414867ee892a;hp=695a2fdcc79152c27487fb759ad0e6b5e7ee5bc5;hpb=6f2750feaf2827ef8a1a0a5b2f90c1e9a6cabbd1;p=deliverable%2Fbinutils-gdb.git diff --git a/gold/configure.ac b/gold/configure.ac index 695a2fdcc7..d7fa1f88e8 100644 --- a/gold/configure.ac +++ b/gold/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. dnl -dnl Copyright (C) 2006-2016 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2017 Free Software Foundation, Inc. dnl dnl This file is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by @@ -49,7 +49,7 @@ fi sysroot_relocatable=0 if test -n "$sysroot"; then - case "sysroot" in + case "$sysroot" in "${prefix}" | "${prefix}/"* | \ "${exec_prefix}" | "${exec_prefix}/"* | \ '${prefix}' | '${prefix}/'*| \ @@ -114,6 +114,23 @@ if test "$plugins" = "yes"; then fi AM_CONDITIONAL(PLUGINS, test "$plugins" = "yes") +# Decide if -z relro should be enabled in ELF linker by default. +ac_default_ld_z_relro=unset +# Provide a configure time option to override our default. +AC_ARG_ENABLE(relro, + AS_HELP_STRING([--enable-relro], + [enable -z relro in ELF linker by default]), +[case "${enableval}" in + yes) ac_default_ld_z_relro=1 ;; + no) ac_default_ld_z_relro=0 ;; +esac])dnl +if test "${ac_default_ld_z_relro}" = unset; then + ac_default_ld_z_relro=1 +fi +AC_DEFINE_UNQUOTED(DEFAULT_LD_Z_RELRO, + $ac_default_ld_z_relro, + [Define to 1 if you want to enable -z relro in ELF linker by default.]) + AC_ARG_ENABLE([targets], [ --enable-targets alternative target configurations], [case "${enableval}" in @@ -144,6 +161,26 @@ if test -n "$enable_targets"; then done fi +# Decide which "--hash-style" to use by default +# Provide a configure time option to override our default. +AC_ARG_ENABLE([default-hash-style], +AS_HELP_STRING([--enable-default-hash-style={sysv,gnu,both}], + [use this default hash style]), +[case "${enable_default_hash_style}" in + sysv | gnu | both) ;; + *) AC_MSG_ERROR([bad value ${enable_default_hash_style} for enable-default-hash-style option]) ;; +esac], +[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]) + +AC_DEFINE_UNQUOTED([DEFAULT_HASH_STYLE], + ["${enable_default_hash_style}"], + [Set the default --hash-style value]) + # See which specific instantiations we need. targetobjs= all_targets= @@ -220,6 +257,8 @@ for targ in $target $canon_targets; do fi AM_CONDITIONAL(DEFAULT_TARGET_X86_64, test "$target_x86_64" = "yes") AM_CONDITIONAL(DEFAULT_TARGET_X32, test "$target_x32" = "yes") + AM_CONDITIONAL(DEFAULT_TARGET_X86_64_OR_X32, + test "$target_x86_64" = "yes" -o "$target_x32" = "yes") AM_CONDITIONAL(DEFAULT_TARGET_TILEGX, test "$targ_obj" = "tilegx") AM_CONDITIONAL(DEFAULT_TARGET_MIPS, test "$targ_obj" = "mips") DEFAULT_TARGET=${targ_obj}