commit: 423dce47c5f0cb8476f4b7bb6ebdd28f8d3684bf Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> AuthorDate: Tue Sep 5 19:16:41 2017 +0000 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> CommitDate: Tue Sep 5 21:01:35 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=423dce47
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 <AT> gentoo.org> eclass/toolchain.eclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index dad4ae3d197..096cc3018af 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