Skip to content

Commit

Permalink
configure: use cc and c++ as defaults on os x
Browse files Browse the repository at this point in the history
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: #1210
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
  • Loading branch information
bnoordhuis committed Mar 19, 2015
1 parent 2034137 commit 4c73104
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down

0 comments on commit 4c73104

Please sign in to comment.