From patchwork Thu Jul 3 10:19:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 366824 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 35EC31400DD for ; Thu, 3 Jul 2014 20:19:47 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; q=dns; s=default; b=wNVpZ2VQpFKZPAMz oPlrL5SRuBS2hwhb5WvjlSdu0mwDCFvRCHd4tOmssGpRxwmN7Y7ZWuBjNEc374cN y2fNtj+vuacLzIXdIaGR5RN+JnbbAP7v2WvLi9J1cL30r3e8xQyBpKjS60/UgTkD 1WX3YIeHswkSDqnlwxeLEPHsHyo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=default; bh=N10qICwu1QZv0bI2KAnUc+ NQKj4=; b=JjRrB6CTi+eK0SDotnxK9cj9MFUjOdGa3sgvSGnQilHdvvW206nJhr SJdVv3a1cJodJvznJYiwMlAX52roymMFUrLZAHg0+WsfQxwEuX46+bfKOZGBfChK sxxIpiSfjCKu4dVwgCDxYU9H64/aE0JDyEgXiewGWYsb4Ea8md5so= Received: (qmail 6720 invoked by alias); 3 Jul 2014 10:19:40 -0000 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 Received: (qmail 6690 invoked by uid 89); 3 Jul 2014 10:19:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 03 Jul 2014 10:19:32 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1X2e6v-0001Qk-IZ from Thomas_Schwinge@mentor.com ; Thu, 03 Jul 2014 03:19:25 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 3 Jul 2014 03:19:25 -0700 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.2.247.3; Thu, 3 Jul 2014 11:19:21 +0100 From: Thomas Schwinge To: Tobias Burnus , Jakub Jelinek CC: gcc patches , , , Subject: Re: [Patch, libgomp] libgomp.fortran/fortran.exp - add -fintrinsic-modules-path ${blddir} In-Reply-To: <53B45A03.2030407@net-b.de> References: <50D1DF81.1090300@net-b.de> <87simjtzid.fsf@kepler.schwinge.homeip.net> <53B45A03.2030407@net-b.de> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) Date: Thu, 3 Jul 2014 12:19:15 +0200 Message-ID: <87mwcqvj6k.fsf@schwinge.name> MIME-Version: 1.0 Hi! On Wed, 2 Jul 2014 21:14:11 +0200, Tobias Burnus wrote: > Thomas Schwinge wrote: > > Reopening this oldie: > > > >> index 5fa42f4..68440d18 100644 > >> --- a/libgomp/testsuite/libgomp.fortran/fortran.exp > >> +++ b/libgomp/testsuite/libgomp.fortran/fortran.exp > >> @@ -14,6 +14,7 @@ set quadmath_library_path "../libquadmath/.libs" > >> dg-init > >> > >> if { $blddir != "" } { > >> + lappend ALWAYS_CFLAGS "additional_flags=-fintrinsic-modules-path ${blddir}" > > How about the following (only lightly tested). I wonder why I didn't use > it before – but it looks obvious. > --- a/libgomp/testsuite/libgomp.fortran/fortran.exp > +++ b/libgomp/testsuite/libgomp.fortran/fortran.exp > @@ -48,5 +48,5 @@ if { $lang_test_file_found } { > || [file exists "${blddir}/${quadmath_library_path}/libquadmath.${shlib_ext}"] } { > - lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/${quadmath_library_path}/" > + lappend ALWAYS_FFLAGS "ldflags=-L${blddir}/${quadmath_library_path}/" > # Allow for spec subsitution. > - lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/${quadmath_library_path}/" > + lappend ALWAYS_FFLAGS "additional_flags=-B${blddir}/${quadmath_library_path}/" > set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}:${blddir}/${quadmath_library_path}" I don't understand -- there is no ALWAYS_FFLAGS, and, it's not -L and -B options that are the problem here, but rather -fintrinsic-modules-path passed to xgcc running in non-Fortran mode when doing check_effective-target_* checks and the like. My understanding is that these checks will always be using ${tool}_target_compile, so the "problem" is ALWAYS_CFLAGS usage in libgomp/testsuite/lib/libgomp.exp:libgomp_target_compile: this will be set up for Fortran testing in libgomp/testsuite/libgomp.fortran/fortran.exp (including the -fintrinsic-modules-path option), but then used by check_effective-target_* with C language test cases, hence the compiler warning. I found the following to work (but so far only did libgomp testing), but that is a little bit more intrusive, but may actually be the right thing to do. (Possibly also in additional places where ${tool}_target_compile is used? CCing testsuite maintainers.) Comments? Patch to relax checking for compiler warnings when determining features supported by the target: Grüße, Thomas --- gcc/testsuite/lib/target-supports.exp +++ gcc/testsuite/lib/target-supports.exp @@ -78,6 +78,9 @@ proc check_compile {basename type contents args} { set lines [${tool}_target_compile $src $output $compile_type "$options"] file delete $src + # Mask out messages from gcc that aren't useful for our purposes here. + set lines [string trim [prune_gcc_output $lines]] + set scan_output $output # Don't try folding this into the switch above; calling "glob" before the # file is created won't work. Patch to mask out »valid for Fortran but not for C« warnings. --- gcc/testsuite/lib/prune.exp +++ gcc/testsuite/lib/prune.exp @@ -46,6 +46,10 @@ proc prune_gcc_output { text } { regsub -all "(^|\n)\[^\n\]*: Additional NOP may be necessary to workaround Itanium processor A/B step errata" $text "" text regsub -all "(^|\n)\[^\n*\]*: Assembler messages:\[^\n\]*" $text "" text + # Ignore warning for gfortran options passed to xgcc not running in Fortran + # mode. + regsub -all "(^|\n)\[^\n\]*: warning: command line option .-f\[^\n\]*. is valid for Fortran but not for C\[^\n\]*" $text "" text + # Ignore harmless VTA note. regsub -all "(^|\n)\[^\n\]*: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without\[^\n\]*" $text "" text