From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 2EB441381F3 for ; Sun, 18 Nov 2012 08:27:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EDFE221C089; Sun, 18 Nov 2012 08:27:04 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 70FB021C089 for ; Sun, 18 Nov 2012 08:27:04 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 75EDF33D8B0 for ; Sun, 18 Nov 2012 08:27:02 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 559) id 1D5B120C65; Sun, 18 Nov 2012 08:27:01 +0000 (UTC) From: "Mike Frysinger (vapier)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, vapier@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: flag-o-matic.eclass X-VCS-Directories: eclass X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Message-Id: <20121118082701.1D5B120C65@flycatcher.gentoo.org> Date: Sun, 18 Nov 2012 08:27:01 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 3b6070f7-74d2-40e1-bd78-2a28d4223d21 X-Archives-Hash: 5db2429a65ee925c1dd74c69e8a7c67e 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: # @DESCRIPTION: # Returns shell true if 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: # @DESCRIPTION: # Returns shell true if 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: # @DESCRIPTION: # Returns shell true if 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: # @DESCRIPTION: # Returns shell true if 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