public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [google] Pass CC to the libgomp testsuite to capture -sysroot
@ 2011-01-28 17:03 Simon Baldwin
  2011-01-28 17:25 ` Diego Novillo
  2011-09-16 20:48 ` [libgomp] " Diego Novillo
  0 siblings, 2 replies; 6+ messages in thread
From: Simon Baldwin @ 2011-01-28 17:03 UTC (permalink / raw)
  To: gcc-patches

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [google] Pass CC to the libgomp testsuite to capture -sysroot
  2011-01-28 17:03 [google] Pass CC to the libgomp testsuite to capture -sysroot Simon Baldwin
@ 2011-01-28 17:25 ` Diego Novillo
  2011-09-16 20:48 ` [libgomp] " Diego Novillo
  1 sibling, 0 replies; 6+ messages in thread
From: Diego Novillo @ 2011-01-28 17:25 UTC (permalink / raw)
  To: Simon Baldwin; +Cc: gcc-patches

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [libgomp] Pass CC to the libgomp testsuite to capture -sysroot
  2011-01-28 17:03 [google] Pass CC to the libgomp testsuite to capture -sysroot Simon Baldwin
  2011-01-28 17:25 ` Diego Novillo
@ 2011-09-16 20:48 ` Diego Novillo
  2011-09-16 20:56   ` Mike Stump
  1 sibling, 1 reply; 6+ messages in thread
From: Diego Novillo @ 2011-09-16 20:48 UTC (permalink / raw)
  To: Jakub Jelinek, gcc-patches, Richard Henderson

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [libgomp] Pass CC to the libgomp testsuite to capture -sysroot
  2011-09-16 20:48 ` [libgomp] " Diego Novillo
@ 2011-09-16 20:56   ` Mike Stump
  2011-09-16 21:05     ` Diego Novillo
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Stump @ 2011-09-16 20:56 UTC (permalink / raw)
  To: Diego Novillo; +Cc: Jakub Jelinek, gcc-patches, Richard Henderson

On Sep 16, 2011, at 1:13 PM, Diego Novillo wrote:
> I would like to push this libgomp patch upstream.  We need it to pass
> sysroot to GCC when testing libgomp.

I'd be curious if Ian likes this...  Can one still set GCC_UNDER_TEST in the site.exp file or do other unholy things with it after your patch?  I'm thinking about things like in tree testing v out of tree testing.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [libgomp] Pass CC to the libgomp testsuite to capture -sysroot
  2011-09-16 20:56   ` Mike Stump
@ 2011-09-16 21:05     ` Diego Novillo
  2011-09-16 21:08       ` Diego Novillo
  0 siblings, 1 reply; 6+ messages in thread
From: Diego Novillo @ 2011-09-16 21:05 UTC (permalink / raw)
  To: Mike Stump; +Cc: Jakub Jelinek, gcc-patches, Richard Henderson

On 11-09-16 16:40 , Mike Stump wrote:
> On Sep 16, 2011, at 1:13 PM, Diego Novillo wrote:
>> I would like to push this libgomp patch upstream.  We need it to pass
>> sysroot to GCC when testing libgomp.
>
> I'd be curious if Ian likes this...  Can one still set GCC_UNDER_TEST in the site.exp file or do other unholy things with it after your patch?  I'm thinking about things like in tree testing v out of tree testing.
>
I don't see why not.  The patch does not re-set GCC_UNDER_TEST, it just 
uses it whole instead of getting the compiler part.  But I think I'm 
missing your point.


Diego.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [libgomp] Pass CC to the libgomp testsuite to capture -sysroot
  2011-09-16 21:05     ` Diego Novillo
@ 2011-09-16 21:08       ` Diego Novillo
  0 siblings, 0 replies; 6+ messages in thread
From: Diego Novillo @ 2011-09-16 21:08 UTC (permalink / raw)
  To: Mike Stump; +Cc: Jakub Jelinek, gcc-patches, Richard Henderson

On Fri, Sep 16, 2011 at 16:49, Diego Novillo <dnovillo@google.com> wrote:
> On 11-09-16 16:40 , Mike Stump wrote:
>>
>> On Sep 16, 2011, at 1:13 PM, Diego Novillo wrote:
>>>
>>> I would like to push this libgomp patch upstream.  We need it to pass
>>> sysroot to GCC when testing libgomp.
>>
>> I'd be curious if Ian likes this...  Can one still set GCC_UNDER_TEST in
>> the site.exp file or do other unholy things with it after your patch?  I'm
>> thinking about things like in tree testing v out of tree testing.
>>
> I don't see why not.  The patch does not re-set GCC_UNDER_TEST, it just uses
> it whole instead of getting the compiler part.  But I think I'm missing your
> point.

Never mind.  I see what you mean now.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-09-16 20:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-28 17:03 [google] Pass CC to the libgomp testsuite to capture -sysroot Simon Baldwin
2011-01-28 17:25 ` Diego Novillo
2011-09-16 20:48 ` [libgomp] " Diego Novillo
2011-09-16 20:56   ` Mike Stump
2011-09-16 21:05     ` Diego Novillo
2011-09-16 21:08       ` Diego Novillo

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).