diff options
author | Nick Clifton <nickc@redhat.com> | 2010-11-23 13:39:57 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2010-11-23 13:39:57 +0000 |
commit | c77912127fd71c822df5b03a3190cddd19b1dd4f (patch) | |
tree | 41bb4118ae77e8f2b79d8b2870ecf911014a4a2a /configure | |
parent | ea976c60e229b7d4ccfbf4a735a09c407f104a20 (diff) | |
download | fsf-binutils-gdb-c77912127fd71c822df5b03a3190cddd19b1dd4f.zip fsf-binutils-gdb-c77912127fd71c822df5b03a3190cddd19b1dd4f.tar.gz fsf-binutils-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')
-rwxr-xr-x | configure | 72 |
1 files changed, 53 insertions, 19 deletions
@@ -741,6 +741,7 @@ ac_user_opts=' enable_option_checking with_build_libsubdir enable_gold +enable_ld enable_libada enable_libssp enable_build_with_cxx @@ -1450,7 +1451,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-gold[=ARG] build gold [ARG={default,yes,no}] + --enable-ld[=ARG] build ld [ARG={default,yes,no}] --enable-libada build libada directory --enable-libssp build libssp directory --enable-build-with-cxx build with C++ compiler instead of C compiler @@ -2849,13 +2851,21 @@ 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= # Check whether --enable-gold was given. if test "${enable_gold+set}" = set; then : enableval=$enable_gold; ENABLE_GOLD=$enableval @@ -2863,8 +2873,8 @@ else ENABLE_GOLD=no fi - 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 @@ -2884,14 +2894,10 @@ fi # 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 @@ -2902,7 +2908,35 @@ fi *) as_fn_error "invalid --enable-gold argument" "$LINENO" 5 ;; - esac +esac + +# Check whether --enable-ld was given. +if test "${enable_ld+set}" = set; then : + enableval=$enable_ld; ENABLE_LD=$enableval +else + ENABLE_LD=yes +fi + + +case "${ENABLE_LD}" in + default) + if test x${default_ld} != xgold; then + as_fn_error "either gold or ld can be the default ld" "$LINENO" 5 + fi + ;; + yes) + ;; + no) + if test x${ENABLE_GOLD} != xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: neither ld nor gold are enabled" >&5 +$as_echo "$as_me: WARNING: neither ld nor gold are enabled" >&2;} + fi + configdirs=`echo " ${configdirs} " | sed -e 's/ ld / /'` + ;; + *) + as_fn_error "invalid --enable-ld argument" "$LINENO" 5 + ;; +esac # Configure extra directories which are host specific |