/[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.74 Revision 1.75
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 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.74 2004/10/21 07:40:47 kugelfang Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.75 2004/10/28 01:38:31 vapier Exp $
4# 4#
5# Author Bart Verwilst <verwilst@gentoo.org> 5# Author Bart Verwilst <verwilst@gentoo.org>
6 6
7ECLASS=flag-o-matic 7ECLASS=flag-o-matic
8INHERITED="$INHERITED $ECLASS" 8INHERITED="$INHERITED $ECLASS"
9 9
10# Please leave ${IUSE} in this until portage .51 is stable, otherwise
11# IUSE gets clobbered.
12IUSE="${IUSE} debug" 10IUSE="debug"
13 11
14# need access to emktemp() 12# need access to emktemp()
15inherit eutils toolchain-funcs 13inherit eutils toolchain-funcs
16 14
17# 15#
265 export CXXFLAGS="${NEW_CXXFLAGS}" 263 export CXXFLAGS="${NEW_CXXFLAGS}"
266 return 0 264 return 0
267} 265}
268 266
269test_flag() { 267test_flag() {
270 local cc=${CC:-gcc} ; cc=${cc%% *}
271 if ${cc} -S -xc "$@" -o "$(emktemp)" /dev/null &>/dev/null; then 268 if $(tc-getCC) -S -xc "$@" -o "$(emktemp)" /dev/null &>/dev/null; then
272 printf "%s\n" "$*" 269 printf "%s\n" "$*"
273 return 0 270 return 0
274 fi 271 fi
275 return 1 272 return 1
276} 273}
277 274
278test_version_info() { 275test_version_info() {
279 local cc=${CC:-gcc} ; cc=${cc%% *}
280 if [[ $(${cc} --version 2>&1) == *$1* ]]; then 276 if [[ $($(tc-getCC) --version 2>&1) == *$1* ]]; then
281 return 0 277 return 0
282 else 278 else
283 return 1 279 return 1
284 fi 280 fi
285} 281}

Legend:
Removed from v.1.74  
changed lines
  Added in v.1.75

  ViewVC Help
Powered by ViewVC 1.1.20