mirror of
https://git.yoctoproject.org/meta-zephyr
synced 2026-09-12 09:49:32 +02:00
zephyr-kernel/4.3: Fix sysrootarg
| build_elf(args.elf_file, args.includes) | ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/data/build-zephyr/tmp/work/intel_ehl_crb-zephyr/zephyr-helloworld/4.3.0+git/sources/zephyr-helloworld-4.3.0+git/zephyr/arch/x86/zefi/zefi.py", line 120, in build_elf | ["-fno-stack-protector", "-fpic", "-mno-red-zone", "-fshort-wchar", sysrootarg, | ^^^^^^^^^^ | NameError: name 'sysrootarg' is not defined | ninja: build stopped: subcommand failed. Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
This commit is contained in:
@@ -24,11 +24,12 @@ diff --git a/arch/x86/zefi/zefi.py b/arch/x86/zefi/zefi.py
|
||||
index b98419f8a49..790797f011a 100755
|
||||
--- a/arch/x86/zefi/zefi.py
|
||||
+++ b/arch/x86/zefi/zefi.py
|
||||
@@ -115,8 +115,9 @@ def build_elf(elf_file, include_dirs):
|
||||
@@ -115,8 +115,10 @@ def build_elf(elf_file, include_dirs):
|
||||
includes = []
|
||||
for include_dir in include_dirs:
|
||||
includes.extend(["-I", include_dir])
|
||||
+ # Pass --sysroot path for cross compilation
|
||||
+ sysrootarg = "--sysroot=" + args.sysroot
|
||||
cmd = ([args.compiler, "-shared", "-Wall", "-Werror", "-I."] + includes +
|
||||
- ["-fno-stack-protector", "-fpic", "-mno-red-zone", "-fshort-wchar",
|
||||
+ ["-fno-stack-protector", "-fpic", "-mno-red-zone", "-fshort-wchar", sysrootarg,
|
||||
|
||||
Reference in New Issue
Block a user