summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2022-05-30 07:36:10 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2022-09-12 06:13:54 +0200
commit56ede91e9f8f8211a6fc62cd5f56d95a76fec9a7 (patch)
treec6e56dbfad98c1d507d8b1520680703191bb140b /mk
parent398c3143f730bde9574f32113377d77cd1cd3679 (diff)
riscv: use -fPIC for noMMU
Diffstat (limited to 'mk')
-rw-r--r--mk/vars.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/mk/vars.mk b/mk/vars.mk
index 2be0c33cb..047135c00 100644
--- a/mk/vars.mk
+++ b/mk/vars.mk
@@ -198,6 +198,12 @@ ifneq ($(ADK_TARGET_USE_LD_BIND_NOW),)
TARGET_LDFLAGS+= -Wl,-z,now
endif
+ifeq ($(ADK_TARGET_ARCH_RISCV64),y)
+ifeq ($(ADK_TARGET_BINFMT_FLAT),y)
+TARGET_CFLAGS+= -fPIC
+endif
+endif
+
# needed for musl ppc
ifeq ($(ADK_TARGET_ARCH_PPC),y)
ifeq ($(ADK_TARGET_LIB_MUSL),y)