summaryrefslogtreecommitdiff
path: root/coreconf/check_cc.py
diff options
context:
space:
mode:
Diffstat (limited to 'coreconf/check_cc.py')
-rw-r--r--coreconf/check_cc.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/coreconf/check_cc.py b/coreconf/check_cc.py
index 6d7e38096..d0736af7d 100644
--- a/coreconf/check_cc.py
+++ b/coreconf/check_cc.py
@@ -10,8 +10,13 @@ def main():
else:
cc = os.environ.get('CC', 'cc')
try:
- cc_is_arg = sys.argv[1] in subprocess.check_output(
- [cc, '--version'], universal_newlines=True)
+ if sys.argv[1] == "cc":
+ cc_output = subprocess.check_output(
+ [cc, '--version'], universal_newlines=True)
+ cc_is_arg = "cc" in cc_output and not ("gcc" in cc_output)
+ else:
+ cc_is_arg = sys.argv[1] in subprocess.check_output(
+ [cc, '--version'], universal_newlines=True)
except OSError:
# We probably just don't have CC/cc.
cc_is_arg = False