Created attachment 898674 [details] /var/tmp/portage/cross-powerpc64-unknown-linux-musl/musl-1.2.4-r2/temp/build.log amd64 host, default/linux/amd64/23.0/musl/llvm profile. Trying to make cross toolchain for ppc64 results in the following: ------------------------------------------------------------------------------------------------------------------------------------- * crossdev version: 20240209 * Host Portage ARCH: amd64 * Host Portage System: x86_64-pc-linux-musl (x86_64-pc-linux-musl) * Target Portage ARCH: ppc64 * Target System: powerpc64-unknown-linux-musl * Stage: 4 (C/C++ compiler) * USE=multilib: no * Target ABIs: default * binutils: binutils-[stable] * gcc: gcc-[stable] * headers: linux-headers-[stable] * libc: musl-[stable] * CROSSDEV_OVERLAY: /var/db/repos/crossdev * PORT_LOGDIR: /var/log/portage * PORTAGE_CONFIGROOT: / * Portage flags: _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - * leaving metadata/layout.conf alone in /var/db/repos/crossdev _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - * Log: /var/log/portage/cross-powerpc64-unknown-linux-musl-binutils.log * Emerging cross-binutils ... [ ok ] * Log: /var/log/portage/cross-powerpc64-unknown-linux-musl-gcc-stage1.log * Emerging cross-gcc-stage1 ... [ ok ] * Log: /var/log/portage/cross-powerpc64-unknown-linux-musl-linux-headers.log * Emerging cross-linux-headers ... [ ok ] * Log: /var/log/portage/cross-powerpc64-unknown-linux-musl-musl.log * Emerging cross-musl ... * error: musl failed :( * * If you file a bug, please attach the following logfiles: * /var/log/portage/cross-powerpc64-unknown-linux-musl-info.log * /var/log/portage/cross-powerpc64-unknown-linux-musl-musl.log.xz * /var/tmp/portage/cross-powerpc64-unknown-linux-musl/musl*/temp/musl-config.logs.tar.xz ... (later in the musl build.log) checking preprocessor condition _CALL_ELF == 2... false ./configure: error: unsupported powerpc64 ABI In the musl build log one can clearly see that clang is picked up instead of gcc.
Created attachment 898675 [details] /var/log/portage/cross-powerpc64-unknown-linux-musl-info.log
Created attachment 898676 [details] emerge --info cross-powerpc64-unknown-linux-musl/musl
Created attachment 898677 [details] /var/tmp/portage/cross-powerpc64-unknown-linux-musl/musl-1.2.4-r2/temp/environment
from IRC discussion with Arsen: Adding "unset AR AS CPP NM STRIP RANLIB OBJCOPY STRINGS OBJDUMP READELF ADDR2LINE LD CC CXX" to the top of pkg_setup function in /var/db/repos/gentoo/sys-libs/musl/musl-1.2.4-r2.ebuild fixes the issue. CC="clang" seems to be hardcoded in the llvm profile.
update: crossdev build finishes, but produced toolchain doesn't seem to work: $ emerge-powerpc64-unknown-linux-musl -avu app-editors/nano ... checking for native build linker-flags... -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--as-needed checking for native build linker-libraries... checking if the build-compiler "gcc" works... no configure: error: Cross-build requires two compilers. Use --with-build-cc to specify the native compiler.