Patchwork [google] Pass CC to the libgomp testsuite to capture -sysroot

login
register
mail settings
Submitter Simon Baldwin
Date Jan. 28, 2011, 4:30 p.m.
Message ID <20110128163056.9AF5D1C6D15@hpgntab-ubiq73.eem.corp.google.com>
Download mbox | patch
Permalink /patch/80871/
State New
Headers show

Comments

Simon Baldwin - Jan. 28, 2011, 4:30 p.m.
Pass CC to the libgomp testsuite to capture -sysroot.

Pass CC to the libgomp testsuite.  This is required for running tests where
gcc is configured with a custom sysroot, and CC therefore includes a -sysroot
flag.

Targeted for the google/integration branch.

libgomp/ChangeLog.google:
2011-01-28  Simon Baldwin  <simonb@google.com>

	* configure.ac: Add testsuite/gompconfig.exp to config files.
	* configure: Rebuild from configure.ac.
	* testsuite/config/default.exp: Load gompconfig.exp.
	* testsuite/lib/libgomp.exp (libgomp_init): Exec all of $CC_UNDER_TEST.
	* libgomp/testsuite/gompconfig.exp.in: New.

Google ref: 39294
Diego Novillo - Jan. 28, 2011, 4:33 p.m.
On Fri, Jan 28, 2011 at 11:30, Simon Baldwin <simonb@google.com> wrote:

> libgomp/ChangeLog.google:
> 2011-01-28  Simon Baldwin  <simonb@google.com>
>
>        * configure.ac: Add testsuite/gompconfig.exp to config files.
>        * configure: Rebuild from configure.ac.
>        * testsuite/config/default.exp: Load gompconfig.exp.
>        * testsuite/lib/libgomp.exp (libgomp_init): Exec all of $CC_UNDER_TEST.
>        * libgomp/testsuite/gompconfig.exp.in: New.

OK.


Diego.

Patch

Index: libgomp/configure
===================================================================
--- libgomp/configure	(revision 169355)
+++ libgomp/configure	(working copy)
@@ -16279,6 +16279,8 @@  ac_config_files="$ac_config_files omp.h 
 
 ac_config_files="$ac_config_files Makefile testsuite/Makefile libgomp.spec"
 
+ac_config_files="$ac_config_files testsuite/gompconfig.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
@@ -17423,6 +17425,7 @@  do
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
     "libgomp.spec") CONFIG_FILES="$CONFIG_FILES libgomp.spec" ;;
+    "testsuite/gompconfig.exp") CONFIG_FILES="$CONFIG_FILES testsuite/gompconfig.exp" ;;
 
   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
Index: libgomp/configure.ac
===================================================================
--- libgomp/configure.ac	(revision 169355)
+++ libgomp/configure.ac	(working copy)
@@ -347,4 +347,5 @@  CFLAGS="$save_CFLAGS"
 
 AC_CONFIG_FILES(omp.h omp_lib.h omp_lib.f90 libgomp_f.h)
 AC_CONFIG_FILES(Makefile testsuite/Makefile libgomp.spec)
+AC_CONFIG_FILES(testsuite/gompconfig.exp)
 AC_OUTPUT
Index: libgomp/testsuite/config/default.exp
===================================================================
--- libgomp/testsuite/config/default.exp	(revision 169355)
+++ libgomp/testsuite/config/default.exp	(working copy)
@@ -15,3 +15,4 @@ 
 # <http://www.gnu.org/licenses/>.
 
 load_lib "standard.exp"
+load_lib "gompconfig.exp"
Index: libgomp/testsuite/lib/libgomp.exp
===================================================================
--- libgomp/testsuite/lib/libgomp.exp	(revision 169355)
+++ libgomp/testsuite/lib/libgomp.exp	(working copy)
@@ -110,10 +110,9 @@  proc libgomp_init { args } {
 	    append always_ld_library_path ":${gccdir}/pthread"
 	}
 	append always_ld_library_path ":${gccdir}"
-	set compiler [lindex $GCC_UNDER_TEST 0]
 
-	if { [is_remote host] == 0 && [which $compiler] != 0 } {
-	  foreach i "[exec $compiler --print-multi-lib]" {
+	if { [is_remote host] == 0 } {
+	  foreach i "[eval "exec $GCC_UNDER_TEST --print-multi-lib"]" {
 	    set mldir ""
 	    regexp -- "\[a-z0-9=_/\.-\]*;" $i mldir
 	    set mldir [string trimright $mldir "\;@"]
Index: libgomp/testsuite/gompconfig.exp.in
===================================================================
--- libgomp/testsuite/gompconfig.exp.in	(revision 0)
+++ libgomp/testsuite/gompconfig.exp.in	(revision 0)
@@ -0,0 +1,2 @@ 
+global GCC_UNDER_TEST
+set GCC_UNDER_TEST "@CC@"