wafsamba: Also build libraries with RELRO protection
authorAndreas Schneider <asn@samba.org>
Fri, 19 Jun 2015 07:28:32 +0000 (09:28 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 19 Jun 2015 10:51:48 +0000 (12:51 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11346

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Jun 19 12:51:48 CEST 2015 on sn-devel-104

buildtools/wafsamba/wafsamba.py

index 64382da4e43a7a15a1f00117c171d45be57fc289..c27241eff8d9c6b41770b87f7ae122f09be1317b 100644 (file)
@@ -242,6 +242,8 @@ def SAMBA_LIBRARY(bld, libname, source,
                                     bundled_extension, private_library)
 
     ldflags = TO_LIST(ldflags)
+    if bld.env['ENABLE_RELRO'] is True:
+        ldflags.extend(TO_LIST('-Wl,-z,relro,-z,now'))
 
     features = 'cc cshlib symlink_lib install_lib'
     if pyext: