diff mbox series

[meta-zephyr,1/4] zephyr-kernel/4.3: Fix sysrootarg

Message ID 20260518051437.693745-1-chee.yang.lee@intel.com
State New
Headers show
Series [meta-zephyr,1/4] zephyr-kernel/4.3: Fix sysrootarg | expand

Commit Message

Lee, Chee Yang May 18, 2026, 5:14 a.m. UTC
From: Lee Chee Yang <chee.yang.lee@intel.com>

|     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>
---
 ...-x86-fix-efi-binary-generation-issue-in-cross-compila.patch | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-v4.3.0-x86-fix-efi-binary-generation-issue-in-cross-compila.patch b/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-v4.3.0-x86-fix-efi-binary-generation-issue-in-cross-compila.patch
index ba454a9..fe7b7ef 100644
--- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-v4.3.0-x86-fix-efi-binary-generation-issue-in-cross-compila.patch
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-v4.3.0-x86-fix-efi-binary-generation-issue-in-cross-compila.patch
@@ -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,