Rather than maintain two lists, re-use gold's target file to determine whether the current target is supported.
2015-04-20 Mike Frysinger <vap...@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