Patchwork [google/gcc-4_8] Fix libatomic testsuite for when GCC_UNDER_TEST is not plain xgcc

login
register
mail settings
Submitter Simon Baldwin
Date May 1, 2013, 2:04 p.m.
Message ID <20130501140405.61FC69BA1E@hpbd-ubiq34.eem.corp.google.com>
Download mbox | patch
Permalink /patch/240771/
State New
Headers show

Comments

Simon Baldwin - May 1, 2013, 2:04 p.m.
Fix libatomic testsuite for when GCC_UNDER_TEST is not plain xgcc.

Libatomic tests fail if GCC_UNDER_TEST is set to something other than a plain
xgcc invocation (for example, when $CC requires a special -sysroot).  Fix
testsuite files so that it uniformly uses CC_UNDER_TEST rather than any result
from libgloss find_gcc.

Okay for google/gcc-4_8?  google/main?

2013-05-01    <simonb@google.com>

	* libatomic/configure: Regenerate.
	* libatomic/configure.ac: Add testsuite/atomicconfig.exp config file.
	* libatomic/testsuite/atomicconfig.exp.in: New.
	* libatomic/testsuite/config/default.exp: Load atomicconfig.exp.
	* libatomic/testsuite/lib/libatomic.exp: Print multi-lib using
	the full value of $GCC_UNDER_TEST.
Ollie Wild - May 1, 2013, 2:47 p.m.
On Wed, May 1, 2013 at 9:04 AM, Simon Baldwin <simonb@google.com> wrote:
> Fix libatomic testsuite for when GCC_UNDER_TEST is not plain xgcc.
>
> Libatomic tests fail if GCC_UNDER_TEST is set to something other than a plain
> xgcc invocation (for example, when $CC requires a special -sysroot).  Fix
> testsuite files so that it uniformly uses CC_UNDER_TEST rather than any result
> from libgloss find_gcc.
>
> Okay for google/gcc-4_8?  google/main?

Any reason to not also submit this to trunk?

Ollie
Simon Baldwin - May 21, 2013, 7 p.m.
Ping.  Also, any thoughts on suitability of this (or otherwise) for trunk?


