aboutsummaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
Diffstat (limited to 'gold')
-rw-r--r--gold/ChangeLog7
-rwxr-xr-xgold/configure36
-rw-r--r--gold/configure.ac32
3 files changed, 49 insertions, 26 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 29a3438..ab9ed3c 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,10 @@
+2010-11-23 Matthias Klose <doko@ubuntu.com>
+
+ * configure.in: For --enable-gold, handle value `default' instead of
+ `both*'. Always install ld as ld.bfd, install as ld if gold is
+ not the default.
+ * configure: Regenerate.
+
2010-11-18 Doug Kwan <dougkwan@google.com>
* expression.cc (BINARY_EXPRESSION): Initialize left_alignment
diff --git a/gold/configure b/gold/configure
index ce08d65..c759b77 100755
--- a/gold/configure
+++ b/gold/configure
@@ -765,6 +765,7 @@ ac_subst_files=''
ac_user_opts='
enable_option_checking
with_sysroot
+enable_ld
enable_gold
enable_threads
enable_plugins
@@ -1410,7 +1411,8 @@ Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-gold[=ARG] build gold [ARG={both}[/{gold,ld}]]
+ --enable-ld[=ARG] build ld [ARG={default,yes,no}]
+ --enable-gold[=ARG] build gold [ARG={default,yes,no}]
--enable-threads multi-threaded linking
--enable-plugins linker plugins
--enable-targets alternative target configurations
@@ -3247,28 +3249,36 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
+
+default_ld=
+# Check whether --enable-ld was given.
+if test "${enable_ld+set}" = set; then :
+ enableval=$enable_ld; case "${enableval}" in
+ default)
+ default_ld=ld.bfd
+ ;;
+esac
+fi
+
+
# Check whether --enable-gold was given.
if test "${enable_gold+set}" = set; then :
enableval=$enable_gold; case "${enableval}" in
- yes)
- install_as_default=gold
- installed_linker=ld
- ;;
- both/gold)
- install_as_default=yes
+ yes|default)
+ if test x${default_ld} = x; then
+ install_as_default=yes
+ fi
installed_linker=ld.gold
;;
- both|both/ld)
- install_as_default=no
- installed_linker=ld.gold
+ no)
;;
*)
as_fn_error "invalid --enable-gold argument" "$LINENO" 5
;;
esac
else
- install_as_default=gold
- installed_linker=ld
+ install_as_default=no
+ installed_linker=ld.gold
fi
@@ -8577,7 +8587,7 @@ $as_echo X"$file" |
case "$ac_file" in */Makefile.in)
# Adjust a relative srcdir.
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
- ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
# In autoconf-2.13 it is called $ac_given_srcdir.
# In autoconf-2.50 it is called $srcdir.
diff --git a/gold/configure.ac b/gold/configure.ac
index 8bd80fa..2c50d97 100644
--- a/gold/configure.ac
+++ b/gold/configure.ac
@@ -41,27 +41,33 @@ AC_DEFINE_UNQUOTED(TARGET_SYSTEM_ROOT_RELOCATABLE, $sysroot_relocatable,
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.
-AC_ARG_ENABLE(gold,
-[[ --enable-gold[=ARG] build gold [ARG={both}[/{gold,ld}]]]],
+
+default_ld=
+AC_ARG_ENABLE(ld,
+[[ --enable-ld[=ARG] build ld [ARG={default,yes,no}]]],
[case "${enableval}" in
- yes)
- install_as_default=gold
- installed_linker=ld
- ;;
- both/gold)
- install_as_default=yes
+ 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
;;
- both|both/ld)
- install_as_default=no
- installed_linker=ld.gold
+ no)
;;
*)
AC_MSG_ERROR([invalid --enable-gold argument])
;;
esac],
-[install_as_default=gold
- installed_linker=ld])
+[install_as_default=no
+ installed_linker=ld.gold])
AC_SUBST(install_as_default)
AC_SUBST(installed_linker)