[gtk+/gtk-2-24] Visual Studio builds: Improve binary security



commit b7e5da4cd4c929cbb8931c1834485ec188819b1c
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Oct 20 17:08:29 2017 +0800

    Visual Studio builds: Improve binary security
    
    Ensure that the /DYNAMICBASE linker option (which is actually the
    default option) is enabled, as we inadvertly disabled it in our
    projects.
    
    Also, for x64 builds on MSVC 2012 or later, use the /HIGHENTROPYVA
    linker option to improve the security of the built bianries.
    
    Pointed out by Ignacio Casal Quinteiro.

 build/win32/vs10/gtk-build-defines.props       |    4 ++++
 build/win32/vs10/gtk-demo.vcxprojin            |    4 ----
 build/win32/vs10/gtk-update-icon-cache.vcxproj |    4 ----
 build/win32/vs9/gtk-demo.vcprojin              |    4 ----
 4 files changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/build/win32/vs10/gtk-build-defines.props b/build/win32/vs10/gtk-build-defines.props
index 849c963..f40cc24 100644
--- a/build/win32/vs10/gtk-build-defines.props
+++ b/build/win32/vs10/gtk-build-defines.props
@@ -27,6 +27,10 @@
        <Link>
       
<AdditionalDependencies>pangocairo-1.0.lib;cairo.lib;pango-1.0.lib;gdk_pixbuf-2.0.lib;gio-2.0.lib;gmodule-2.0.lib;gobject-2.0.lib;glib-2.0.lib;intl.lib;%(AdditionalDependencies)</AdditionalDependencies>
       
<AdditionalLibraryDirectories>$(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalOptions Condition="'$(VisualStudioVersion)|$(Platform)'=='11.0|x64'">/HIGHENTROPYVA 
%(AdditionalOptions)</AdditionalOptions>
+      <AdditionalOptions Condition="'$(VisualStudioVersion)|$(Platform)'=='12.0|x64'">/HIGHENTROPYVA 
%(AdditionalOptions)</AdditionalOptions>
+      <AdditionalOptions Condition="'$(VisualStudioVersion)|$(Platform)'=='14.0|x64'">/HIGHENTROPYVA 
%(AdditionalOptions)</AdditionalOptions>
+      <AdditionalOptions Condition="'$(VisualStudioVersion)|$(Platform)'=='15.0|x64'">/HIGHENTROPYVA 
%(AdditionalOptions)</AdditionalOptions>
     </Link>
   </ItemDefinitionGroup>
   <ItemGroup>
diff --git a/build/win32/vs10/gtk-demo.vcxprojin b/build/win32/vs10/gtk-demo.vcxprojin
index 7eb809c..692458d 100644
--- a/build/win32/vs10/gtk-demo.vcxprojin
+++ b/build/win32/vs10/gtk-demo.vcxprojin
@@ -90,7 +90,6 @@
       
<AdditionalDependencies>cairo.lib;pango-1.0.lib;pangocairo-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Console</SubSystem>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
       <DataExecutionPrevention>
       </DataExecutionPrevention>
       <TargetMachine>MachineX86</TargetMachine>
@@ -114,7 +113,6 @@
       
<AdditionalDependencies>cairo.lib;pango-1.0.lib;pangocairo-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Console</SubSystem>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
       <DataExecutionPrevention>
       </DataExecutionPrevention>
       <TargetMachine>MachineX64</TargetMachine>
@@ -137,7 +135,6 @@
       <SubSystem>Console</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
       <DataExecutionPrevention>
       </DataExecutionPrevention>
       <TargetMachine>MachineX86</TargetMachine>
@@ -160,7 +157,6 @@
       <SubSystem>Console</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
       <DataExecutionPrevention>
       </DataExecutionPrevention>
       <TargetMachine>MachineX64</TargetMachine>
diff --git a/build/win32/vs10/gtk-update-icon-cache.vcxproj b/build/win32/vs10/gtk-update-icon-cache.vcxproj
index 7fbcf35..ba8a297 100644
--- a/build/win32/vs10/gtk-update-icon-cache.vcxproj
+++ b/build/win32/vs10/gtk-update-icon-cache.vcxproj
@@ -90,7 +90,6 @@
       <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Console</SubSystem>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
       <DataExecutionPrevention>
       </DataExecutionPrevention>
       <TargetMachine>MachineX86</TargetMachine>
@@ -114,7 +113,6 @@
       <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Console</SubSystem>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
       <DataExecutionPrevention>
       </DataExecutionPrevention>
       <TargetMachine>MachineX64</TargetMachine>
@@ -137,7 +135,6 @@
       <SubSystem>Console</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
       <DataExecutionPrevention>
       </DataExecutionPrevention>
       <TargetMachine>MachineX86</TargetMachine>
@@ -160,7 +157,6 @@
       <SubSystem>Console</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
       <DataExecutionPrevention>
       </DataExecutionPrevention>
       <TargetMachine>MachineX64</TargetMachine>
diff --git a/build/win32/vs9/gtk-demo.vcprojin b/build/win32/vs9/gtk-demo.vcprojin
index 8076d55..346d569 100644
--- a/build/win32/vs9/gtk-demo.vcprojin
+++ b/build/win32/vs9/gtk-demo.vcprojin
@@ -47,7 +47,6 @@
                                LinkIncremental="2"
                                GenerateDebugInformation="true"
                                SubSystem="1"
-                               RandomizedBaseAddress="1"
                                DataExecutionPrevention="0"
                                TargetMachine="1"
                        />
@@ -80,7 +79,6 @@
                                LinkIncremental="2"
                                GenerateDebugInformation="true"
                                SubSystem="1"
-                               RandomizedBaseAddress="1"
                                DataExecutionPrevention="0"
                                TargetMachine="17"
                        />
@@ -113,7 +111,6 @@
                                SubSystem="1"
                                OptimizeReferences="2"
                                EnableCOMDATFolding="2"
-                               RandomizedBaseAddress="1"
                                DataExecutionPrevention="0"
                                TargetMachine="1"
                        />
@@ -146,7 +143,6 @@
                                SubSystem="1"
                                OptimizeReferences="2"
                                EnableCOMDATFolding="2"
-                               RandomizedBaseAddress="1"
                                DataExecutionPrevention="0"
                                TargetMachine="17"
                        />


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]