On 1 May 2013 16:04, Simon Baldwin <simonb@google.com> wrote:
> Fix libatomic testsuite for when GCC_UNDER_TEST is not plain xgcc.
>
> Libatomic tests fail if GCC_UNDER_TEST is set to something other than a plain
> xgcc invocation (for example, when $CC requires a special -sysroot).  Fix
> testsuite files so that it uniformly uses CC_UNDER_TEST rather than any result
> from libgloss find_gcc.
>
> Okay for google/gcc-4_8?  google/main?
>
> 2013-05-01    <simonb@google.com>
>
>         * libatomic/configure: Regenerate.
>         * libatomic/configure.ac: Add testsuite/atomicconfig.exp config file.
>         * libatomic/testsuite/atomicconfig.exp.in: New.
>         * libatomic/testsuite/config/default.exp: Load atomicconfig.exp.
>         * libatomic/testsuite/lib/libatomic.exp: Print multi-lib using
>         the full value of $GCC_UNDER_TEST.
>
>
> Index: libatomic/configure
> ===================================================================
> --- libatomic/configure (revision 198464)
> +++ libatomic/configure (working copy)
> @@ -655,6 +655,7 @@ CCAS
>  am__fastdepCC_FALSE
>  am__fastdepCC_TRUE
>  CCDEPMODE
> +am__nodep
>  AMDEPBACKSLASH
>  AMDEP_FALSE
>  AMDEP_TRUE
> @@ -3044,11 +3045,11 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}ma
>
>  # We need awk for the "check" target.  The system "awk" is bad on
>  # some platforms.
> -# Always define AMTAR for backward compatibility.
> +# Always define AMTAR for backward compatibility.  Yes, it's still used
> +# in the wild :-(  We should find a proper way to deprecate it ...
> +AMTAR='$${TAR-tar}'
>
> -AMTAR=${AMTAR-"${am_missing_run}tar"}
> -
> -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
> +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
>
>
>
> @@ -3946,6 +3947,7 @@ fi
>  if test "x$enable_dependency_tracking" != xno; then
>    am_depcomp="$ac_aux_dir/depcomp"
>    AMDEPBACKSLASH='\'
> +  am__nodep='_no'
>  fi
>   if test "x$enable_dependency_tracking" != xno; then
>    AMDEP_TRUE=
> @@ -3970,6 +3972,7 @@ else
>    # instance it was reported that on HP-UX the gcc test will end up
>    # making a dummy file named `D' -- because `-MD' means `put the output
>    # in D'.
> +  rm -rf conftest.dir
>    mkdir conftest.dir
>    # Copy depcomp to subdir because otherwise we won't find it if we're
>    # using a relative directory.
> @@ -4029,7 +4032,7 @@ else
>         break
>        fi
>        ;;
> -    msvisualcpp | msvcmsys)
> +    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
>        # This compiler won't grok `-c -o', but also, the minuso test has
>        # not run yet.  These depmodes are late enough in the game, and
>        # so weak that their functioning should not be impacted.
> @@ -4104,6 +4107,7 @@ else
>    # instance it was reported that on HP-UX the gcc test will end up
>    # making a dummy file named `D' -- because `-MD' means `put the output
>    # in D'.
> +  rm -rf conftest.dir
>    mkdir conftest.dir
>    # Copy depcomp to subdir because otherwise we won't find it if we're
>    # using a relative directory.
> @@ -4161,7 +4165,7 @@ else
>         break
>        fi
>        ;;
> -    msvisualcpp | msvcmsys)
> +    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
>        # This compiler won't grok `-c -o', but also, the minuso test has
>        # not run yet.  These depmodes are late enough in the game, and
>        # so weak that their functioning should not be impacted.
> @@ -7614,7 +7618,22 @@ fi
>
>  # Check whether --with-pic was given.
>  if test "${with_pic+set}" = set; then :
> -  withval=$with_pic; pic_mode="$withval"
> +  withval=$with_pic; p=${PACKAGE-default}
> +    case "$withval" in
> +    yes|no) pic_mode="$withval" ;;
> +    *)
> +      pic_mode=default
> +      # Look at the argument we got.  We use all the common list separators.
> +      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
> +      for pkg in $withval; do
> +       IFS="$lt_save_ifs"
> +       if test "X$pkg" = "X$p"; then
> +         pic_mode=yes
> +       fi
> +      done
> +      IFS="$lt_save_ifs"
> +      ;;
> +    esac
>  else
>    pic_mode=default
>  fi
> @@ -11013,7 +11032,7 @@ else
>    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
>    lt_status=$lt_dlunknown
>    cat > conftest.$ac_ext <<_LT_EOF
> -#line 11016 "configure"
> +#line 11035 "configure"
>  #include "confdefs.h"
>
>  #if HAVE_DLFCN_H
> @@ -11119,7 +11138,7 @@ else
>    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
>    lt_status=$lt_dlunknown
>    cat > conftest.$ac_ext <<_LT_EOF
> -#line 11122 "configure"
> +#line 11141 "configure"
>  #include "confdefs.h"
>
>  #if HAVE_DLFCN_H
> @@ -15125,6 +15144,8 @@ fi
>
>  ac_config_files="$ac_config_files Makefile testsuite/Makefile"
>
> +ac_config_files="$ac_config_files testsuite/atomicconfig.exp"
> +
>  cat >confcache <<\_ACEOF
>  # This file is a shell script that caches the results of configure
>  # tests run on this system so they can be shared between configure
> @@ -16173,6 +16194,7 @@ do
>      "gstdint.h") CONFIG_COMMANDS="$CONFIG_COMMANDS gstdint.h" ;;
>      "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
>      "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
> +    "testsuite/atomicconfig.exp") CONFIG_FILES="$CONFIG_FILES testsuite/atomicconfig.exp" ;;
>
>    *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
>    esac
> Index: libatomic/configure.ac
> ===================================================================
> --- libatomic/configure.ac      (revision 198464)
> +++ libatomic/configure.ac      (working copy)
> @@ -254,4 +254,5 @@ else
>  fi
>
>  AC_CONFIG_FILES(Makefile testsuite/Makefile)
> +AC_CONFIG_FILES(testsuite/atomicconfig.exp)
>  AC_OUTPUT
> Index: libatomic/testsuite/atomicconfig.exp.in
> ===================================================================
> --- libatomic/testsuite/atomicconfig.exp.in     (revision 0)
> +++ libatomic/testsuite/atomicconfig.exp.in     (revision 0)
> @@ -0,0 +1,2 @@
> +global GCC_UNDER_TEST
> +set GCC_UNDER_TEST "@CC@"
> Index: libatomic/testsuite/config/default.exp
> ===================================================================
> --- libatomic/testsuite/config/default.exp      (revision 198464)
> +++ libatomic/testsuite/config/default.exp      (working copy)
> @@ -15,3 +15,4 @@
>  # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
>
>  load_lib "standard.exp"
> +load_lib "atomicconfig.exp"
> Index: libatomic/testsuite/lib/libatomic.exp
> ===================================================================
> --- libatomic/testsuite/lib/libatomic.exp       (revision 198464)
> +++ libatomic/testsuite/lib/libatomic.exp       (working copy)
> @@ -120,7 +120,7 @@ proc libatomic_init { args } {
>         set compiler [lindex $GCC_UNDER_TEST 0]
>
>         if { [is_remote host] == 0 && [which $compiler] != 0 } {
> -         foreach i "[exec $compiler --print-multi-lib]" {
> +         foreach i "[eval "exec $GCC_UNDER_TEST --print-multi-lib"]" {
>             set mldir ""
>             regexp -- "\[a-z0-9=_/\.-\]*;" $i mldir
>             set mldir [string trimright $mldir "\;@"]
Diego Novillo - May 21, 2013, 7:28 p.m.
On 2013-05-21 15:00 , Simon Baldwin wrote:
> Ping.  Also, any thoughts on suitability of this (or otherwise) for trunk?
>
>
> On 1 May 2013 16:04, Simon Baldwin <simonb@google.com> wrote:
>> Fix libatomic testsuite for when GCC_UNDER_TEST is not plain xgcc.
>>
>> Libatomic tests fail if GCC_UNDER_TEST is set to something other than a plain
>> xgcc invocation (for example, when $CC requires a special -sysroot).  Fix
>> testsuite files so that it uniformly uses CC_UNDER_TEST rather than any result
>> from libgloss find_gcc.
>>
>> Okay for google/gcc-4_8?  google/main?
>>
>> 2013-05-01    <simonb@google.com>
>>
>>          * libatomic/configure: Regenerate.
>>          * libatomic/configure.ac: Add testsuite/atomicconfig.exp config file.
>>          * libatomic/testsuite/atomicconfig.exp.in: New.
>>          * libatomic/testsuite/config/default.exp: Load atomicconfig.exp.
>>          * libatomic/testsuite/lib/libatomic.exp: Print multi-lib using
>>          the full value of $GCC_UNDER_TEST.
>>
>>
>> Index: libatomic/configure
>> ===================================================================
>> --- libatomic/configure (revision 198464)
>> +++ libatomic/configure (working copy)
>> @@ -655,6 +655,7 @@ CCAS
>>   am__fastdepCC_FALSE
>>   am__fastdepCC_TRUE
>>   CCDEPMODE
>> +am__nodep
>>   AMDEPBACKSLASH
>>   AMDEP_FALSE
>>   AMDEP_TRUE
>> @@ -3044,11 +3045,11 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}ma
>>
>>   # We need awk for the "check" target.  The system "awk" is bad on
>>   # some platforms.
>> -# Always define AMTAR for backward compatibility.
>> +# Always define AMTAR for backward compatibility.  Yes, it's still used
>> +# in the wild :-(  We should find a proper way to deprecate it ...
>> +AMTAR='$${TAR-tar}'
>>
>> -AMTAR=${AMTAR-"${am_missing_run}tar"}
>> -
>> -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
>> +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
>>
>>
>>
>> @@ -3946,6 +3947,7 @@ fi
>>   if test "x$enable_dependency_tracking" != xno; then
>>     am_depcomp="$ac_aux_dir/depcomp"
>>     AMDEPBACKSLASH='\'
>> +  am__nodep='_no'
>>   fi
>>    if test "x$enable_dependency_tracking" != xno; then
>>     AMDEP_TRUE=
>> @@ -3970,6 +3972,7 @@ else
>>     # instance it was reported that on HP-UX the gcc test will end up
>>     # making a dummy file named `D' -- because `-MD' means `put the output
>>     # in D'.
>> +  rm -rf conftest.dir
>>     mkdir conftest.dir
>>     # Copy depcomp to subdir because otherwise we won't find it if we're
>>     # using a relative directory.
>> @@ -4029,7 +4032,7 @@ else
>>          break
>>         fi
>>         ;;
>> -    msvisualcpp | msvcmsys)
>> +    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
>>         # This compiler won't grok `-c -o', but also, the minuso test has
>>         # not run yet.  These depmodes are late enough in the game, and
>>         # so weak that their functioning should not be impacted.
>> @@ -4104,6 +4107,7 @@ else
>>     # instance it was reported that on HP-UX the gcc test will end up
>>     # making a dummy file named `D' -- because `-MD' means `put the output
>>     # in D'.
>> +  rm -rf conftest.dir
>>     mkdir conftest.dir
>>     # Copy depcomp to subdir because otherwise we won't find it if we're
>>     # using a relative directory.
>> @@ -4161,7 +4165,7 @@ else
>>          break
>>         fi
>>         ;;
>> -    msvisualcpp | msvcmsys)
>> +    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
>>         # This compiler won't grok `-c -o', but also, the minuso test has
>>         # not run yet.  These depmodes are late enough in the game, and
>>         # so weak that their functioning should not be impacted.
>> @@ -7614,7 +7618,22 @@ fi
>>
>>   # Check whether --with-pic was given.
>>   if test "${with_pic+set}" = set; then :
>> -  withval=$with_pic; pic_mode="$withval"
>> +  withval=$with_pic; p=${PACKAGE-default}
>> +    case "$withval" in
>> +    yes|no) pic_mode="$withval" ;;
>> +    *)
>> +      pic_mode=default
>> +      # Look at the argument we got.  We use all the common list separators.
>> +      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
>> +      for pkg in $withval; do
>> +       IFS="$lt_save_ifs"
>> +       if test "X$pkg" = "X$p"; then
>> +         pic_mode=yes
>> +       fi
>> +      done
>> +      IFS="$lt_save_ifs"
>> +      ;;
>> +    esac
>>   else
>>     pic_mode=default
>>   fi
>> @@ -11013,7 +11032,7 @@ else
>>     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
>>     lt_status=$lt_dlunknown
>>     cat > conftest.$ac_ext <<_LT_EOF
>> -#line 11016 "configure"
>> +#line 11035 "configure"
>>   #include "confdefs.h"
>>
>>   #if HAVE_DLFCN_H
>> @@ -11119,7 +11138,7 @@ else
>>     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
>>     lt_status=$lt_dlunknown
>>     cat > conftest.$ac_ext <<_LT_EOF
>> -#line 11122 "configure"
>> +#line 11141 "configure"
>>   #include "confdefs.h"
>>
>>   #if HAVE_DLFCN_H
>> @@ -15125,6 +15144,8 @@ fi
>>
>>   ac_config_files="$ac_config_files Makefile testsuite/Makefile"
>>
>> +ac_config_files="$ac_config_files testsuite/atomicconfig.exp"
>> +
>>   cat >confcache <<\_ACEOF
>>   # This file is a shell script that caches the results of configure
>>   # tests run on this system so they can be shared between configure
>> @@ -16173,6 +16194,7 @@ do
>>       "gstdint.h") CONFIG_COMMANDS="$CONFIG_COMMANDS gstdint.h" ;;
>>       "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
>>       "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
>> +    "testsuite/atomicconfig.exp") CONFIG_FILES="$CONFIG_FILES testsuite/atomicconfig.exp" ;;
>>
>>     *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
>>     esac
>> Index: libatomic/configure.ac
>> ===================================================================
>> --- libatomic/configure.ac      (revision 198464)
>> +++ libatomic/configure.ac      (working copy)
>> @@ -254,4 +254,5 @@ else
>>   fi
>>
>>   AC_CONFIG_FILES(Makefile testsuite/Makefile)
>> +AC_CONFIG_FILES(testsuite/atomicconfig.exp)
>>   AC_OUTPUT
>> Index: libatomic/testsuite/atomicconfig.exp.in
>> ===================================================================
>> --- libatomic/testsuite/atomicconfig.exp.in     (revision 0)
>> +++ libatomic/testsuite/atomicconfig.exp.in     (revision 0)
>> @@ -0,0 +1,2 @@
>> +global GCC_UNDER_TEST
>> +set GCC_UNDER_TEST "@CC@"
>> Index: libatomic/testsuite/config/default.exp
>> ===================================================================
>> --- libatomic/testsuite/config/default.exp      (revision 198464)
>> +++ libatomic/testsuite/config/default.exp      (working copy)
>> @@ -15,3 +15,4 @@
>>   # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
>>
>>   load_lib "standard.exp"
>> +load_lib "atomicconfig.exp"
>> Index: libatomic/testsuite/lib/libatomic.exp
>> ===================================================================
>> --- libatomic/testsuite/lib/libatomic.exp       (revision 198464)
>> +++ libatomic/testsuite/lib/libatomic.exp       (working copy)
>> @@ -120,7 +120,7 @@ proc libatomic_init { args } {
>>          set compiler [lindex $GCC_UNDER_TEST 0]
>>
>>          if { [is_remote host] == 0 && [which $compiler] != 0 } {
>> -         foreach i "[exec $compiler --print-multi-lib]" {
>> +         foreach i "[eval "exec $GCC_UNDER_TEST --print-multi-lib"]" {
>>              set mldir ""
>>              regexp -- "\[a-z0-9=_/\.-\]*;" $i mldir
>>              set mldir [string trimright $mldir "\;@"]
>
>

This is OK for google branches.  I'm tempted to say it's fine for trunk, 
but I would like to know what maintainers think.  Richard?


Diego.
Richard Henderson - May 21, 2013, 7:33 p.m.
On 05/21/2013 12:28 PM, Diego Novillo wrote:
> This is OK for google branches.  I'm tempted to say it's fine for trunk, but I
> would like to know what maintainers think.  Richard?

Looks plausible.

Irritating that we need another config file, rather than simply an environment
variable passed down from make, but tcl is irritating already so I won't
quibble.  If a testsuite maintainer can suggest something else, please do.
Otherwise fine by me.


r~

Patch

Index: libatomic/configure
===================================================================
--- libatomic/configure	(revision 198464)
+++ libatomic/configure	(working copy)
@@ -655,6 +655,7 @@  CCAS
 am__fastdepCC_FALSE
 am__fastdepCC_TRUE
 CCDEPMODE
+am__nodep
 AMDEPBACKSLASH
 AMDEP_FALSE
 AMDEP_TRUE
@@ -3044,11 +3045,11 @@  MAKEINFO=${MAKEINFO-"${am_missing_run}ma
 
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
-# Always define AMTAR for backward compatibility.
+# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
 
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
 
 
 
@@ -3946,6 +3947,7 @@  fi
 if test "x$enable_dependency_tracking" != xno; then
   am_depcomp="$ac_aux_dir/depcomp"
   AMDEPBACKSLASH='\'
+  am__nodep='_no'
 fi
  if test "x$enable_dependency_tracking" != xno; then
   AMDEP_TRUE=
@@ -3970,6 +3972,7 @@  else
   # instance it was reported that on HP-UX the gcc test will end up
   # making a dummy file named `D' -- because `-MD' means `put the output
   # in D'.
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
   # using a relative directory.
@@ -4029,7 +4032,7 @@  else
 	break
       fi
       ;;
-    msvisualcpp | msvcmsys)
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
       # This compiler won't grok `-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
       # so weak that their functioning should not be impacted.
@@ -4104,6 +4107,7 @@  else
   # instance it was reported that on HP-UX the gcc test will end up
   # making a dummy file named `D' -- because `-MD' means `put the output
   # in D'.
+  rm -rf conftest.dir
   mkdir conftest.dir
   # Copy depcomp to subdir because otherwise we won't find it if we're
   # using a relative directory.
@@ -4161,7 +4165,7 @@  else
 	break
       fi
       ;;
-    msvisualcpp | msvcmsys)
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
       # This compiler won't grok `-c -o', but also, the minuso test has
       # not run yet.  These depmodes are late enough in the game, and
       # so weak that their functioning should not be impacted.
@@ -7614,7 +7618,22 @@  fi
 
 # Check whether --with-pic was given.
 if test "${with_pic+set}" = set; then :
-  withval=$with_pic; pic_mode="$withval"
+  withval=$with_pic; p=${PACKAGE-default}
+    case "$withval" in
+    yes|no) pic_mode="$withval" ;;
+    *)
+      pic_mode=default
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $withval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  pic_mode=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
 else
   pic_mode=default
 fi
@@ -11013,7 +11032,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11016 "configure"
+#line 11035 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11119,7 +11138,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11122 "configure"
+#line 11141 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15125,6 +15144,8 @@  fi
 
 ac_config_files="$ac_config_files Makefile testsuite/Makefile"
 
+ac_config_files="$ac_config_files testsuite/atomicconfig.exp"
+
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
@@ -16173,6 +16194,7 @@  do
     "gstdint.h") CONFIG_COMMANDS="$CONFIG_COMMANDS gstdint.h" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
