summaryrefslogtreecommitdiff
path: root/solenv/gcc-wrappers
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-08-18 12:04:17 +0200
committerMichael Stahl <mstahl@redhat.com>2014-08-18 12:21:09 +0200
commita18ff3d5c75c2b468c48bd19439dee0689d24d67 (patch)
tree9ac1209ba18ad3a5d04d2102b0a73bc8074c1d97 /solenv/gcc-wrappers
parent0e3a462c641a3a7a3b0d991463f9b05683c7ec5d (diff)
fdo#82430: gcc-wrappers: don't stop if REAL_CXX_FLAGS is empty
Hopefully should fix MSVC 2010 build... Change-Id: I3dc71acfa58cdf65dfc6d731d9ebb77fd18f7fac
Diffstat (limited to 'solenv/gcc-wrappers')
-rw-r--r--solenv/gcc-wrappers/g++.cxx2
-rw-r--r--solenv/gcc-wrappers/gcc.cxx2
-rw-r--r--solenv/gcc-wrappers/wrapper.cxx5
-rw-r--r--solenv/gcc-wrappers/wrapper.hxx2
4 files changed, 7 insertions, 4 deletions
diff --git a/solenv/gcc-wrappers/g++.cxx b/solenv/gcc-wrappers/g++.cxx
index 289d91973221..626b1643590c 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 8ff814856974..f34c2dba8c99 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 ccdf2065ffed..1b8d56223ca9 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 e2ffb01ca902..789bc9280267 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();