This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


I would like to push this libgomp patch upstream.  We need it to pass
sysroot to GCC when testing libgomp.

Tested on x86_64.  OK for trunk?


Thanks.  Diego.


---------- Forwarded message ----------
From: Simon Baldwin <simonb@google.com>
Date: Fri, Jan 28, 2011 at 11:30
Subject: [google] Pass CC to the libgomp testsuite to capture -sysroot
To: gcc-patches@gcc.gnu.org


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


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@"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]