From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Joao Marcos Costa <joaomarcos.costa@bootlin.com>,
openembedded-core@lists.openembedded.org
Cc: Thomas Perrot <thomas.perrot@bootlin.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Khem Raj <raj.khem@gmail.com>
Subject: Re: [scarthgap] recipe's sysroot misconfiguration in multilib
Date: Wed, 26 Mar 2025 18:55:30 +0000 [thread overview]
Message-ID: <296b0e95be234db91dfaa8164e45d035973aa459.camel@linuxfoundation.org> (raw)
In-Reply-To: <5be84788-6fa5-453c-83bc-d547246dc037@bootlin.com>
On Wed, 2025-03-26 at 19:47 +0100, Joao Marcos Costa wrote:
> 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?
I'm finding it odd that you have to add --enable-multilib since in
general with gcc-cross, we use separate cross toolchains for each
multilib. This kind of implies you're configuring the setup differently
to how the system would expect.
The recipe-sysroot-native/installeddeps/ directory will show you what
is installed in each and might help narrow down the size difference.
Cheers,
Richard
next parent reply other threads:[~2025-03-26 18:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5be84788-6fa5-453c-83bc-d547246dc037@bootlin.com>
2025-03-26 18:55 ` Richard Purdie [this message]
2025-03-26 19:15 ` [OE-core] [scarthgap] recipe's sysroot misconfiguration in multilib Joao Marcos Costa
2025-03-26 19:26 ` Khem Raj
2025-03-26 20:54 ` Joao Marcos Costa
2025-03-26 21:28 ` Khem Raj
2025-03-26 18:53 Joao Marcos Costa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=296b0e95be234db91dfaa8164e45d035973aa459.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=alexandre.belloni@bootlin.com \
--cc=joaomarcos.costa@bootlin.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=raj.khem@gmail.com \
--cc=thomas.perrot@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.