/[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.151 Revision 1.152
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 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.151 2011/07/12 03:58:11 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.152 2011/07/12 04:08:52 vapier 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
402 402
403test-flag-PROG() { 403test-flag-PROG() {
404 local comp=$1 404 local comp=$1
405 local flags="$2" 405 local flags="$2"
406 406
407 [[ -z ${comp} || -z ${flags} ]] && \ 407 [[ -z ${comp} || -z ${flags} ]] && return 1
408 return 1
409 408
409 # use -c so we can test the assembler as well
410 local PROG=$(tc-get${comp}) 410 local PROG=$(tc-get${comp})
411 ${PROG} ${flags} -S -o /dev/null -xc /dev/null \ 411 ${PROG} ${flags} -c -o /dev/null -xc /dev/null \
412 > /dev/null 2>&1 412 > /dev/null 2>&1
413} 413}
414 414
415# @FUNCTION: test-flag-CC 415# @FUNCTION: test-flag-CC
416# @USAGE: <flag> 416# @USAGE: <flag>

Legend:
Removed from v.1.151  
changed lines
  Added in v.1.152

  ViewVC Help
Powered by ViewVC 1.1.20