summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2008-03-21 15:42:41 +0000
committerIan Lance Taylor <ian@airs.com>2008-03-21 15:42:41 +0000
commit727caf5e63aaaecfed16f8bb97c8ae2c9c2a4545 (patch)
tree2a95cc9a8e3f97bc88f43f4c811f6ef5fa66a4f4 /configure
parente26d4300144d42a315adbc715b5765335815c9c2 (diff)
downloadgdb-727caf5e63aaaecfed16f8bb97c8ae2c9c2a4545.tar.gz
Copy this patch over from master gcc repository:
* configure.ac: Add support for --enable-gold. * Makefile.def: Add gold as a directory like ld. * configure, Makefile.in: Regenerate.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure41
1 files changed, 39 insertions, 2 deletions
diff --git a/configure b/configure
index 56b80aeeb9d..32d003cd354 100755
--- a/configure
+++ b/configure
@@ -931,6 +931,7 @@ if test -n "$ac_init_help"; then
Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-gold use gold instead of ld
--enable-libada build libada directory
--enable-libssp build libssp directory
--enable-stage1-languages[=all] choose additional languages to build during
@@ -1864,6 +1865,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".
host_tools="texinfo 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.
@@ -1967,7 +1969,7 @@ use_gnu_ld=
# Make sure we don't let GNU ld be added if we didn't want it.
if test x$with_gnu_ld = xno ; then
use_gnu_ld=no
- noconfigdirs="$noconfigdirs ld"
+ noconfigdirs="$noconfigdirs ld gold"
fi
use_gnu_as=
@@ -2018,6 +2020,41 @@ case ${with_newlib} in
yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;;
esac
+# Handle --enable-gold.
+
+# Check whether --enable-gold or --disable-gold was given.
+if test "${enable_gold+set}" = set; then
+ enableval="$enable_gold"
+ ENABLE_GOLD=$enableval
+else
+ ENABLE_GOLD=no
+fi;
+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.
+ case "${target}" in
+ i?86-*-* | x86_64-*-*)
+ configdirs="`echo " ${configdirs} " | sed -e 's/ ld / gold /'`"
+ ;;
+ esac
+ fi
+fi
+
# Configure extra directories which are host specific
case "${host}" in
@@ -5242,7 +5279,7 @@ if test x${use_gnu_as} = x &&
fi
if test x${use_gnu_ld} = x &&
- echo " ${configdirs} " | grep " ld " > /dev/null 2>&1 ; then
+ echo " ${configdirs} " | egrep " (go)?ld " > /dev/null 2>&1 ; then
with_gnu_ld=yes
extra_host_args="$extra_host_args --with-gnu-ld"
fi