From f9643f3472199f01e8eecdd6d50a379989646f03 Mon Sep 17 00:00:00 2001 From: Karsten Merker Date: Fri, 26 Apr 2019 12:04:06 +0200 Subject: [PATCH] Makefile: explicitly disable PIE The various available RISC-V toolchains differ in their default configuration regarding PIE, e.g. the buildroot RISC-V toolchain has PIE disabled by default while the Debian toolchain has it enabled by default. OpenSBI currently doesn't support being built with PIE enabled, therefore disable it explicitly by passing "-fno-pie -no-pie" in CFLAGS. Signed-off-by: Karsten Merker Acked-by: Anup Patel --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index abad95c1..a62eb0ef 100644 --- a/Makefile +++ b/Makefile @@ -164,6 +164,7 @@ CFLAGS += -mcmodel=$(PLATFORM_RISCV_CODE_MODEL) CFLAGS += $(GENFLAGS) CFLAGS += $(platform-cflags-y) CFLAGS += $(firmware-cflags-y) +CFLAGS += -fno-pie -no-pie CPPFLAGS += $(GENFLAGS) CPPFLAGS += $(platform-cppflags-y)