Kaydet (Commit) 8bd6bf93 authored tarafından Michael Stahl's avatar Michael Stahl

fdo#82430: configure: MSVC build: avoid using SSE2 instructions

MSVC 2012 for x86 defaults to -arch:SSE2; binaries do not run on any AMD
32-bit CPU, neither on Intel Pentium III.

http://msdn.microsoft.com/en-us/library/vstudio/7t5yh4fd%28v=vs.110%29.aspx

Change-Id: Ie8253137db2699f2a7fa69c4ac4e7ded90931e3e
üst 6a686b41
......@@ -3773,6 +3773,9 @@ if test "$_os" = "WINNT"; then
COMPATH=`echo $VC_PRODUCT_DIR`
fi
fi
if test "$BITNESS_OVERRIDE" = ""; then
CC="$CC -arch:SSE" # MSVC 2012 default for x86 is -arch:SSE2
fi
export INCLUDE=`cygpath -d "$COMPATH/Include"`
PathFormat "$COMPATH"
......
......@@ -31,7 +31,9 @@ $(call gb_ExternalProject_get_state_target,langtag,build):
$(if $(filter-out LINUX FREEBSD,$(OS)),,LDFLAGS="-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath,\\"\$$\$$ORIGIN:'\'\$$\$$ORIGIN/../ure-link/lib) \
$(if $(filter-out SOLARIS,$(OS)),,LDFLAGS="-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-R$(COMMA)\\"\$$\$$ORIGIN:'\'\$$\$$ORIGIN/../ure-link/lib) \
$(if $(filter-out WNTGCC,$(OS)$(COM)),,LDFLAGS="-Wl$(COMMA)--enable-runtime-pseudo-reloc-v2") \
&& $(if $(filter WNTMSC,$(OS)$(COM)),REAL_CC="$(shell cygpath -w $(lastword $(CC)))") \
&& $(if $(filter WNTMSC,$(OS)$(COM)),\
REAL_CC="$(shell cygpath -w $(lastword $(filter-out -%,$(CC))))" \
REAL_CC_FLAGS="$(filter -%,$(CC))") \
$(if $(VERBOSE)$(verbose),V=1) \
$(gb_Helper_set_ld_path) \
$(MAKE) \
......
......@@ -61,7 +61,7 @@ OPENSSL_PLATFORM := \
ifeq ($(COM),MSC)
$(call gb_ExternalProject_get_state_target,openssl,build):
$(call gb_ExternalProject_run,build,\
export CC="$(shell cygpath -w $(CC))" \
export CC="$(shell cygpath -w $(filter-out -%,$(CC))) $(filter -%,$(CC))" \
&& export PERL="$(shell cygpath -w $(PERL))" \
&& export LIB="$(ILIB)" \
&& $(PERL) Configure $(OPENSSL_PLATFORM) no-idea \
......
......@@ -506,9 +506,11 @@ endef
# /opt/lo/bin/ccache /cygdrive/c/PROGRA~2/MICROS~2.0/VC/bin/cl.exe
gb_AUTOCONF_WRAPPERS = \
REAL_CC="$(shell cygpath -w $(CC))" \
REAL_CC="$(shell cygpath -w $(filter-out -%,$(CC)))" \
REAL_CC_FLAGS="$(filter -%,$(CC))" \
CC="$(call gb_Executable_get_target,gcc-wrapper)" \
REAL_CXX="$(shell cygpath -w $(CXX))" \
REAL_CXX="$(shell cygpath -w $(filter-out -%,$(CXX)))" \
REAL_CXX_FLAGS="$(filter -%,$(CXX))" \
CXX="$(call gb_Executable_get_target,g++-wrapper)" \
LD="$(shell cygpath -w $(COMPATH)/bin/link.exe) -nologo"
......
......@@ -13,8 +13,10 @@ int main(int argc, char *argv[]) {
vector<string> rawargs(argv + 1, argv + argc);
string command=getexe("REAL_CXX");
string flags=getexe("REAL_CXX_FLAGS");
string args=processccargs(rawargs);
string args=flags.empty() ? string() : flags + " ";
args += processccargs(rawargs);
setupccenv();
......
......@@ -13,8 +13,10 @@ int main(int argc, char *argv[]) {
vector<string> rawargs(argv + 1, argv + argc);
string command=getexe("REAL_CC");
string flags=getexe("REAL_CC_FLAGS");
string args=processccargs(rawargs);
string args=flags.empty() ? string() : flags + " ";
args += processccargs(rawargs);
setupccenv();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment