| 1 |
#! /usr/bin/env python |
| 2 |
# encoding: utf-8 |
| 3 |
# harald at klimachs.de |
| 4 |
|
| 5 |
""" |
| 6 |
IBM XL Compiler for Blue Gene |
| 7 |
""" |
| 8 |
|
| 9 |
from waflib.Tools import ccroot,ar |
| 10 |
from waflib.Configure import conf |
| 11 |
|
| 12 |
from waflib.Tools import xlc # method xlc_common_flags |
| 13 |
from waflib.Tools.compiler_c import c_compiler |
| 14 |
c_compiler['linux'].append('c_bgxlc') |
| 15 |
|
| 16 |
@conf |
| 17 |
def find_bgxlc(conf): |
| 18 |
cc = conf.find_program(['bgxlc_r','bgxlc'], var='CC') |
| 19 |
conf.get_xlc_version(cc) |
| 20 |
conf.env.CC = cc |
| 21 |
conf.env.CC_NAME = 'bgxlc' |
| 22 |
|
| 23 |
def configure(conf): |
| 24 |
conf.find_bgxlc() |
| 25 |
conf.find_ar() |
| 26 |
conf.xlc_common_flags() |
| 27 |
conf.env.LINKFLAGS_cshlib = ['-G','-Wl,-bexpfull'] |
| 28 |
conf.env.LINKFLAGS_cprogram = [] |
| 29 |
conf.cc_load_tools() |
| 30 |
conf.cc_add_flags() |
| 31 |
conf.link_add_flags() |
| 32 |
|