public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] use gold/configure.tgt to calc supported targets
@ 2015-04-21  1:25 Mike Frysinger
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2015-04-21  1:25 UTC (permalink / raw)
  To: gcc-patches; +Cc: ccoutant, iant

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-04-21  1:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-21  1:25 [PATCH] use gold/configure.tgt to calc supported targets Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).