summaryrefslogtreecommitdiffstats
path: root/scripts/lib/scriptpath.py
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2025-03-24 09:33:41 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-03-27 11:19:04 +0000
commitc7779118be42d1f5817e1dc78a6c6c9c62397523 (patch)
tree977cf2bc08dc5093dde822e0233237c90b659a7b /scripts/lib/scriptpath.py
parent99d06739248ff733f0d0137de61dc1fa13bc244d (diff)
downloadpoky-c7779118be42d1f5817e1dc78a6c6c9c62397523.tar.gz
syslinux: Use -idirafter to add back path for system stdarg.h
syslinux uses -nostdinc to build freestanding, which makes sense, however it also tried to latch its own copy of stdarg.h to include system stdarg.h via "include_next" compiler magic, so it poses to provide own stdarg.h but then secretly include system version behind the scenes :) It uses -nostdinc -iwithprefix include hoping that gcc is uses and gcc has its include-fixed abstraction which also contains stdarg.h so in the end it will find a version of stdarg.h from system (even though it is from the compiler install ) and things will work. On musl, include-fixed is not expected and system includes are simplified so that everyone can look into <sysroot>/usr/include to find them. This can throw syslinux compilation into problems as now it does not find the header from -iprefix and ends up with errors like /mnt/b/yoe/master/sources/poky/build/tmp/work/core2-32-poky-linux-musl/syslinux/6.04-pre2/syslinux-6.04-pre2/com32/lib/../include/stdarg.h:9:15: fatal error: stdarg.h: No such file or directory 9 | #include_next <stdarg.h> | ^~~~~~~~~~ compilation terminated. Therefore, we use -idirafter to point it into target sysroot as fallback for system headers if it needs them, its added at the very last in search order. It also keeps working with glibc based toolchains as usual and also works with musl toolchains. (From OE-Core rev: 40413233429ceb902d8eb30ccc56aa7a182db772) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/scriptpath.py')
0 files changed, 0 insertions, 0 deletions