Created attachment 762105 [details] crossdev emerge --info I was trying to build a bare-metal Arm cross-compiler for Raspberry Pi Pico development, but when I went to build the `blink` example [1] it failed during the linking stage with the following error (more or less, it's what I found in my browser search history): bs2_default.elf section .interp will not fit in region sram Reading through the crossdev code, `*-eabi` targets are supposed to have the `pie` USE flag for gcc disabled, but I'm running a hardened profile which forces `pie`, so gcc was built with it enabled anyway. After modifying crossdev to mask the USE flag gcc was built without `pie`, and I no longer ran into the linker error when doing a clean build of `blink` and its dependencies. Which worked as expected when booting the Pico with it installed. [1]: https://github.com/raspberrypi/pico-examples/tree/afd1d2008f3fb3fa7a837dd1bdf17a6fecbc57fe#first--examples
Created attachment 762106 [details] crossdev emerge -a -v gcc Output from `emerge` showing that the `pie` USE flag is forced.
Created attachment 762107 [details, diff] Fix the bug This patch fixes the bug. It can be applied directly as a commit on top of proj/crossdev.git
Has anyone by any chance been able to look at this yet?
(In reply to Oskari Pirhonen from comment #3) > Has anyone by any chance been able to look at this yet? It's only been a week, but I'd probably prefer vapier look at it rather than do it myself given I'm not sure if there's going to be a simpler way of doing it or something. Thanks for the patch!
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=c439961a06625b27d39d683beee00e8c3a54005f commit c439961a06625b27d39d683beee00e8c3a54005f Author: Oskari Pirhonen <xxc3ncoredxx@gmail.com> AuthorDate: 2022-01-13 05:08:03 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-02-20 02:04:16 +0000 crossdev: use package.use.{mask,force} for pie/ssp A hardened host profile forces the pie and ssp USE flags which is overriding GUSE="-pie -ssp". Use package.use.mask and package.use.force to control the flags. Closes: https://bugs.gentoo.org/831165 Signed-off-by: Oskari Pirhonen <xxc3ncoredxx@gmail.com> Signed-off-by: Sam James <sam@gentoo.org> crossdev | 45 +++++++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 16 deletions(-)
Thanks for your contribution!