This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] use gold/configure.tgt to calc supported targets
- From: Mike Frysinger <vapier at gentoo dot org>
- To: binutils at sourceware dot org, ccoutant at google dot com
- Date: Mon, 20 Apr 2015 01:57:09 -0400
- Subject: [PATCH] use gold/configure.tgt to calc supported targets
- Authentication-results: sourceware.org; auth=none
Rather than maintain two lists, re-use gold's target file to determine
whether the current target is supported.
2015-04-20 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Replace $target checks with gold/configure.tgt.
* configure: Regenerate.
---
configure | 20 ++++++++++----------
configure.ac | 20 ++++++++++----------
2 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/configure b/configure
index 2549945..2d91a22 100755
--- a/configure
+++ b/configure
@@ -2968,16 +2968,16 @@ case "${ENABLE_GOLD}" in
if test "$is_elf" = "yes"; then
# Check for target supported by gold.
- case "${target}" in
- i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-* \
- | aarch64*-*-* | tilegx*-*-* | mips*-*-*)
- configdirs="$configdirs gold"
- if test x${ENABLE_GOLD} = xdefault; then
- default_ld=gold
- fi
- ENABLE_GOLD=yes
- ;;
- esac
+ if (srcdir=${srcdir}/gold; \
+ targ=${target}; \
+ . ${srcdir}/configure.tgt; \
+ test "$targ_obj" != "UNKNOWN"); then
+ configdirs="$configdirs gold"
+ if test x${ENABLE_GOLD} = xdefault; then
+ default_ld=gold
+ fi
+ ENABLE_GOLD=yes
+ fi
fi
;;
no)
diff --git a/configure.ac b/configure.ac
index 0fe176b..a350fb4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -349,16 +349,16 @@ case "${ENABLE_GOLD}" in
if test "$is_elf" = "yes"; then
# Check for target supported by gold.
- case "${target}" in
- i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-* \
- | aarch64*-*-* | tilegx*-*-* | mips*-*-*)
- configdirs="$configdirs gold"
- if test x${ENABLE_GOLD} = xdefault; then
- default_ld=gold
- fi
- ENABLE_GOLD=yes
- ;;
- esac
+ if (srcdir=${srcdir}/gold; \
+ targ=${target}; \
+ . ${srcdir}/configure.tgt; \
+ test "$targ_obj" != "UNKNOWN"); then
+ configdirs="$configdirs gold"
+ if test x${ENABLE_GOLD} = xdefault; then
+ default_ld=gold
+ fi
+ ENABLE_GOLD=yes
+ fi
fi
;;
no)
--
2.3.5