summaryrefslogtreecommitdiffstats
path: root/solenv
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2012-12-10 19:33:43 +0200
committerTor Lillqvist <tlillqvist@suse.com>2012-12-10 19:43:18 +0200
commitc74fe188b178fab821084bb82d4574f77dc2e1ce (patch)
treead4133b92738f680fd3c6ecbdbe8fcf09e779782 /solenv
parentRevert "Use XNotifyingDispatch to avoid races" (diff)
downloadcore-c74fe188b178fab821084bb82d4574f77dc2e1ce.tar.gz
core-c74fe188b178fab821084bb82d4574f77dc2e1ce.zip
Create executables that can be run on Windows XP
Specify subsystem version 5.01 in the linker options. Otherwise, when built with the linker in Windows Kit 8.0, executables are created with the "operating system version" and "subsystem version" fields set to 6.0 (which means Vista). Attempting to run such executables on Windows XP fails with an error that claims them to be "invalid Win32 executables" (which is a blatant lie, of course). We can well set the subsystem version to 5.01 as we don't unconditionally use any APIs that wouldn't be present on XP. Note that you need Visual Studio 2012 Update 1 to be able to create code that runs on XP. The original version creates executables that importx entries from kernel32.dll like GetTickCount64 that aren't present on XP. Apparently it doesn't hurt on XP that DLL headers specify a "too new" subsystem version.
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/platform/com_MSC_class.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index ed08ec31cb19..2d4d19e048d7 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -187,7 +187,7 @@ $(call gb_Helper_abbreviate_dirs,\
$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
$(if $(filter StaticLibrary,$(TARGETTYPE)),$(gb_StaticLibrary_TARGETTYPEFLAGS)) \
$(if $(filter Executable,$(TARGETTYPE)),$(gb_Executable_TARGETTYPEFLAGS)) \
- $(if $(filter YES,$(TARGETGUI)), -SUBSYSTEM:WINDOWS, -SUBSYSTEM:CONSOLE) \
+ $(if $(filter YES,$(TARGETGUI)), -SUBSYSTEM:WINDOWS$(COMMA)5.01, -SUBSYSTEM:CONSOLE$(COMMA)5.01) \
$(if $(filter YES,$(LIBRARY_X64)), -MACHINE:X64) \
$(if $(filter YES,$(LIBRARY_X64)), -LIBPATH:$(OUTDIR)/lib/x64 -LIBPATH:$(COMPATH)/lib/amd64 -LIBPATH:$(WINDOWS_SDK_HOME)/lib/x64 \
$(if $(filter 80,$(WINDOWS_SDK_VERSION)),-LIBPATH:$(WINDOWS_SDK_HOME)/lib/win8/um/x64,),) \