When compiling dev-libs/nss-3.91 for powerpc-gentoo-linux-musl, the build fails with ``` powerpc-gentoo-linux-musl-gcc -shared -Wl,--gc-sections -Wl,-z,defs -Wl,-soname -Wl,libfreebl3.so -Wl,--version-script,Linux6.6_ppc_powerpc-gentoo-linux-musl-gcc_glibc_PTH_OPT.OBJ/Linux_SINGLE_SHLIB/freebl.def -Wl,-Bsymbolic -Wl,-O1 -Wl,--as-needed -z noexecstack -z noexecstack -z noexecstack -z noexecstack -z noexecstack -z noexecstack -z noexecstack -z noexecstack -z noexecstack -z noexecstack -z noexecstack -z noexecstack -o Linux6.6_ppc_powerpc-gentoo-linux-musl-gcc_glibc_PTH_OPT.OBJ/Linux_SINGLE_SHLIB/libfreebl3.so Linux6.6_ppc_powerpc-gentoo-linux-musl-gcc_glibc_PTH_OPT.OBJ/Linux_SINGLE_SHLIB/lowhash_vector.o -ldl -lc /usr/lib/gcc/powerpc-gentoo-linux-musl/13/../../../../powerpc-gentoo-linux-musl/bin/ld: Linux6.6_ppc_powerpc-gentoo-linux-musl-gcc_glibc_PTH_OPT.OBJ/Linux_SINGLE_SHLIB/lowhash_vector.o: in function `loader_GetOriginalPathname': /var/tmp/portage/dev-libs/nss-3.91/work/nss-3.91/nss-.ppc/lib/freebl/genload.c:46:(.text.loader_GetOriginalPathname+0x98): undefined reference to `PR_SetError' collect2: error: ld returned 1 exit status make[5]: *** [../../coreconf/rules.mk:204: Linux6.6_ppc_powerpc-gentoo-linux-musl-gcc_glibc_PTH_OPT.OBJ/Linux_SINGLE_SHLIB/libfreebl3.so] Error 1 make[5]: Leaving directory '/var/tmp/portage/dev-libs/nss-3.91/work/nss-3.91/nss-.ppc/lib/freebl' make[4]: *** [Makefile:711: freebl_NEED_STUB_BUILD] Error 2 ``` The function PR_SetError is part of nspr (specifically, libnspr4.so), but the linker command in question doesn't link it. Passing LDFLAGS='-lnspr4' to emerge doesn't work around the problem, because strip-flags removes it before the build starts. Commenting out the single function call responsible for the error does work, see the patch in https://lore.kernel.org/all/20240112192003.1004726-1-fontaine.fabrice@gmail.com/T/ (and the associated thread). The message also indicates that the error might not be specific to powerpc (I have no other musl systems to confirm this). Reproducible: Always
Created attachment 887746 [details] emerge --info
Created attachment 887747 [details] build.log