+    "testsuite/atomicconfig.exp") CONFIG_FILES="$CONFIG_FILES testsuite/atomicconfig.exp" ;;
 
   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
Index: libatomic/configure.ac
===================================================================
--- libatomic/configure.ac	(revision 198464)
+++ libatomic/configure.ac	(working copy)
@@ -254,4 +254,5 @@  else
 fi
 
 AC_CONFIG_FILES(Makefile testsuite/Makefile)
+AC_CONFIG_FILES(testsuite/atomicconfig.exp)
 AC_OUTPUT
Index: libatomic/testsuite/atomicconfig.exp.in
===================================================================
--- libatomic/testsuite/atomicconfig.exp.in	(revision 0)
+++ libatomic/testsuite/atomicconfig.exp.in	(revision 0)
@@ -0,0 +1,2 @@ 
+global GCC_UNDER_TEST
+set GCC_UNDER_TEST "@CC@"
Index: libatomic/testsuite/config/default.exp
===================================================================
--- libatomic/testsuite/config/default.exp	(revision 198464)
+++ libatomic/testsuite/config/default.exp	(working copy)
@@ -15,3 +15,4 @@ 
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
 load_lib "standard.exp"
+load_lib "atomicconfig.exp"
Index: libatomic/testsuite/lib/libatomic.exp
===================================================================
--- libatomic/testsuite/lib/libatomic.exp	(revision 198464)
+++ libatomic/testsuite/lib/libatomic.exp	(working copy)
@@ -120,7 +120,7 @@  proc libatomic_init { args } {
 	set compiler [lindex $GCC_UNDER_TEST 0]
 
 	if { [is_remote host] == 0 && [which $compiler] != 0 } {
-	  foreach i "[exec $compiler --print-multi-lib]" {
+	  foreach i "[eval "exec $GCC_UNDER_TEST --print-multi-lib"]" {
 	    set mldir ""
 	    regexp -- "\[a-z0-9=_/\.-\]*;" $i mldir
 	    set mldir [string trimright $mldir "\;@"]