summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/wafsamba.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index aaa09392f1..caa6fb128d 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -348,6 +348,8 @@ def SAMBA_BINARY(bld, binname, source,
if bld.env['ENABLE_PIE'] == True:
pie_cflags += ' -fPIE'
pie_ldflags.extend(TO_LIST('-pie'))
+ if bld.env['ENABLE_RELRO'] == True:
+ pie_ldflags.extend(TO_LIST('-Wl,-z,relro,-z,now'))
# first create a target for building the object files for this binary
# by separating in this way, we avoid recompiling the C files