[gtk+/gtk-3-22] Visual Studio builds: Improve binary security



commit 9c1a0b80aec7dd527b3390fcac8fee57a4c6a2af
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Oct 20 17:01:30 2017 +0800

    Visual Studio builds: Improve binary security
    
    Ensure that the /DYNAMICBASE linker option (which is actually the
    default) is enabled for all of our Visual Studio project builds, as the
    gtk3-demo projects inadvertly disabled it.
    
    Also, for x64 builds on MSVC 2012 or later, enable /HIGHENTROPYVA to
    enhance the security of our binaries as well.
    
    Pointed out by Ignacio Casal Quinteiro.

 build/win32/vs10/gtk3-build-defines.props |    4 ++++
 build/win32/vs10/gtk3-demo.vcxprojin      |    4 ----
 build/win32/vs9/gtk3-demo.vcprojin        |    4 ----
 3 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/build/win32/vs10/gtk3-build-defines.props b/build/win32/vs10/gtk3-build-defines.props
index fb92127..1c4a541 100644
--- a/build/win32/vs10/gtk3-build-defines.props
+++ b/build/win32/vs10/gtk3-build-defines.props
@@ -35,6 +35,10 @@ nmake -f gtk-introspection-msvc.mak CFG=$(Configuration) PREFIX=$(GlibEtcInstall
     <Link>
       
<AdditionalDependencies>pangocairo-1.0.lib;cairo.lib;cairo-gobject.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;epoxy.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/gtk3-demo.vcxprojin b/build/win32/vs10/gtk3-demo.vcxprojin
index 0abda49..ef92af8 100644
--- a/build/win32/vs10/gtk3-demo.vcxprojin
+++ b/build/win32/vs10/gtk3-demo.vcxprojin
@@ -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 @@
       <FunctionLevelLinking>false</FunctionLevelLinking>
       <OptimizeReferences>true</OptimizeReferences>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
       <DataExecutionPrevention>
       </DataExecutionPrevention>
       <TargetMachine>MachineX86</TargetMachine>
@@ -138,7 +136,6 @@
       <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Console</SubSystem>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
       <DataExecutionPrevention>
       </DataExecutionPrevention>
       <TargetMachine>MachineX64</TargetMachine>
@@ -162,7 +159,6 @@
       <FunctionLevelLinking>false</FunctionLevelLinking>
       <OptimizeReferences>true</OptimizeReferences>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>
       <DataExecutionPrevention>
       </DataExecutionPrevention>
       <TargetMachine>MachineX64</TargetMachine>
diff --git a/build/win32/vs9/gtk3-demo.vcprojin b/build/win32/vs9/gtk3-demo.vcprojin
index f8aef24..e7e5507 100644
--- a/build/win32/vs9/gtk3-demo.vcprojin
+++ b/build/win32/vs9/gtk3-demo.vcprojin
@@ -47,7 +47,6 @@
                                LinkIncremental="1"
                                GenerateDebugInformation="true"
                                SubSystem="1"
-                               RandomizedBaseAddress="1"
                                DataExecutionPrevention="0"
                                TargetMachine="1"
                        />
@@ -80,7 +79,6 @@
                                LinkIncremental="1"
                                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]