commit:     f8ed334c4a1f2a9802f898663b3facac5ec15e01
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  5 22:40:59 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Jan  5 23:01:37 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8ed334c

toolchain-funcs.eclass: fix or1k* tuple detection

Before the change the only recognised CHOST was 'or1k'.
After the change CHOSTs like 'or1k-linux-musl' are
also recognised as 'openrisc'.

Reported-by: adam <AT> pimentel.space
Bug: https://bugs.gentoo.org/763606
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 eclass/tests/toolchain-funcs.sh | 3 ++-
 eclass/toolchain-funcs.eclass   | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/eclass/tests/toolchain-funcs.sh b/eclass/tests/toolchain-funcs.sh
index a0a56fd9e5d..23ac568c4a5 100755
--- a/eclass/tests/toolchain-funcs.sh
+++ b/eclass/tests/toolchain-funcs.sh
@@ -27,7 +27,8 @@ test-tc-arch-kernel() {
 tbegin "tc-arch-kernel() (KV=2.6.30)"
 test-tc-arch-kernel 2.6.30 \
        i{3..6}86:x86 x86_64:x86 \
-       powerpc{,64}:powerpc i{3..6}86-gentoo-freebsd:i386
+       powerpc{,64}:powerpc i{3..6}86-gentoo-freebsd:i386 \
+       or1k:openrisc or1k-linux-musl:openrisc
 tend $?
 
 #

diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index ec7b920bcfa..4a4bb27fc08 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -665,7 +665,7 @@ ninj() { [[ ${type} == "kern" ]] && echo $1 || echo $2 ; }
                mips*)          echo mips;;
                nios2*)         echo nios2;;
                nios*)          echo nios;;
-               or1k|or32*)     echo openrisc;;
+               or1k*|or32*)    echo openrisc;;
                powerpc*)
                        # Starting with linux-2.6.15, the 'ppc' and 'ppc64' 
trees
                        # have been unified into simply 'powerpc', but until 
2.6.16,

Reply via email to