diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-08-08 14:58:08 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2014-08-26 01:10:23 +0200 |
commit | 31c1ceaf50f911b5ea22a1f7770b961343483230 (patch) | |
tree | 87dcac6a8e47225b7ffaa8c769496883961a1e8b /solenv/gcc-wrappers | |
parent | 2d32d70f646e04c28d44fabd9e77d56a812d2aec (diff) |
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
(cherry picked from commit 8bd6bf93b7711a7ac7c5cbd7c3bb980481570ebd)
fdo#82430: MSVC 2010 refuses both -clr and -arch in the same command
(cherry picked from commit 36ce22f41a754fa405804434899a08a23081e721)
fdo#82430: gcc-wrappers: don't stop if REAL_CXX_FLAGS is empty
Hopefully should fix MSVC 2010 build...
(cherry picked from commit a18ff3d5c75c2b468c48bd19439dee0689d24d67)
Change-Id: Ie8253137db2699f2a7fa69c4ac4e7ded90931e3e
Reviewed-on: https://gerrit.libreoffice.org/10925
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
(cherry picked from commit f83c7358964cf9f265f21e7dfa72e82a26923b3e)
Diffstat (limited to 'solenv/gcc-wrappers')
-rw-r--r-- | solenv/gcc-wrappers/g++.cxx | 4 | ||||
-rw-r--r-- | solenv/gcc-wrappers/gcc.cxx | 4 | ||||
-rw-r--r-- | solenv/gcc-wrappers/wrapper.cxx | 5 | ||||
-rw-r--r-- | solenv/gcc-wrappers/wrapper.hxx | 2 |
4 files changed, 11 insertions, 4 deletions
diff --git a/solenv/gcc-wrappers/g++.cxx b/solenv/gcc-wrappers/g++.cxx index d2ee3d555e0a..626b1643590c 100644 --- a/solenv/gcc-wrappers/g++.cxx +++ b/solenv/gcc-wrappers/g++.cxx @@ -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", true); - string args=processccargs(rawargs); + string args=flags.empty() ? string() : flags + " "; + args += processccargs(rawargs); setupccenv(); diff --git a/solenv/gcc-wrappers/gcc.cxx b/solenv/gcc-wrappers/gcc.cxx index b8983cf6e5e6..f34c2dba8c99 100644 --- a/solenv/gcc-wrappers/gcc.cxx +++ b/solenv/gcc-wrappers/gcc.cxx @@ -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", true); - string args=processccargs(rawargs); + string args=flags.empty() ? string() : flags + " "; + args += processccargs(rawargs); setupccenv(); diff --git a/solenv/gcc-wrappers/wrapper.cxx b/solenv/gcc-wrappers/wrapper.cxx index ba22e1642630..585a7df4c95c 100644 --- a/solenv/gcc-wrappers/wrapper.cxx +++ b/solenv/gcc-wrappers/wrapper.cxx @@ -15,11 +15,14 @@ #define BUFLEN 2048 -string getexe(string exename) { +string getexe(string exename, bool maybeempty) { char* cmdbuf; size_t cmdlen; _dupenv_s(&cmdbuf,&cmdlen,exename.c_str()); if(!cmdbuf) { + if (maybeempty) { + return string(); + } cout << "Error " << exename << " not defined. Did you forget to source the environment?" << endl; exit(1); } diff --git a/solenv/gcc-wrappers/wrapper.hxx b/solenv/gcc-wrappers/wrapper.hxx index 985074196c75..36baa0899032 100644 --- a/solenv/gcc-wrappers/wrapper.hxx +++ b/solenv/gcc-wrappers/wrapper.hxx @@ -13,7 +13,7 @@ using namespace std; -string getexe(string exename); +string getexe(string exename, bool maybeempty = false); void setupccenv(); |