From d26259d84b81b8d6c3f844fb648ce51b2b8f0a8c Mon Sep 17 00:00:00 2001 From: hugoxue <363615638@qq.com> Date: Tue, 28 Apr 2026 14:01:52 +0800 Subject: [PATCH] fix(build): add -fno-stack-protector -fno-pic to CFLAGS New upstream aarch64-linux-gnu- toolchain requires explicit flags to disable stack protector and PIC. Without these, linker fails with undefined __stack_chk_guard/fail and Unexpected GOT entries. --- kernel/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/Makefile b/kernel/Makefile index f1aa36fa..9d6ec906 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -9,7 +9,7 @@ LD = $(TARGET_COMPILE)ld AS = $(TARGET_COMPILE)as OBJCOPY = $(TARGET_COMPILE)objcopy -CFLAGS += -Wall -fno-builtin -std=gnu11 -nostdinc -mgeneral-regs-only +CFLAGS += -Wall -fno-builtin -std=gnu11 -nostdinc -mgeneral-regs-only -fno-stack-protector -fno-pic CFLAGS += -g ifdef DEBUG