aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/cc')
-rw-r--r--libbuild2/cc/guess.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/libbuild2/cc/guess.cxx b/libbuild2/cc/guess.cxx
index ff96466..09e14fa 100644
--- a/libbuild2/cc/guess.cxx
+++ b/libbuild2/cc/guess.cxx
@@ -1815,7 +1815,8 @@ namespace build2
// See "Environment Variables Affecting GCC".
//
- // @@ TODO: It feels like we should unset the following variables:
+ // Note that we also check below that the following variables are not set
+ // since they would interfere with what we are doing.
//
// DEPENDENCIES_OUTPUT
// SUNPRO_DEPENDENCIES
@@ -2028,6 +2029,12 @@ namespace build2
// Environment.
//
+ if (getenv ("DEPENDENCIES_OUTPUT"))
+ fail << "GCC DEPENDENCIES_OUTPUT environment variable is set";
+
+ if (getenv ("SUNPRO_DEPENDENCIES"))
+ fail << "GCC SUNPRO_DEPENDENCIES environment variable is set";
+
const char* const* c_env (nullptr);
switch (xl)
{