[Libreoffice-commits] .: solenv/gbuild
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Dec 10 09:46:26 PST 2012
solenv/gbuild/platform/com_MSC_class.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit c74fe188b178fab821084bb82d4574f77dc2e1ce
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Mon Dec 10 19:33:43 2012 +0200
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.
diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index ed08ec3..2d4d19e 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,),) \
More information about the Libreoffice-commits
mailing list