Created attachment 681064 [details] zip archive with the two log files I was able to get. I was trying to get an or1k-linux-musl toolchain to compile some firmware, but it seems like it didn't work correctly. aarch64-linux-musl worked fine however, but I happen to need both. I've attached the log files it the error message told me to. I was building the cross-toolchain on an AMD64 system for an ARM64 system, using the command "sudo crossdev --target or1k-linux-musl"
linux-headers (via kernel-2.eclass) does not recognise openrisc targets yet. What kind of firmware is that? Do you need to build openrisc userspace as well?
Actually, H_SUPPORTEDARCH="openrisc". Maybe it's only a matter of a few crossdev variables. But the question still stands: do you need to build openrisc userspace as well?
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8ed334c4a1f2a9802f898663b3facac5ec15e01 commit f8ed334c4a1f2a9802f898663b3facac5ec15e01 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2021-01-05 22:40:59 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2021-01-05 23:01:37 +0000 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@pimentel.space Bug: https://bugs.gentoo.org/763606 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> eclass/tests/toolchain-funcs.sh | 3 ++- eclass/toolchain-funcs.eclass | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
With #comment3 the toolchain seems to be able to get even c++ userspace working: $ cat a.c #include <iostream> int main() { std::cout << "hi!\n"; } $ or1k-linux-musl-g++ a.c -o a $ LD_LIBRARY_PATH=/usr/lib/gcc/or1k-linux-musl/10.2.0/ qemu-or1k -L /usr/or1k-linux-musl/ ./a hi! $ file a a: ELF 32-bit MSB pie executable, OpenRISC, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-or1k.so.1, not stripped I hope it will help you get the toolchain.