Skip to content

Add PREFIX and EXEC_PREFIX to gccrelocprefix section

Mark Hatle openembedded-core 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1gcc-9.2: Update the relocation patch to add PREFIX/EXEC_PREFIXmeta/recipes-devtools/gcc/gcc-9.2/0025-handle-sysroot-support-for-nativesdk-gcc.patch+159 -260 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1] Add PREFIX and EXEC_PREFIX to gccrelocprefix section

I have an unusual use-case that requires me to move the location of gcc. As part of this, I noticed that the built-in include paths were not being runtime relocated, while other paths were. It turns out this was becaue PREFIX/EXEC_PREFIX were being used as defined at build time, but the other prefixes were being used as relocated at SDK install time.

The patch set corrects this and adds PREFIX/EXEC_PREFIX to the list. There is no test case for this, as I'm not sure how we could ever test this with the standard OE SDKs.

The way I tested this code change was:

bitbake meta-toolchain

install the SDK

wrap all of the executables in the HOST sysroot with:

exec <LDSO> --library-path <LIBPATH>:<LIBBASEPATH> <executable> $@

mv the 'installed' version else where and then build a simple hellow world application.

Doing this before the change resulted in 'unable to find <stddef.h>', after the change it works as expected. Use the '-v' to inspect what it was doing it was clear that runtime relocation was NOT relocating the system include paths before the change.

Mark Hatle (1):
gcc-9.2: Update the relocation patch to add PREFIX/EXEC_PREFIX

 ...le-sysroot-support-for-nativesdk-gcc.patch | 185 +++++++++++++++---
 1 file changed, 159 insertions(+), 26 deletions(-)
Signature · 1 line
2.17.1