Issue 1510 - suncc and CC

This commit is contained in:
Thomas Nagy 2014-11-20 20:43:56 +01:00
parent 86245460d6
commit 1689bc658a
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
4 changed files with 4 additions and 23 deletions

View File

@ -3,7 +3,6 @@
# Thomas Nagy, 2006-2010 (ita) # Thomas Nagy, 2006-2010 (ita)
# Ralf Habacker, 2006 (rh) # Ralf Habacker, 2006 (rh)
import os
from waflib import Utils from waflib import Utils
from waflib.Tools import ccroot, ar from waflib.Tools import ccroot, ar
from waflib.Configure import conf from waflib.Configure import conf
@ -14,19 +13,13 @@ def find_scc(conf):
Detect the Sun C compiler Detect the Sun C compiler
""" """
v = conf.env v = conf.env
cc = None cc = conf.find_program('cc', var='CC')
if v['CC']: cc = v['CC']
elif 'CC' in conf.environ: cc = conf.environ['CC']
if not cc: cc = conf.find_program('cc', var='CC')
if not cc: conf.fatal('Could not find a Sun C compiler')
try: try:
conf.cmd_and_log(cc + ['-flags']) conf.cmd_and_log(cc + ['-flags'])
except Exception: except Exception:
conf.fatal('%r is not a Sun compiler' % cc) conf.fatal('%r is not a Sun compiler' % cc)
v.CC_NAME = 'sun'
v['CC'] = cc
v['CC_NAME'] = 'sun'
conf.get_suncc_version(cc) conf.get_suncc_version(cc)

View File

@ -3,7 +3,6 @@
# Thomas Nagy, 2006-2010 (ita) # Thomas Nagy, 2006-2010 (ita)
# Ralf Habacker, 2006 (rh) # Ralf Habacker, 2006 (rh)
import os
from waflib import Utils from waflib import Utils
from waflib.Tools import ccroot, ar from waflib.Tools import ccroot, ar
from waflib.Configure import conf from waflib.Configure import conf
@ -14,23 +13,14 @@ def find_sxx(conf):
Detect the sun C++ compiler Detect the sun C++ compiler
""" """
v = conf.env v = conf.env
cc = None cc = conf.find_program(['CC', 'c++'], var='CXX')
if v['CXX']: cc = v['CXX']
elif 'CXX' in conf.environ: cc = conf.environ['CXX']
if not cc: cc = conf.find_program('CC', var='CXX') #studio
if not cc: cc = conf.find_program('c++', var='CXX')
if not cc: conf.fatal('Could not find a Sun C++ compiler')
try: try:
conf.cmd_and_log(cc + ['-flags']) conf.cmd_and_log(cc + ['-flags'])
except Exception: except Exception:
conf.fatal('%r is not a Sun compiler' % cc) conf.fatal('%r is not a Sun compiler' % cc)
v.CXX_NAME = 'sun'
v['CXX'] = cc
v['CXX_NAME'] = 'sun'
conf.get_suncc_version(cc) conf.get_suncc_version(cc)
@conf @conf
def sxx_common_flags(conf): def sxx_common_flags(conf):
""" """

View File

@ -16,7 +16,6 @@ def find_xlc(conf):
cc = conf.find_program(['xlc_r', 'xlc'], var='CC') cc = conf.find_program(['xlc_r', 'xlc'], var='CC')
conf.get_xlc_version(cc) conf.get_xlc_version(cc)
conf.env.CC_NAME = 'xlc' conf.env.CC_NAME = 'xlc'
conf.env.CC = cc
@conf @conf
def xlc_common_flags(conf): def xlc_common_flags(conf):

View File

@ -16,7 +16,6 @@ def find_xlcxx(conf):
cxx = conf.find_program(['xlc++_r', 'xlc++'], var='CXX') cxx = conf.find_program(['xlc++_r', 'xlc++'], var='CXX')
conf.get_xlc_version(cxx) conf.get_xlc_version(cxx)
conf.env.CXX_NAME = 'xlc++' conf.env.CXX_NAME = 'xlc++'
conf.env.CXX = cxx
@conf @conf
def xlcxx_common_flags(conf): def xlcxx_common_flags(conf):