summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKarsten Merker <merker@debian.org>2019-04-26 13:04:06 +0300
committerAnup Patel <anup@brainfault.org>2019-04-30 06:51:47 +0300
commitf9643f3472199f01e8eecdd6d50a379989646f03 (patch)
tree0c2e9cb9a7ee8b0fc054f6188bd572cecf4b8c13 /Makefile
parentc1d01b0c2efea86348235a1c7f83382e53f87e0e (diff)
downloadopensbi-f9643f3472199f01e8eecdd6d50a379989646f03.tar.xz
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 <merker@debian.org> Acked-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index abad95c..a62eb0e 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)