[Gold, aarch64] Implement some AArch64 relocs.
[deliverable/binutils-gdb.git] / gold / configure.ac
index 9bc216b947ce019a79830978ae13fea1d91f0d84..de3b63038a2c0e60e1cf4fd20a5c366d7486f45f 100644 (file)
@@ -1,7 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 dnl
-dnl   Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
-dnl   Free Software Foundation, Inc.
+dnl   Copyright (C) 2006-2016 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
@@ -115,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
@@ -200,12 +216,31 @@ for targ in $target $canon_targets; do
        default_big_endian=$targ_big_endian
        default_osabi=$targ_osabi
 
+       AM_CONDITIONAL(DEFAULT_TARGET_AARCH64, test "$targ_obj" = "aarch64")
        AM_CONDITIONAL(DEFAULT_TARGET_ARM, test "$targ_obj" = "arm")
        AM_CONDITIONAL(DEFAULT_TARGET_I386, test "$targ_obj" = "i386")
        AM_CONDITIONAL(DEFAULT_TARGET_POWERPC, test "$targ_obj" = "powerpc")
        AM_CONDITIONAL(DEFAULT_TARGET_SPARC, test "$targ_obj" = "sparc")
-       AM_CONDITIONAL(DEFAULT_TARGET_X86_64, test "$targ_obj" = "x86_64")
+       AM_CONDITIONAL(DEFAULT_TARGET_S390, test "$targ_obj" = "s390")
+       target_x86_64=no
+       target_x32=no
+       if test "$targ_obj" = "x86_64"; then
+         case "$target" in
+         x86_64*-linux-gnux32)
+           target_x32=yes
+           default_size=32
+           ;;
+         *)
+           target_x86_64=yes
+           ;;
+         esac
+       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}
        AC_SUBST(DEFAULT_TARGET)
       fi
@@ -316,6 +351,7 @@ AM_CONDITIONAL(FN_PTRS_IN_SO_WITHOUT_PIC, [
     powerpc*) false;;
     x86_64) false;;
     sparc64) false;;
+    s390x) false;;
     *) true;;
   esac])
 
@@ -513,7 +549,6 @@ fi
 
 # Link in zlib if we can.  This allows us to write compressed sections.
 AM_ZLIB
-AM_CONDITIONAL(HAVE_ZLIB, test "$ac_cv_header_zlib_h" = "yes")
 
 dnl We have to check these in C, not C++, because autoconf generates
 dnl tests which have no type information, and current glibc provides
@@ -521,8 +556,28 @@ dnl multiple declarations of functions like basename when compiling
 dnl with C++.
 AC_CHECK_DECLS([basename, ffs, asprintf, vasprintf, snprintf, vsnprintf, strverscmp])
 
+dnl Check if gcc supports the -gpubnames option.
+dnl Use -Werror in case of compilers that make unknown -g options warnings.
+dnl They would pass the test here, but fail in actual use when $WARN_CFLAGS
+dnl gets set later by default Autoconf magic to include -Werror.  (We are
+dnl assuming here that there is no compiler that groks -gpubnames
+dnl but does not grok -Werror.)
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Werror -gpubnames"
+AC_COMPILE_IFELSE([int i;], [have_pubnames=yes], [have_pubnames=no])
+CFLAGS="$save_CFLAGS"
+AM_CONDITIONAL(HAVE_PUBNAMES, test "$have_pubnames" = "yes")
+
+dnl Check if gcc supports the -fno-use-linker-plugin option.
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Werror -fno-use-linker-plugin"
+AC_COMPILE_IFELSE([int i;], [have_no_use_linker_plugin=yes], [have_no_use_linker_plugin=no])
+CFLAGS="$save_CFLAGS"
+AM_CONDITIONAL(HAVE_NO_USE_LINKER_PLUGIN, test "$have_no_use_linker_plugin" = "yes")
+
 AC_LANG_PUSH(C++)
 
+AC_CHECK_HEADERS(unordered_set unordered_map)
 AC_CHECK_HEADERS(tr1/unordered_set tr1/unordered_map)
 AC_CHECK_HEADERS(ext/hash_map ext/hash_set)
 AC_CHECK_HEADERS(byteswap.h)
@@ -601,18 +656,6 @@ if test "$gold_cv_stat_st_mtim" = "yes"; then
            [Define if struct stat has a field st_mtim with timespec for mtime])
 fi
 
-dnl Check if gcc supports the -gpubnames option.
-dnl Use -Werror in case of compilers that make unknown -g options warnings.
-dnl They would pass the test here, but fail in actual use when $WARN_CFLAGS
-dnl gets set later by default Autoconf magic to include -Werror.  (We are
-dnl assuming here that there is no compiler that groks -gpubnames
-dnl but does not grok -Werror.)
-save_CXXFLAGS="$CXXFLAGS"
-CXXFLAGS="$CXXFLAGS -Werror -gpubnames"
-AC_COMPILE_IFELSE([int i;], [have_pubnames=yes], [have_pubnames=no])
-CXXFLAGS="$save_CXXFLAGS"
-AM_CONDITIONAL(HAVE_PUBNAMES, test "$have_pubnames" = "yes")
-
 AC_LANG_POP(C++)
 
 AC_CHECK_HEADERS(locale.h)
This page took 0.024279 seconds and 4 git commands to generate.