3 # Thomas Nagy, 2006-2008 (ita)
4 # Ralf Habacker, 2006 (rh)
9 import Configure
, Options
, Utils
11 from Configure
import conftest
15 cc
= conf
.find_program(['xlc_r', 'xlc'], var
='CC', mandatory
=True)
16 cc
= conf
.cmd_to_list(cc
)
17 conf
.env
.CC_NAME
= 'xlc'
24 if v
['CPP']: cpp
= v
['CPP']
25 elif 'CPP' in conf
.environ
: cpp
= conf
.environ
['CPP']
26 #if not cpp: cpp = v['CC']
30 def xlc_common_flags(conf
):
33 # CPPFLAGS CCDEFINES _CCINCFLAGS _CCDEFFLAGS
34 v
['CCFLAGS_DEBUG'] = ['-g']
35 v
['CCFLAGS_RELEASE'] = ['-O2']
38 v
['CC_TGT_F'] = ['-c', '-o', ''] # shell hack for -MD
39 v
['CPPPATH_ST'] = '-I%s' # template for adding include paths
42 if not v
['LINK_CC']: v
['LINK_CC'] = v
['CC']
44 v
['CCLNK_TGT_F'] = ['-o', ''] # shell hack for -MD
46 v
['LIB_ST'] = '-l%s' # template for adding libs
47 v
['LIBPATH_ST'] = '-L%s' # template for adding libpaths
48 v
['STATICLIB_ST'] = '-l%s'
49 v
['STATICLIBPATH_ST'] = '-L%s'
50 v
['RPATH_ST'] = '-Wl,-rpath,%s'
51 v
['CCDEFINES_ST'] = '-D%s'
54 v
['SHLIB_MARKER'] = ''
55 v
['STATICLIB_MARKER'] = ''
56 v
['FULLSTATIC_MARKER'] = '-static'
59 v
['program_LINKFLAGS'] = ['-Wl,-brtl']
60 v
['program_PATTERN'] = '%s'
63 v
['shlib_CCFLAGS'] = ['-fPIC', '-DPIC'] # avoid using -DPIC, -fPIC aleady defines the __PIC__ macro
64 v
['shlib_LINKFLAGS'] = ['-G', '-Wl,-brtl,-bexpfull']
65 v
['shlib_PATTERN'] = 'lib%s.so'
68 v
['staticlib_LINKFLAGS'] = ''
69 v
['staticlib_PATTERN'] = 'lib%s.a'
75 conf
.xlc_common_flags()