From 4fda8867e90e3f6a43fcbd9a6f25280315648f46 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Tue, 27 Apr 2010 14:12:32 +0000 Subject: 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. --- ld/configure.in | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'ld/configure.in') diff --git a/ld/configure.in b/ld/configure.in index 2abfba4..90baeca 100644 --- a/ld/configure.in +++ b/ld/configure.in @@ -69,6 +69,29 @@ AC_SUBST(use_sysroot) AC_SUBST(TARGET_SYSTEM_ROOT) AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE) +dnl Use --enable-gold to decide if this linker should be the default. +dnl "install_as_default" is set to false if gold is the default linker. +dnl "installed_linker" is the installed BFD linker name. +AC_ARG_ENABLE(gold, +[[ --enable-gold[=ARG] build gold [ARG={both}[/{gold,ld}]]]], +[case "${enableval}" in + yes|both/gold) + install_as_default=no + installed_linker=ld.bfd + ;; + both|both/ld) + install_as_default=yes + installed_linker=ld.bfd + ;; + *) + AC_MSG_ERROR([invalid --enable-gold argument]) + ;; + esac], +[install_as_default=ld + installed_linker=ld]) +AC_SUBST(install_as_default) +AC_SUBST(installed_linker) + AC_ARG_ENABLE([got], AS_HELP_STRING([--enable-got=], [GOT handling scheme (target, single, negative, multigot)]), -- cgit v1.1