[OE-core] [PATCH 0/1] Add PREFIX and EXEC_PREFIX to gccrelocprefix section

Mark Hatle mark.hatle at kernel.crashing.org
Mon Nov 18 17:17:29 UTC 2019


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(-)

-- 
2.17.1



More information about the Openembedded-core mailing list