summaryrefslogtreecommitdiff
path: root/gold/configure.ac
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2010-04-27 14:12:30 +0000
committerNick Clifton <nickc@redhat.com>2010-04-27 14:12:30 +0000
commit0cc041c9757d5c6c038524224400ab0eb89bbc61 (patch)
tree8e264ffaca82e192532af81cc34839a2fa460790 /gold/configure.ac
parentf66e85b3c6f83b2f6125c28a9dd515c48610fe2a (diff)
downloadbinutils-redhat-0cc041c9757d5c6c038524224400ab0eb89bbc61.tar.gz
gold:
* configure.ac (install_as_default): Define and set to false unless --enable-gold or --enable-gold=both/gold has been specified. * configure: Regenerate. * Makefile.am (install-exec-local): Install the executable as 'ld.gold'. If install_as_default is true then also install it as 'ld'. * Makefile.in: Regenerated. ld: * configure.in (install_as_default): Define and set to true unless --enable-gold=both/gold has been specified. * configure: Regenerate. * Makefile.am (transform): Use ld.bfd as the default name of the linker. (install-exec-local): Also install the executable as a binary named 'ld' if install_as_default is true. * Makefile.in: Regenerate.
Diffstat (limited to 'gold/configure.ac')
-rw-r--r--gold/configure.ac27
1 files changed, 27 insertions, 0 deletions
diff --git a/gold/configure.ac b/gold/configure.ac
index 72db25db16..67d179670a 100644
--- a/gold/configure.ac
+++ b/gold/configure.ac
@@ -38,6 +38,33 @@ 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.
+AC_ARG_ENABLE(gold,
+[[ --enable-gold[=ARG] build gold [ARG={both}[/{gold,ld}]]]],
+[case "${enableval}" in
+ yes)
+ install_as_default=gold
+ installed_linker=ld
+ ;;
+ both/gold)
+ install_as_default=yes
+ installed_linker=ld.gold
+ ;;
+ both|both/ld)
+ install_as_default=no
+ installed_linker=ld.gold
+ ;;
+ *)
+ AC_MSG_ERROR([invalid --enable-gold argument])
+ ;;
+ esac],
+[install_as_default=gold
+ installed_linker=ld])
+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],