* eval.c (parse_and_eval_address_1): Remove function.
[deliverable/binutils-gdb.git] / gold / configure.ac
index 4bf223cb514ed8a8d579a446d668c4a8f06d50de..60243d0709e69e314378c82f5d2db017337eaec6 100644 (file)
@@ -7,7 +7,7 @@ AC_CONFIG_SRCDIR(gold.cc)
 
 AC_CANONICAL_TARGET
 
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([no-dist parallel-tests])
 
 AM_CONFIG_HEADER(config.h:config.in)
 
@@ -38,6 +38,39 @@ AC_DEFINE_UNQUOTED(TARGET_SYSTEM_ROOT, "$sysroot",
 AC_DEFINE_UNQUOTED(TARGET_SYSTEM_ROOT_RELOCATABLE, $sysroot_relocatable,
   [Whether the system root can be relocated])
 
+dnl "install_as_default" is true if the linker to be installed as the
+dnl default linker, ld.
+dnl "installed_linker" is the installed gold linker name.
+
+default_ld=
+AC_ARG_ENABLE(ld,
+[[  --enable-ld[=ARG]     build ld [ARG={default,yes,no}]]],
+[case "${enableval}" in 
+  default)
+    default_ld=ld.bfd
+    ;;
+esac])
+
+AC_ARG_ENABLE(gold,
+[[  --enable-gold[=ARG]     build gold [ARG={default,yes,no}]]],
+[case "${enableval}" in
+ yes|default)
+   if test x${default_ld} = x; then
+     install_as_default=yes
+   fi
+   installed_linker=ld.gold
+   ;;
+ no)
+   ;;
+ *)
+   AC_MSG_ERROR([invalid --enable-gold argument])
+   ;;
+ esac],
+[install_as_default=no
+ installed_linker=ld.gold])
+AC_SUBST(install_as_default)
+AC_SUBST(installed_linker)
+
 dnl For now threads are a configure time option.
 AC_ARG_ENABLE([threads],
 [  --enable-threads        multi-threaded linking],
@@ -163,7 +196,14 @@ for targ in $target $canon_targets; do
 done
 
 # Remove any duplicates.
-targetobjs=`echo $targetobjs | tr ' ' '\n' | sort | uniq | tr '\n' ' '`
+to=""
+for t in $targetobjs; do
+  case " $to " in
+  *" $t "*) ;;
+  *) to="$to $t" ;;
+  esac
+done
+targetobjs=$to
 
 if test -n "$targ_32_little"; then
   AC_DEFINE(HAVE_TARGET_32_LITTLE, 1,
@@ -218,6 +258,9 @@ AM_CONDITIONAL(NATIVE_LINKER,
   test "x$target_alias" = "x" -o "x$host_alias" = "x$target_alias")
 AM_CONDITIONAL(GCC, test "$GCC" = yes)
 
+AM_CONDITIONAL(NATIVE_OR_CROSS_LINKER,
+  test "x$target_alias" = "x" -o "x$host_alias" = "x$target_alias" -o "x$host_alias" = "x$build_alias")
+
 dnl Some architectures do not support taking pointers of functions
 dnl defined in shared libraries except in -fPIC mode.  We need to
 dnl tell the unittest framework if we're compiling for one of those
@@ -325,6 +368,21 @@ if test "$gold_cv_c_random_seed" = "yes"; then
 fi
 AC_SUBST(RANDOM_SEED_CFLAGS)
 
+dnl On GNU/Linux ifunc is supported by the dynamic linker in glibc
+dnl 2.11 or later, and by binutils 2.20.1 or later.
+AC_CACHE_CHECK([for glibc >= 2.11], [gold_cv_lib_glibc2_11],
+[AC_COMPILE_IFELSE([
+#include <features.h>
+#if !defined __GLIBC__
+error
+#elif __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 11)
+error
+#endif
+__asm__(".type foo, %gnu_indirect_function");
+], [gold_cv_lib_glibc2_11=yes], [gold_cv_lib_glibc2_11=no])])
+
+AM_CONDITIONAL(IFUNC, test "$gold_cv_lib_glibc2_11" = "yes")
+
 AM_BINUTILS_WARNINGS
 
 WARN_CXXFLAGS=`echo ${WARN_CFLAGS} | sed -e 's/-Wstrict-prototypes//' -e 's/-Wmissing-prototypes//' -e 's/-Wshadow//'`
This page took 0.030107 seconds and 4 git commands to generate.