summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2017-09-05 20:16:41 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2017-09-05 22:01:35 +0100
commit423dce47c5f0cb8476f4b7bb6ebdd28f8d3684bf (patch)
tree8082cb280dd1a5d0bd686187a2103fc799ab8f49 /eclass/toolchain.eclass
parentapp-editors/ghostwriter: version bump to 1.5.0. (diff)
downloadgentoo-423dce47c5f0cb8476f4b7bb6ebdd28f8d3684bf.tar.gz
gentoo-423dce47c5f0cb8476f4b7bb6ebdd28f8d3684bf.tar.bz2
gentoo-423dce47c5f0cb8476f4b7bb6ebdd28f8d3684bf.zip
toolchain.eclass: allow CTARGET to contain '.'
On CTARGET="hppa2.0-unknown-linux-gnu" the following code local VAR="CFLAGS_"${CTARGET//-/_} CXXFLAGS=${!VAR} produces incorrect substitution: CFLAGS_hppa2.0_unknown_linux_gnu which caused 'crossdev hppa2.0-unknown-linux-gnu' to fail. The change adds '.' mangling as well. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r--eclass/toolchain.eclass3
1 files changed, 2 insertions, 1 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index dad4ae3d1972..096cc3018af5 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1478,7 +1478,8 @@ gcc_do_filter_flags() {
FFLAGS=${CFLAGS}
FCFLAGS=${CFLAGS}
- local VAR="CFLAGS_"${CTARGET//-/_}
+ # "hppa2.0-unknown-linux-gnu" -> hppa2_0_unknown_linux_gnu
+ local VAR="CFLAGS_"${CTARGET//[-.]/_}
CXXFLAGS=${!VAR}
fi