/[gentoo-x86]/eclass/flag-o-matic.eclass
Gentoo

Diff of /eclass/flag-o-matic.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.186 Revision 1.187
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2013 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.186 2012/12/20 21:01:50 jlec Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.187 2013/01/12 14:32:31 jlec Exp $
4 4
5# @ECLASS: flag-o-matic.eclass 5# @ECLASS: flag-o-matic.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# toolchain@gentoo.org 7# toolchain@gentoo.org
8# @BLURB: common functions to manipulate and query toolchain flags 8# @BLURB: common functions to manipulate and query toolchain flags
390 390
391 [[ -z ${comp} || -z ${flag} ]] && return 1 391 [[ -z ${comp} || -z ${flag} ]] && return 1
392 392
393 # use -c so we can test the assembler as well 393 # use -c so we can test the assembler as well
394 local PROG=$(tc-get${comp}) 394 local PROG=$(tc-get${comp})
395 if $( ${PROG} "${flag}" -c -o /dev/null -x${lang} - < /dev/null > /dev/null 2>&1 ); then 395 if ${PROG} -c -o /dev/null -x${lang} - < /dev/null > /dev/null 2>&1 ; then
396 ${PROG} "${flag}" -c -o /dev/null -x${lang} - < /dev/null \ 396 ${PROG} "${flag}" -c -o /dev/null -x${lang} - < /dev/null \
397 > /dev/null 2>&1 397 > /dev/null 2>&1
398 else 398 else
399 ${PROG} "${flag}" -c -o /dev/null /dev/null \ 399 ${PROG} "${flag}" -c -o /dev/null /dev/null > /dev/null 2>&1
400 > /dev/null 2>&1
401 fi 400 fi
402} 401}
403 402
404# @FUNCTION: test-flag-CC 403# @FUNCTION: test-flag-CC
405# @USAGE: <flag> 404# @USAGE: <flag>

Legend:
Removed from v.1.186  
changed lines
  Added in v.1.187

  ViewVC Help
Powered by ViewVC 1.1.20