scons: add /dynamicbase and /nxcompat to MinGW linkflags
authorJosé Fonseca <jfonseca@vmware.com>
Thu, 11 Sep 2014 10:43:04 +0000 (11:43 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 11 Sep 2014 10:59:28 +0000 (11:59 +0100)
Just like b26503b196d51dc46c815e241343e42ab30e8d66 for MSVC.

scons/gallium.py

index b6c05ecd8001ba40dd19f03d312733018e77040c..1dcfa6b243c2ff96cb19bc93241cc640d405525e 100755 (executable)
@@ -529,6 +529,10 @@ def generate(env):
         else:
             env['_LIBFLAGS'] = '-Wl,--start-group ' + env['_LIBFLAGS'] + ' -Wl,--end-group'
         if env['platform'] == 'windows':
+            linkflags += [
+                '-Wl,--nxcompat', # DEP
+                '-Wl,--dynamicbase', # ASLR
+            ]
             # Avoid depending on gcc runtime DLLs
             linkflags += ['-static-libgcc']
             if 'w64' in env['CC'].split('-'):
@@ -547,8 +551,8 @@ def generate(env):
         linkflags += [
             '/fixed:no',
             '/incremental:no',
-            '/dynamicbase',
-            '/nxcompat',
+            '/dynamicbase', # ASLR
+            '/nxcompat', # DEP
         ]
     env.Append(LINKFLAGS = linkflags)
     env.Append(SHLINKFLAGS = shlinkflags)