From patchwork Fri Jan 28 16:30:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Baldwin X-Patchwork-Id: 80871 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 10080B7109 for ; Sat, 29 Jan 2011 03:31:08 +1100 (EST) Received: (qmail 18166 invoked by alias); 28 Jan 2011 16:31:06 -0000 Received: (qmail 18149 invoked by uid 22791); 28 Jan 2011 16:31:04 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 28 Jan 2011 16:30:59 +0000 Received: from wpaz13.hot.corp.google.com (wpaz13.hot.corp.google.com [172.24.198.77]) by smtp-out.google.com with ESMTP id p0SGUwkh000976 for ; Fri, 28 Jan 2011 08:30:58 -0800 Received: from hpgntab-ubiq73.eem.corp.google.com (hpgntab-ubiq73.eem.corp.google.com [172.25.130.115]) by wpaz13.hot.corp.google.com with ESMTP id p0SGUuVk009529 for ; Fri, 28 Jan 2011 08:30:57 -0800 Received: by hpgntab-ubiq73.eem.corp.google.com (Postfix, from userid 9603) id 9AF5D1C6D15; Fri, 28 Jan 2011 17:30:56 +0100 (CET) To: gcc-patches@gcc.gnu.org Subject: [google] Pass CC to the libgomp testsuite to capture -sysroot Message-Id: <20110128163056.9AF5D1C6D15@hpgntab-ubiq73.eem.corp.google.com> Date: Fri, 28 Jan 2011 17:30:56 +0100 (CET) From: simonb@google.com (Simon Baldwin) X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list 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 * 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 @@ # . 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@"