[Libreoffice-commits] core.git: solenv/gcc-wrappers
Michael Stahl
mstahl at redhat.com
Mon Aug 18 03:25:49 PDT 2014
solenv/gcc-wrappers/g++.cxx | 2 +-
solenv/gcc-wrappers/gcc.cxx | 2 +-
solenv/gcc-wrappers/wrapper.cxx | 5 ++++-
solenv/gcc-wrappers/wrapper.hxx | 2 +-
4 files changed, 7 insertions(+), 4 deletions(-)
New commits:
commit a18ff3d5c75c2b468c48bd19439dee0689d24d67
Author: Michael Stahl <mstahl at redhat.com>
Date: Mon Aug 18 12:04:17 2014 +0200
fdo#82430: gcc-wrappers: don't stop if REAL_CXX_FLAGS is empty
Hopefully should fix MSVC 2010 build...
Change-Id: I3dc71acfa58cdf65dfc6d731d9ebb77fd18f7fac
diff --git a/solenv/gcc-wrappers/g++.cxx b/solenv/gcc-wrappers/g++.cxx
index 289d919..626b164 100644
--- a/solenv/gcc-wrappers/g++.cxx
+++ b/solenv/gcc-wrappers/g++.cxx
@@ -13,7 +13,7 @@ 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 flags=getexe("REAL_CXX_FLAGS", true);
string args=flags.empty() ? string() : flags + " ";
args += processccargs(rawargs);
diff --git a/solenv/gcc-wrappers/gcc.cxx b/solenv/gcc-wrappers/gcc.cxx
index 8ff8148..f34c2db 100644
--- a/solenv/gcc-wrappers/gcc.cxx
+++ b/solenv/gcc-wrappers/gcc.cxx
@@ -13,7 +13,7 @@ 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 flags=getexe("REAL_CC_FLAGS", true);
string args=flags.empty() ? string() : flags + " ";
args += processccargs(rawargs);
diff --git a/solenv/gcc-wrappers/wrapper.cxx b/solenv/gcc-wrappers/wrapper.cxx
index ccdf206..1b8d562 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 e2ffb01..789bc92 100644
--- a/solenv/gcc-wrappers/wrapper.hxx
+++ b/solenv/gcc-wrappers/wrapper.hxx
@@ -16,7 +16,7 @@
using namespace std;
-string getexe(string exename);
+string getexe(string exename, bool maybeempty = false);
void setupccenv();
More information about the Libreoffice-commits
mailing list