aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2010-11-23 13:39:57 +0000
committerNick Clifton <nickc@redhat.com>2010-11-23 13:39:57 +0000
commitc77912127fd71c822df5b03a3190cddd19b1dd4f (patch)
tree41bb4118ae77e8f2b79d8b2870ecf911014a4a2a /configure.ac
parentea976c60e229b7d4ccfbf4a735a09c407f104a20 (diff)
downloadgdb-c77912127fd71c822df5b03a3190cddd19b1dd4f.zip
gdb-c77912127fd71c822df5b03a3190cddd19b1dd4f.tar.gz
gdb-c77912127fd71c822df5b03a3190cddd19b1dd4f.tar.bz2
* configure.ac: For --enable-gold, handle value `default' instead of
`both*'. New configure option --{en,dis}able-ld. ld, gold/ * configure.ac: For --enable-gold, handle value `default' instead of `both*'. Always install ld as ld.gold, install as ld if gold is the default.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac66
1 files changed, 47 insertions, 19 deletions
diff --git a/configure.ac b/configure.ac
index 0a5c276..626bb4e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -324,19 +324,27 @@ case ${with_newlib} in
yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
esac
-# Handle --enable-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
-
+# Handle --enable-gold, --enable-ld.
+# --disable-gold [--enable-ld]
+# Build only ld. Default option.
+# --enable-gold[=default] [--enable-ld]
+# Build both gold and ld. Install gold as "ld.gold" and "ld",
+# install ld as "ld.bfd".
+# --enable-gold[=default] --disable-ld
+# Build only gold, which is then installed as both "ld.gold" and "ld".
+# --enable-gold --enable-ld=default
+# Build both gold (installed as "gold") and ld (installed as "ld").
+# In other words, ld is default
+# --enable-gold=default --enable-ld=default
+# Error.
+
+default_ld=
AC_ARG_ENABLE(gold,
-[[ --enable-gold[=ARG] build gold [ARG={both}[/{gold,ld}]]]],
+[[ --enable-gold[=ARG] build gold [ARG={default,yes,no}]]],
ENABLE_GOLD=$enableval,
ENABLE_GOLD=no)
- case "${ENABLE_GOLD}" in
- yes|both|both/gold|both/ld)
+case "${ENABLE_GOLD}" in
+ yes|default)
# Check for ELF target.
is_elf=no
case "${target}" in
@@ -356,14 +364,10 @@ ENABLE_GOLD=no)
# 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
+ configdirs="$configdirs gold"
+ if test x${ENABLE_GOLD} = xdefault; then
+ default_ld=gold
+ fi
ENABLE_GOLD=yes
;;
esac
@@ -374,7 +378,31 @@ ENABLE_GOLD=no)
*)
AC_MSG_ERROR([invalid --enable-gold argument])
;;
- esac
+esac
+
+AC_ARG_ENABLE(ld,
+[[ --enable-ld[=ARG] build ld [ARG={default,yes,no}]]],
+ENABLE_LD=$enableval,
+ENABLE_LD=yes)
+
+case "${ENABLE_LD}" in
+ default)
+ if test x${default_ld} != xgold; then
+ AC_MSG_ERROR([either gold or ld can be the default ld])
+ fi
+ ;;
+ yes)
+ ;;
+ no)
+ if test x${ENABLE_GOLD} != xyes; then
+ AC_MSG_WARN([neither ld nor gold are enabled])
+ fi
+ configdirs=`echo " ${configdirs} " | sed -e 's/ ld / /'`
+ ;;
+ *)
+ AC_MSG_ERROR([invalid --enable-ld argument])
+ ;;
+esac
# Configure extra directories which are host specific