diff options
author | Kevin F. Quinn <kevquinn@gentoo.org> | 2006-03-28 21:25:14 +0000 |
---|---|---|
committer | Kevin F. Quinn <kevquinn@gentoo.org> | 2006-03-28 21:25:14 +0000 |
commit | fde248ea5ea6ef384d41202abf9025f2ca4d10f7 (patch) | |
tree | c48fa1a31d6c39498e2ac0c24d43991aea65842a /eclass | |
parent | Apply sed from Ed Catmur so that apmd compiles against system headers, instea... (diff) | |
download | historical-fde248ea5ea6ef384d41202abf9025f2ca4d10f7.tar.gz historical-fde248ea5ea6ef384d41202abf9025f2ca4d10f7.tar.bz2 historical-fde248ea5ea6ef384d41202abf9025f2ca4d10f7.zip |
Make gcc-specs-directive work on non-English locales, bug #127742
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/toolchain-funcs.eclass | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index 5b16e61c4a81..e143b2068838 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.56 2006/02/17 22:18:20 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.57 2006/03/28 21:25:14 kevquinn Exp $ # # Author: Toolchain Ninjas <toolchain@gentoo.org> # @@ -197,8 +197,9 @@ gcc-micro-version() { # gcc -dumpspecs is parsed first, followed by files listed by "gcc -v" # as "Reading <file>", in order. gcc-specs-directive() { - local specfiles=$($(tc-getCC) -v 2>&1 | awk '$1=="Reading" {print $NF}') - $(tc-getCC) -dumpspecs 2> /dev/null | cat - ${specfiles} | awk -v directive=$1 \ + local cc=$(tc-getCC) + local specfiles=$(LC_ALL=C ${cc} -v 2>&1 | awk '$1=="Reading" {print $NF}') + ${cc} -dumpspecs 2> /dev/null | cat - ${specfiles} | awk -v directive=$1 \ 'BEGIN { pspec=""; spec=""; outside=1 } $1=="*"directive":" { pspec=spec; spec=""; outside=0; next } outside || NF==0 || ( substr($1,1,1)=="*" && substr($1,length($1),1)==":" ) { outside=1; next } |