summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2024-01-18 15:51:36 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2024-01-18 18:31:47 +0100
commit741f4c710929e3cf866e64293449e07226cc234f (patch)
tree561db68bb9f77462672eb789004c010621c2563a /mk
parentcffbf276bc292ec621c3fbca95e45022201437b2 (diff)
noMMU ELF needs -fpie/pie
Diffstat (limited to 'mk')
-rw-r--r--mk/vars.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/mk/vars.mk b/mk/vars.mk
index 87a622c25..d99634443 100644
--- a/mk/vars.mk
+++ b/mk/vars.mk
@@ -218,6 +218,10 @@ TARGET_CFLAGS+= -static
TARGET_CXXFLAGS+= -static
TARGET_LDFLAGS+= -static
endif
+else
+TARGET_CFLAGS+= -fpie
+TARGET_CXXFLAGS+= -fpie
+TARGET_LDFLAGS+= -fpie -pie
endif
ifneq ($(ADK_TARGET_USE_SSP),)