All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
To: openembedded-core@lists.openembedded.org
Cc: Thomas Perrot <thomas.perrot@bootlin.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Khem Raj <raj.khem@gmail.com>,
	richard.purdie@linuxfoundation.org
Subject: [scarthgap] recipe's sysroot misconfiguration in multilib
Date: Wed, 26 Mar 2025 19:53:12 +0100	[thread overview]
Message-ID: <7d04bf14-4b4d-4027-b2af-d045d21a6ab0@bootlin.com> (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.

-- 
Best regards,
João Marcos Costa


             reply	other threads:[~2025-03-26 18:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-26 18:53 Joao Marcos Costa [this message]
     [not found] <5be84788-6fa5-453c-83bc-d547246dc037@bootlin.com>
2025-03-26 18:55 ` [scarthgap] recipe's sysroot misconfiguration in multilib Richard Purdie

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=7d04bf14-4b4d-4027-b2af-d045d21a6ab0@bootlin.com \
    --to=joaomarcos.costa@bootlin.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=raj.khem@gmail.com \
    --cc=richard.purdie@linuxfoundation.org \
    --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.