summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabrice Fontaine <fontaine.fabrice@gmail.com>2021-05-15 11:16:38 +0300
committerAnup Patel <anup@brainfault.org>2021-05-19 14:07:50 +0300
commit6139ab272b1e69e4ff8a37655969c877ae86de49 (patch)
tree75a311d966b9259b4361bace3706f9dfaaa44a73
parente822b7504df0583a6a227d51cb7da8ea9fc79c0a (diff)
downloadopensbi-6139ab272b1e69e4ff8a37655969c877ae86de49.tar.xz
Makefile: unconditionally disable SSP
Though -nostdlib is passed in CFLAGS, -fno-stack-protector must also 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/kubu93/buildroot/-/jobs/1247043359 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Xiang W <wxjstz@126.com>
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index eeffe6b..6b64205 100644
--- a/Makefile
+++ b/Makefile
@@ -203,7 +203,7 @@ GENFLAGS += $(libsbiutils-genflags-y)
GENFLAGS += $(platform-genflags-y)
GENFLAGS += $(firmware-genflags-y)
-CFLAGS = -g -Wall -Werror -ffreestanding -nostdlib -fno-strict-aliasing -O2
+CFLAGS = -g -Wall -Werror -ffreestanding -nostdlib -fno-stack-protector -fno-strict-aliasing -O2
CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
CFLAGS += -mno-save-restore -mstrict-align
CFLAGS += -mabi=$(PLATFORM_RISCV_ABI) -march=$(PLATFORM_RISCV_ISA)