Skip to contentSkip to conversation

recipe's sysroot misconfiguration in multilib

scarthgap Joao Marcos Costa 1 participant 1 message Mar 26, 2025

lore
Share & tools
lore
#0 lore raw

Hello,

(Just in case, I'm re-sending this email as the first one bounced back)

I have been trying to set up a multilib environment to generate libraries built with Control Flow Integrity support. The gcc toolchain is already patched to support this custom multilib ABI, and it is indeed capable of generating binaries with the CFI flags.

I am, however, facing this strange issue where a header is not found in the multilib recipe-sysroot (i.e., libcfi-recipe-sysroot) of a given package (e.g., zstd), and do_compile task fails:

libcfi-zstd/1.5.5/libcfi-recipe-sysroot/usr/include/c++/13.2.0/cstdint:38:10: fatal error: bits/c++config.h: No such file or directory

|    38 | #include <bits/c++config.h>
|       |          ^~~~~~~~~~~~~~~~~~
| compilation terminated.
| make: *** [Makefile:248: Options.o] Error 1

The strange part is the header is there:
libcfi-recipe-sysroot/usr/include/c++/13.2.0/riscv64-freedomusdkmllibcfi-linux/bits/c++config.h

Another strange aspect in this very same context is: the recipe-sysroot-native seems misconfigured and incomplete. For reference, let me use libcfi-zstd/zstd again:

zstd/1.5.5$ ls recipe-sysroot-native/sysroot-providers/ -l | wc -l 66
zstd/1.5.5$ du -sh recipe-sysroot-native/
457M recipe-sysroot-native/

libcfi-zstd/1.5.5$ ls recipe-sysroot-native/sysroot-providers/ -l | wc -l 27
libcfi-zstd/1.5.5$ du -sh recipe-sysroot-native/
194M recipe-sysroot-native/

Unless I'm missing something, shouldn't I have roughly the same values here?

Besides my TUNE_*, DEFAULTTUNE, BASE_LIB values set up, I also added
'GCCMULTILIB = "--enable-multilib"' to gcc-cross.inc, to enable multilib for the cross toolchain. Could I be missing something, maybe with recipes-devtools/gcc/gcc-multilib-config.inc?

Any help is very appreciated, and please excuse me for such a text wall.

Signature · 2 lines
Best regards,
João Marcos Costa