summaryrefslogtreecommitdiffstats
path: root/binutils-2.19/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'binutils-2.19/configure.ac')
-rw-r--r--binutils-2.19/configure.ac78
1 files changed, 49 insertions, 29 deletions
diff --git a/binutils-2.19/configure.ac b/binutils-2.19/configure.ac
index c31e255..a5b844a 100644
--- a/binutils-2.19/configure.ac
+++ b/binutils-2.19/configure.ac
@@ -165,7 +165,7 @@ host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib l
# know that we are building the simulator.
# binutils, gas and ld appear in that order because it makes sense to run
# "make check" in that particular order.
-# If --enable-gold is used, "gold" will replace "ld".
+# If --enable-gold is used, "gold" may replace "ld".
host_tools="byacc flex bison binutils gas ld fixincludes gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"
# libgcj represents the runtime libraries only used by gcj.
@@ -294,37 +294,57 @@ case ${with_newlib} in
esac
# Handle --enable-gold.
-
-AC_ARG_ENABLE(gold,
-[ --enable-gold use gold instead of ld],
-ENABLE_GOLD=$enableval,
-ENABLE_GOLD=no)
-if test "${ENABLE_GOLD}" = "yes"; then
- # Check for ELF target.
- is_elf=no
- case "${target}" in
- *-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \
- | *-*-linux* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \
- | *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-solaris2*)
- case "${target}" in
- *-*-linux*aout* | *-*-linux*oldld*)
- ;;
- *)
- is_elf=yes
- ;;
- esac
- esac
-
- if test "$is_elf" = "yes"; then
- # Check for target supported by gold.
+# --enable-gold Build only gold
+# --disable-gold [default] Build only ld
+# --enable-gold=both Build both gold and ld, ld is default
+# --enable-gold=both/ld Same
+# --enable-gold=both/gold Build both gold and ld, gold is default, ld is renamed ld.bfd
+
+ AC_ARG_ENABLE(gold,
+[[ --enable-gold[=ARG] build gold [ARG={both}[/{gold,ld}]]]],
+ ENABLE_GOLD=$enableval,
+ ENABLE_GOLD=no)
+ case "${ENABLE_GOLD}" in
+ yes|both|both/gold|both/ld)
+ # Check for ELF target.
+ is_elf=no
case "${target}" in
- i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-*)
- configdirs="`echo " ${configdirs} " | sed -e 's/ ld / gold /'`"
- ;;
+ *-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \
+ | *-*-linux* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \
+ | *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-solaris2* | *-*-nto*)
+ case "${target}" in
+ *-*-linux*aout* | *-*-linux*oldld*)
+ ;;
+ *)
+ is_elf=yes
+ ;;
+ esac
esac
- fi
-fi
+ if test "$is_elf" = "yes"; then
+ # Check for target supported by gold.
+ case "${target}" in
+ i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-*)
+ case "${ENABLE_GOLD}" in
+ both*)
+ configdirs="$configdirs gold"
+ ;;
+ *)
+ configdirs="`echo " ${configdirs} " | sed -e 's/ ld / gold /'`"
+ ;;
+ esac
+ ENABLE_GOLD=yes
+ ;;
+ esac
+ fi
+ ;;
+ no)
+ ;;
+ *)
+ AC_MSG_ERROR([invalid --enable-gold argument])
+ ;;
+ esac
+
# Configure extra directories which are host specific
case "${host}" in