board/qemu: add xtensa kernel patch
commit: https://gitlab.com/buildroot.org/buildroot/-/commit/79fd6241e4347f67d659cc02669448397b458d52
branch: https://gitlab.com/buildroot.org/buildroot/-/tree/master
-fno-stack-protector must be passed to avoid linking errors related to undefined references to '__stack_chk_guard' and '__stack_chk_fail' if toolchain enforces -fstack-protector.
Fixes:
https://gitlab.com/buildroot.org/toolchains-builder/-/jobs/15876432953
Signed-off-by Romain Naour <[email protected]>
Signed-off-by Julien Olivain <[email protected]>
--- .../0001-xtensa-disable-SSP-when-needed.patch | 36 ++++++++++++++++++++++ configs/qemu_xtensa_lx60_defconfig | 2 +- configs/qemu_xtensa_lx60_nommu_defconfig | 2 +- 3 files changed, 38 insertions(+), 2 deletions(-)
board/qemu/xtensa-lx60/patches/linux/0001-xtensa-disable-SSP-when-needed.patch new file +36 -0
@@ -0,0 +1,36 @@ +From 5358d4e20801ffbb1c0834eab36c003049d4055f Mon Sep 17 00:00:00 2001 +From: Romain Naour <[email protected]> +Date: Sun, 16 Aug 2026 22:27:28 +0200 +Subject: [PATCH] xtensa: disable SSP when needed + +-fno-stack-protector must be passed to avoid linking errors related to +undefined references to '__stack_chk_guard' and '__stack_chk_fail' if +toolchain enforces -fstack-protector. + +Fixes: +https://gitlab.com/buildroot.org/toolchains-builder/-/jobs/15876432953 + +Upstream: Submitted to Max Filippov via email for initial review. + +Cc: Max Filippov <[email protected]> +Signed-off-by: Romain Naour <[email protected]> +--- + arch/xtensa/boot/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/xtensa/boot/Makefile b/arch/xtensa/boot/Makefile +index d8b0fadf429a9..dfb758cdb2756 100644 +--- a/arch/xtensa/boot/Makefile ++++ b/arch/xtensa/boot/Makefile +@@ -9,7 +9,7 @@ + + + # KBUILD_CFLAGS used when building rest of boot (takes effect recursively) +-KBUILD_CFLAGS += -fno-builtin ++KBUILD_CFLAGS += -fno-builtin -fno-stack-protector + + subdir-y := lib + targets += vmlinux.bin vmlinux.bin.gz +-- +2.55.0 +
configs/qemu_xtensa_lx60_defconfig +1 -1
@@ -2,7 +2,7 @@ BR2_xtensa=y BR2_XTENSA_CUSTOM=y BR2_XTENSA_OVERLAY_FILE="https://github.com/jcmvbkbc/xtensa-toolchain-build/raw/95291b7c39e6f790d0b2f062c945a630290f2c81/overlays/xtensa_dc233c.tar.gz" BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_18=y -BR2_GLOBAL_PATCH_DIR="board/qemu/patches" +BR2_GLOBAL_PATCH_DIR="board/qemu/patches board/qemu/xtensa-lx60/patches" BR2_DOWNLOAD_FORCE_CHECK_HASHES=y BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" BR2_SYSTEM_DHCP="eth0"
configs/qemu_xtensa_lx60_nommu_defconfig +1 -1
@@ -3,7 +3,7 @@ BR2_XTENSA_CUSTOM=y BR2_XTENSA_OVERLAY_FILE="https://github.com/jcmvbkbc/xtensa-toolchain-build/raw/95291b7c39e6f790d0b2f062c945a630290f2c81/overlays/xtensa_dc233c.tar.gz" # BR2_XTENSA_USE_MMU is not set BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_18=y -BR2_GLOBAL_PATCH_DIR="board/qemu/patches" +BR2_GLOBAL_PATCH_DIR="board/qemu/patches board/qemu/xtensa-lx60/patches" BR2_DOWNLOAD_FORCE_CHECK_HASHES=y BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" BR2_SYSTEM_DHCP="eth0"
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot