public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mike Frysinger (vapier)" <vapier@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
Date: Sun, 18 Nov 2012 08:27:01 +0000 (UTC)	[thread overview]
Message-ID: <20121118082701.1D5B120C65@flycatcher.gentoo.org> (raw)

vapier      12/11/18 08:27:01

  Modified:             flag-o-matic.eclass
  Log:
  test-flags: set the lang according to the compiler we are using rather than always testing the C frontend so that we can handle language-specific flags correctly #439914 by Alphat-PC

Revision  Changes    Path
1.182                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.182&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.182&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.181&r2=1.182

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.181
retrieving revision 1.182
diff -u -r1.181 -r1.182
--- flag-o-matic.eclass	11 Nov 2012 20:00:57 -0000	1.181
+++ flag-o-matic.eclass	18 Nov 2012 08:27:00 -0000	1.182
@@ -1,6 +1,6 @@
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.181 2012/11/11 20:00:57 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.182 2012/11/18 08:27:00 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -385,13 +385,14 @@
 
 test-flag-PROG() {
 	local comp=$1
-	local flag=$2
+	local lang=$2
+	local flag=$3
 
 	[[ -z ${comp} || -z ${flag} ]] && return 1
 
 	# use -c so we can test the assembler as well
 	local PROG=$(tc-get${comp})
-	${PROG} "${flag}" -c -o /dev/null -xc /dev/null \
+	${PROG} "${flag}" -c -o /dev/null -x${lang} /dev/null \
 		> /dev/null 2>&1
 }
 
@@ -399,25 +400,25 @@
 # @USAGE: <flag>
 # @DESCRIPTION:
 # Returns shell true if <flag> is supported by the C compiler, else returns shell false.
-test-flag-CC() { test-flag-PROG "CC" "$1"; }
+test-flag-CC() { test-flag-PROG "CC" c "$1"; }
 
 # @FUNCTION: test-flag-CXX
 # @USAGE: <flag>
 # @DESCRIPTION:
 # Returns shell true if <flag> is supported by the C++ compiler, else returns shell false.
-test-flag-CXX() { test-flag-PROG "CXX" "$1"; }
+test-flag-CXX() { test-flag-PROG "CXX" c++ "$1"; }
 
 # @FUNCTION: test-flag-F77
 # @USAGE: <flag>
 # @DESCRIPTION:
 # Returns shell true if <flag> is supported by the Fortran 77 compiler, else returns shell false.
-test-flag-F77() { test-flag-PROG "F77" "$1"; }
+test-flag-F77() { test-flag-PROG "F77" f77 "$1"; }
 
 # @FUNCTION: test-flag-FC
 # @USAGE: <flag>
 # @DESCRIPTION:
 # Returns shell true if <flag> is supported by the Fortran 90 compiler, else returns shell false.
-test-flag-FC() { test-flag-PROG "FC" "$1"; }
+test-flag-FC() { test-flag-PROG "FC" f95 "$1"; }
 
 test-flags-PROG() {
 	local comp=$1





             reply	other threads:[~2012-11-18  8:27 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-18  8:27 Mike Frysinger (vapier) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-05-24  7:05 [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass Mike Frysinger (vapier)
2015-05-06  7:04 Mike Frysinger (vapier)
2014-12-31  8:26 Mike Frysinger (vapier)
2014-11-01  3:45 Mike Frysinger (vapier)
2014-08-11  0:36 Joshua Kinard (kumba)
2014-02-02 22:26 Thomas Sachau (tommy)
2013-10-12 19:50 Mike Frysinger (vapier)
2013-09-30  6:39 Mike Frysinger (vapier)
2013-09-05  5:28 Mike Frysinger (vapier)
2013-01-12 14:32 Justin Lecher (jlec)
2012-12-03 21:20 Mike Frysinger (vapier)
2012-11-29 23:27 Mike Frysinger (vapier)
2012-11-18  8:29 Mike Frysinger (vapier)
2012-11-11 20:00 Mike Frysinger (vapier)
2012-11-11  7:00 Mike Frysinger (vapier)
2012-10-30 20:51 Mike Frysinger (vapier)
2012-10-30 20:20 Mike Frysinger (vapier)
2012-06-23 22:21 Mike Frysinger (vapier)
2012-05-31  0:29 Mike Frysinger (vapier)
2012-05-31  0:24 Mike Frysinger (vapier)
2012-05-26  2:55 Mike Frysinger (vapier)
2012-02-26 12:09 Anthony G. Basile (blueness)
2012-01-16 20:03 Mike Frysinger (vapier)
2012-01-14  9:10 Mike Frysinger (vapier)
2012-01-14  8:22 Mike Frysinger (vapier)
2012-01-14  8:05 Mike Frysinger (vapier)
2012-01-13 22:40 Mike Frysinger (vapier)
2011-12-15  5:23 Mike Frysinger (vapier)
2011-12-07  6:42 Mike Frysinger (vapier)
2011-11-14 20:29 Mike Frysinger (vapier)
2011-10-08 18:37 Mike Frysinger (vapier)
2011-08-17 18:20 Mike Frysinger (vapier)
2011-08-17 17:59 Mike Frysinger (vapier)
2011-08-17 17:54 Mike Frysinger (vapier)
2011-07-12  4:08 Mike Frysinger (vapier)
2011-07-12  3:58 Mike Frysinger (vapier)
2011-02-25 10:51 Ryan Hill (dirtyepic)
2011-02-01  5:41 Ryan Hill (dirtyepic)
2010-05-08  3:47 Ryan Hill (dirtyepic)
2010-04-02  2:50 Jonathan Callen (abcd)
2010-02-17 18:20 Samuli Suominen (ssuominen)
2009-10-04 10:00 Samuli Suominen (ssuominen)
2009-08-15 18:04 Zac Medico (zmedico)
2009-07-29  8:32 Samuli Suominen (ssuominen)
2009-07-29  8:31 Samuli Suominen (ssuominen)
2009-07-20  4:28 Mike Frysinger (vapier)
2009-06-09 22:15 Ryan Hill (dirtyepic)
2009-05-26  7:18 Mike Frysinger (vapier)
2009-05-24  0:33 Michael Sterrett (mr_bones_)
2009-05-23 23:12 Mike Frysinger (vapier)
2009-04-05  8:22 Fabian Groffen (grobian)
2009-04-04 17:57 Fabian Groffen (grobian)
2009-01-21  0:42 Gordon Malm (gengor)
2009-01-08 11:29 Gordon Malm (gengor)
2009-01-08  8:12 Gordon Malm (gengor)
2009-01-04 17:22 Mike Frysinger (vapier)
2008-12-21 21:40 Ned Ludd (solar)
2008-11-03  5:52 Mike Frysinger (vapier)
2008-09-14 19:43 Ryan Hill (dirtyepic)
2008-07-03  5:30 Donnie Berkholz (dberkholz)
2008-06-07 16:42 Diego Petteno (flameeyes)
2008-02-18 18:20 Sven Wegener (swegener)
2008-02-16 22:43 Mike Frysinger (vapier)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121118082701.1D5B120C65@flycatcher.gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox