mirror of
https://git.yoctoproject.org/meta-zephyr
synced 2026-09-15 18:49:31 +02:00
zephyr-kernel: fix cross compilation
set CONFIG_STATIC_INIT_GNU=y when cross-compile toochain selected. Fix: | /data/wrynose/bitbake-builds/zephyr-master/build/tmp/work/i586-yocto-elf/zephyr-helloworld/4.3.0+git/recipe-sysroot-native/usr/bin/i586-yocto-elf/i586-yocto-elf-ld.bfd: GNU-style constructors required but STATIC_INIT_GNU not enabled | /data/wrynose/bitbake-builds/zephyr-master/build/tmp/work/i586-yocto-elf/zephyr-helloworld/4.3.0+git/recipe-sysroot-native/usr/bin/i586-yocto-elf/i586-yocto-elf-ld.bfd: warning: zephyr/zephyr_pre0.elf has a LOAD segment with RWX permissions | collect2: error: ld returned 1 exit status | ninja: build stopped: subcommand failed. Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
This commit is contained in:
@@ -26,6 +26,7 @@ EXTRA_OECMAKE = "\
|
||||
-DSOC_ROOT=${SOC_ROOT} \
|
||||
-DZEPHYR_TOOLCHAIN_VARIANT=${ZEPHYR_TOOLCHAIN_VARIANT} \
|
||||
-DZEPHYR_MODULES=${ZEPHYR_MODULES} \
|
||||
${@bb.utils.contains('ZEPHYR_TOOLCHAIN_VARIANT', 'cross-compile', '-DCONFIG_STATIC_INIT_GNU=y', '', d)} \
|
||||
"
|
||||
|
||||
ZEPHYR_EXTRA_MODULES = ""
|
||||
|
||||
Reference in New Issue
Block a user