summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2015-03-19 22:57:11 +0100
committerBen Noordhuis <info@bnoordhuis.nl>2015-03-19 23:48:39 +0100
commit4c731042d4b9d3387c9269b10aa19e5ef88d98b3 (patch)
treef6c7aa3a83ce9c8b026fda1a1a74508070284744 /configure
parent2034137385e8b77cf09a379efb0700f67b57e658 (diff)
downloadandroid-node-v8-4c731042d4b9d3387c9269b10aa19e5ef88d98b3.tar.gz
android-node-v8-4c731042d4b9d3387c9269b10aa19e5ef88d98b3.tar.bz2
android-node-v8-4c731042d4b9d3387c9269b10aa19e5ef88d98b3.zip
configure: use cc and c++ as defaults on os x
Commit 8b2363d ("configure: use gcc and g++ as CC and CXX defaults") switches the CC and CXX defaults but it turns out that GYP uses cc and c++ as defaults on OS X. It also made the configure script complain about old compilers because the xcode gcc identifies as v4.2.1, whereas cc is less ambiguous about it being a clang hybrid. PR-URL: https://github.com/iojs/io.js/pull/1210 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure7
1 files changed, 4 insertions, 3 deletions
diff --git a/configure b/configure
index e595da74ce..2c44090c3c 100755
--- a/configure
+++ b/configure
@@ -9,9 +9,10 @@ import sys
import shutil
import string
-# gcc and g++ as defaults matches what GYP's Makefile generator does.
-CC = os.environ.get('CC', 'gcc')
-CXX = os.environ.get('CXX', 'g++')
+# gcc and g++ as defaults matches what GYP's Makefile generator does,
+# except on OS X.
+CC = os.environ.get('CC', 'cc' if sys.platform == 'darwin' else 'gcc')
+CXX = os.environ.get('CXX', 'c++' if sys.platform == 'darwin' else 'g++')
root_dir = os.path.dirname(__file__)
sys.path.insert(0, os.path.join(root_dir, 'tools', 'gyp', 'pylib'))