/[gentoo-x86]/eclass/toolchain-funcs.eclass
Gentoo

Diff of /eclass/toolchain-funcs.eclass

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

Revision 1.56 Revision 1.57
1# Copyright 1999-2006 Gentoo Foundation 1# Copyright 1999-2006 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/toolchain-funcs.eclass,v 1.56 2006/02/17 22:18:20 swegener Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.57 2006/03/28 21:25:14 kevquinn Exp $
4# 4#
5# Author: Toolchain Ninjas <toolchain@gentoo.org> 5# Author: Toolchain Ninjas <toolchain@gentoo.org>
6# 6#
7# This eclass contains (or should) functions to get common info 7# This eclass contains (or should) functions to get common info
8# about the toolchain (libc/compiler/binutils/etc...) 8# about the toolchain (libc/compiler/binutils/etc...)
195# Note; later specs normally overwrite earlier ones; however if a later 195# Note; later specs normally overwrite earlier ones; however if a later
196# spec starts with '+' then it appends. 196# spec starts with '+' then it appends.
197# gcc -dumpspecs is parsed first, followed by files listed by "gcc -v" 197# gcc -dumpspecs is parsed first, followed by files listed by "gcc -v"
198# as "Reading <file>", in order. 198# as "Reading <file>", in order.
199gcc-specs-directive() { 199gcc-specs-directive() {
200 local cc=$(tc-getCC)
200 local specfiles=$($(tc-getCC) -v 2>&1 | awk '$1=="Reading" {print $NF}') 201 local specfiles=$(LC_ALL=C ${cc} -v 2>&1 | awk '$1=="Reading" {print $NF}')
201 $(tc-getCC) -dumpspecs 2> /dev/null | cat - ${specfiles} | awk -v directive=$1 \ 202 ${cc} -dumpspecs 2> /dev/null | cat - ${specfiles} | awk -v directive=$1 \
202'BEGIN { pspec=""; spec=""; outside=1 } 203'BEGIN { pspec=""; spec=""; outside=1 }
203$1=="*"directive":" { pspec=spec; spec=""; outside=0; next } 204$1=="*"directive":" { pspec=spec; spec=""; outside=0; next }
204 outside || NF==0 || ( substr($1,1,1)=="*" && substr($1,length($1),1)==":" ) { outside=1; next } 205 outside || NF==0 || ( substr($1,1,1)=="*" && substr($1,length($1),1)==":" ) { outside=1; next }
205 spec=="" && substr($0,1,1)=="+" { spec=pspec " " substr($0,2); next } 206 spec=="" && substr($0,1,1)=="+" { spec=pspec " " substr($0,2); next }
206 { spec=spec $0 } 207 { spec=spec $0 }

Legend:
Removed from v.1.56  
changed lines
  Added in v.1.57

  ViewVC Help
Powered by ViewVC 1.1.20