Package: src:gcc-13-cross-ports
Version: 16
Severity: serious
Tags: sid trixie
X-Debbugs-CC: debian-loonga...@lists.debian.org

gcc-13-cross-ports ftbfs building the loong64 cross compilers:

[...]
collect2: error: ld returned 1 exit status
make[7]: *** [Makefile:998: libgcc_s.so] Error 1
make[7]: Leaving directory '/<<PKGBUILDDIR>>/gcc/build/loongarch64-linux-gnu/base/lp64d/libgcc'
make[6]: *** [Makefile:1214: multi-do] Error 1
make[6]: Leaving directory '/<<PKGBUILDDIR>>/gcc/build/loongarch64-linux-gnu/libgcc'
make[5]: *** [Makefile:127: all-multi] Error 2
make[5]: *** Waiting for unfinished jobs....
make[5]: Leaving directory '/<<PKGBUILDDIR>>/gcc/build/loongarch64-linux-gnu/libgcc'
make[4]: *** [Makefile:14103: all-target-libgcc] Error 2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/gcc/build'
make[3]: *** [Makefile:1042: all] Error 2

it looks like multilibs being enabled for the cross builds. So how to configure that properly?

the build log above shows, that a non-default lp64d multilib is built. According to https://wiki.debian.org/Multiarch/Tuples lp64d is the targeted ABI, so at least for the cross compilers, some other multilib is built as the default.

In gcc-13, maybe you can configure with

--with-abi=lp64d --disable-multilib  (untested)

In gcc-14, --with-abi is obsolete, and the ABI is derived from the target triplet, which would be loongarch64-linux-gnuf64. Is that something that should be changed, or is loongarch64-linux-gnu the correct triplet?

Reply via email to