Ejemplo n.º 1
0
def configure(conf):
    conf.find_pgi_compiler("CC", "pgcc")
    conf.find_ar()
    conf.gcc_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
Ejemplo n.º 2
0
def configure(conf):
	conf.find_pgi_compiler('CC', 'pgcc')
	conf.find_ar()
	conf.gcc_common_flags()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
Ejemplo n.º 3
0
def configure(conf):
    conf.find_sxc()
    conf.find_program("sxar", VAR="AR")
    conf.sxc_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
Ejemplo n.º 4
0
def mkspec_gxx_configure(conf, major, minor, prefix=None, minimum=False):
    """
    :param major:   The major version number of the compiler, e.g. 4
    :param minor:   The minor version number of the compiler, e.g. 6
    :param prefix:  Prefix to the compiler name, e.g. 'arm-linux-androideabi'
    :param minimum: Only check for a minimum compiler version, if true
    """
    # Where to look for the compiler
    paths = conf.mkspec_get_toolchain_paths()

    # Find g++ first
    gxx_names = conf.mkspec_get_gnu_binary_name('g++', major, minor, prefix)
    if minimum:
        gxx_names = 'g++'
    cxx = conf.find_program(gxx_names, path_list=paths)
    cxx = conf.cmd_to_list(cxx)
    conf.env['CXX'] = cxx
    conf.env['CXX_NAME'] = os.path.basename(conf.env.get_flat('CXX'))
    if minimum:
        conf.mkspec_check_minimum_cc_version(cxx, major, minor)
    else:
        conf.mkspec_check_cc_version(cxx, major, minor)

    # Also find gcc
    gcc_names = conf.mkspec_get_gnu_binary_name('gcc', major, minor, prefix)
    if minimum:
        gcc_names = 'gcc'
    cc = conf.find_program(gcc_names, path_list=paths)
    cc = conf.cmd_to_list(cc)
    conf.env['CC'] = cc
    conf.env['CC_NAME'] = os.path.basename(conf.env.get_flat('CC'))
    if minimum:
        conf.mkspec_check_minimum_cc_version(cc, major, minor)
    else:
        conf.mkspec_check_cc_version(cc, major, minor)

    # Find the archiver
    ar = conf.mkspec_get_ar_binary_name(prefix)
    conf.find_program(ar, path_list=paths, var='AR')
    conf.env.ARFLAGS = 'rcs'

    # Set up C++ tools and flags
    conf.gxx_common_flags()
    conf.gxx_modifier_platform()
    conf.cxx_load_tools()
    conf.cxx_add_flags()

    # Also set up C tools and flags
    conf.gcc_common_flags()
    conf.gcc_modifier_platform()
    conf.cc_load_tools()
    conf.cc_add_flags()

    # Add linker flags
    conf.link_add_flags()

    # Add our own cxx flags
    conf.mkspec_set_gxx_cxxflags()
    # Add our own cc flags
    conf.mkspec_set_gcc_ccflags()
Ejemplo n.º 5
0
def configure(conf):
    conf.find_pgi_compiler('CC', 'pgcc')
    conf.find_ar()
    conf.gcc_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
def setup_llvm_toolchain(conf, target, path_list=None):
    env = conf.env

    compiler = 'clang'

    env.stash()
    try:
        env['MACHINE'] = target

        if target:
            env['GNU_BINUTILS_PREFIX'] = "%s-" % target
        else:
            env['GNU_BINUTILS_PREFIX'] = ""

        conf.setup_gnu_binutils(path_list)

        config = conf.find_program('llvm-config', var='LLVM_CONFIG', path_list=path_list)
        env['LLVM_CONFIG'] = conf.cmd_to_list(config)

        cc = conf.find_program(compiler, var='CC', path_list=path_list)
        cc = conf.cmd_to_list(cc) + ['-target', target]

        env['CC_NAME']    = compiler
        env['CXX_NAME']   = compiler

        env['CC_VERSION'] = conf.cmd_and_log(env.LLVM_CONFIG + ["--version"]).strip().split('.')

        env.CC     = cc
        env['CXX'] = cc
        env.AS     = cc
        env.ARFLAGS = 'rcs'

        env['LINK_CC']  = env['CC']
        env['LINK_CXX'] = env['CC']

        conf.clang_common_flags()

        f = env.append_value
        f('INCLUDES', conf.cmd_and_log(env.LLVM_CONFIG + ["--includedir"]).splitlines())
        f('LIBPATH',  conf.cmd_and_log(env.LLVM_CONFIG + ["--libdir"]).splitlines())

        conf.env.AS_TGT_F = ['-c', '-o']
        conf.cc_add_flags()
        conf.link_add_flags()

        # we have to use gnu99 because we use some non standard gnu extensions conditionally
        # when __GNUC__ is defined
        env.append_value('CFLAGS_standard_c99', [ "-std=gnu99" ])

        #env.stash()
        #try:
        #    conf.env.prepend_value('LINKFLAGS', ['-v'])
        #    conf.env.prepend_value('CFLAGS', ['-v'])
        #    conf.check_cc(lib='c', msg = 'Checking if clang supports target %s' % target, okmsg='Yes', errmsg='No')
        #finally:
        #    env.revert()

    except conf.errors.ConfigurationError:
        env.revert()
        raise
Ejemplo n.º 7
0
def configure(conf):
    v = conf.env
    v.TI_CGT_DIR = getattr(Options.options, "ti-cgt-dir", "")
    v.TI_DSPLINK_DIR = getattr(Options.options, "ti-dsplink-dir", "")
    v.TI_BIOSUTILS_DIR = getattr(Options.options, "ti-biosutils-dir", "")
    v.TI_DSPBIOS_DIR = getattr(Options.options, "ti-dspbios-dir", "")
    v.TI_XDCTOOLS_DIR = getattr(Options.options, "ti-xdctools-dir", "")
    conf.find_ticc()
    conf.find_tiar()
    conf.find_tild()
    conf.ticc_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
    conf.find_program(["tconf"], var="TCONF", path_list=v.TI_XDCTOOLS_DIR)

    conf.env.TCONF_INCLUDES += [opj(conf.env.TI_DSPBIOS_DIR, "packages")]

    conf.env.INCLUDES += [opj(conf.env.TI_CGT_DIR, "include")]

    conf.env.LIBPATH += [opj(conf.env.TI_CGT_DIR, "lib")]

    conf.env.INCLUDES_DSPBIOS += [opj(conf.env.TI_DSPBIOS_DIR, "packages", "ti", "bios", "include")]

    conf.env.LIBPATH_DSPBIOS += [opj(conf.env.TI_DSPBIOS_DIR, "packages", "ti", "bios", "lib")]

    conf.env.INCLUDES_DSPLINK += [opj(conf.env.TI_DSPLINK_DIR, "dsplink", "dsp", "inc")]
Ejemplo n.º 8
0
def configure(conf):
    conf.find_sxc()
    conf.find_program('sxar', VAR='AR')
    conf.sxc_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
Ejemplo n.º 9
0
def configure(conf):
    libs       = ["c", "nosys", "m"]
    c_flags    = ["-mno-unaligned-access"]
    link_flags = ["-Wl,--gc-sections", "--specs=nano.specs"]

    # configure cc for arm
    conf.load("c_config")
    conf.find_armgcc()
    conf.cc_add_flags()
    conf.link_add_flags()
    conf.load("asm")

    conf.env.ARFLAGS = ['rcs']

    conf.env.CC_TGT_F            = ['-c', '-o']
    conf.env.AS_TGT_F            = ["-c", "-o"]
    conf.env.ASLNK_TGT_F         = ["-o"]
    conf.env.CCLNK_TGT_F         = ['-o']
    conf.env.CPPPATH_ST          = '-I%s'
    conf.env.DEFINES_ST          = '-D%s'
    conf.env.LIB_ST              = '-l%s' # template for adding libs
    conf.env.LIBPATH_ST          = '-L%s' # template for adding libpaths

    conf.env.CPPFLAGS.extend(c_flags)
    conf.env.CXXFLAGS.extend("-fno-exceptions")
    conf.env.LIB          = libs
    conf.env.LINKFLAGS    = link_flags
    conf.env.CXXLNK_TGT_F = ['-o']
    conf.env.CXX_TGT_F    = ['-c', '-o']
    conf.env.INCLUDES     = []
    conf.env.DEFINES      = []
Ejemplo n.º 10
0
def mkspec_gxx_configure(conf, major, minor, prefix=None, minimum=False):
    """
    :param major:   The major version number of the compiler, e.g. 4
    :param minor:   The minor version number of the compiler, e.g. 6
    :param prefix:  Prefix to the compiler name, e.g. 'arm-linux-androideabi'
    :param minimum: Only check for a minimum compiler version, if true
    """
    # Where to look for the compiler
    paths = conf.mkspec_get_toolchain_paths()

    # Find g++ first
    gxx_names = conf.mkspec_get_gnu_binary_name('g++', major, minor, prefix)
    if minimum:
        gxx_names = 'g++'
    cxx = conf.find_program(gxx_names, path_list=paths)
    cxx = conf.cmd_to_list(cxx)
    conf.env['CXX'] = cxx
    conf.env['CXX_NAME'] = os.path.basename(conf.env.get_flat('CXX'))
    if minimum:
        conf.mkspec_check_minimum_cc_version(cxx, major, minor)
    else:
        conf.mkspec_check_cc_version(cxx, major, minor)

    # Also find gcc
    gcc_names = conf.mkspec_get_gnu_binary_name('gcc', major, minor, prefix)
    if minimum:
        gcc_names = 'gcc'
    cc = conf.find_program(gcc_names, path_list=paths)
    cc = conf.cmd_to_list(cc)
    conf.env['CC'] = cc
    conf.env['CC_NAME'] = os.path.basename(conf.env.get_flat('CC'))
    if minimum:
        conf.mkspec_check_minimum_cc_version(cc, major, minor)
    else:
        conf.mkspec_check_cc_version(cc, major, minor)

    # Find the archiver
    ar = conf.mkspec_get_ar_binary_name(prefix)
    conf.find_program(ar, path_list=paths, var='AR')
    conf.env.ARFLAGS = 'rcs'

    # Set up C++ tools and flags
    conf.gxx_common_flags()
    conf.gxx_modifier_platform()
    conf.cxx_load_tools()
    conf.cxx_add_flags()

    # Also set up C tools and flags
    conf.gcc_common_flags()
    conf.gcc_modifier_platform()
    conf.cc_load_tools()
    conf.cc_add_flags()

    # Add linker flags
    conf.link_add_flags()

    # Add our own cxx flags
    conf.mkspec_set_gxx_cxxflags()
    # Add our own cc flags
    conf.mkspec_set_gcc_ccflags()
Ejemplo n.º 11
0
def configure(conf):
    conf.find_xlc()
    conf.find_ar()
    conf.xlc_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
Ejemplo n.º 12
0
def configure(conf):
    v = conf.env
    v.TI_CGT_DIR = getattr(Options.options, "ti-cgt-dir", "")
    v.TI_DSPLINK_DIR = getattr(Options.options, "ti-dsplink-dir", "")
    v.TI_BIOSUTILS_DIR = getattr(Options.options, "ti-biosutils-dir", "")
    v.TI_DSPBIOS_DIR = getattr(Options.options, "ti-dspbios-dir", "")
    v.TI_XDCTOOLS_DIR = getattr(Options.options, "ti-xdctools-dir", "")
    conf.find_ticc()
    conf.find_tiar()
    conf.find_tild()
    conf.ticc_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
    conf.find_program(["tconf"], var="TCONF", path_list=v.TI_XDCTOOLS_DIR)

    conf.env.TCONF_INCLUDES += [opj(conf.env.TI_DSPBIOS_DIR, "packages")]

    conf.env.INCLUDES += [opj(conf.env.TI_CGT_DIR, "include")]

    conf.env.LIBPATH += [opj(conf.env.TI_CGT_DIR, "lib")]

    conf.env.INCLUDES_DSPBIOS += [
        opj(conf.env.TI_DSPBIOS_DIR, "packages", "ti", "bios", "include")
    ]

    conf.env.LIBPATH_DSPBIOS += [
        opj(conf.env.TI_DSPBIOS_DIR, "packages", "ti", "bios", "lib")
    ]

    conf.env.INCLUDES_DSPLINK += [
        opj(conf.env.TI_DSPLINK_DIR, "dsplink", "dsp", "inc")
    ]
Ejemplo n.º 13
0
def configure(conf):
	conf.find_xlc()
	conf.find_ar()
	conf.xlc_common_flags()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
Ejemplo n.º 14
0
def configure(conf):
    conf.find_generic_cc()
    conf.find_ar()
    conf.generic_cc_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
Ejemplo n.º 15
0
def configure(conf):
	conf.find_sxc()
	conf.find_program('sxar',VAR='AR')
	conf.sxc_common_flags()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
Ejemplo n.º 16
0
def configure(conf):
	conf.find_android_gcc()
	conf.load('android-ar', tooldir="waf-tools")
	conf.gcc_common_flags()
	conf.android_gcc_modifier_platform()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
Ejemplo n.º 17
0
Archivo: emcc.py Proyecto: pixpil/gii
def configure(conf):
	conf.find_emcc()
	conf.load('emar', tooldir="waf-tools")
	conf.emcc_common_flags()
	conf.emcc_modifier_platform()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
Ejemplo n.º 18
0
def configure(conf):
    conf.find_gcc()
    conf.find_ar()
    conf.gcc_common_flags()
    conf.gcc_modifier_platform()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
Ejemplo n.º 19
0
def configure(conf):
    conf.find_android_gcc()
    conf.load('android-ar', tooldir="waf-tools")
    conf.gcc_common_flags()
    conf.android_gcc_modifier_platform()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
Ejemplo n.º 20
0
def configure(conf):
	conf.find_irixcc()
	conf.find_cpp()
	conf.find_ar()
	conf.irixcc_common_flags()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
Ejemplo n.º 21
0
def configure(conf):
	conf.find_gcc()
	conf.find_ar()
	conf.gcc_common_flags()
	conf.gcc_modifier_platform()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
Ejemplo n.º 22
0
def configure(conf):
	conf.find_irixcc()
	conf.find_cpp()
	conf.find_ar()
	conf.irixcc_common_flags()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
Ejemplo n.º 23
0
def configure(conf):
    conf.find_emcc()
    conf.load('emar', tooldir="waf-tools")
    conf.emcc_common_flags()
    conf.emcc_modifier_platform()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
Ejemplo n.º 24
0
def configure(conf):
	conf.find_clang()
	conf.find_program(['llvm-ar','ar'],var='AR')
	conf.find_ar()
	conf.gcc_common_flags()
	conf.gcc_modifier_platform()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
Ejemplo n.º 25
0
def configure(conf):
    conf.find_clang()
    conf.find_program(["llvm-ar", "ar"], var="AR")
    conf.find_ar()
    conf.gcc_common_flags()
    conf.gcc_modifier_platform()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
Ejemplo n.º 26
0
def configure(conf):
	conf.find_bgxlc()
	conf.find_ar()
	conf.xlc_common_flags()
	conf.env.LINKFLAGS_cshlib = ['-G','-Wl,-bexpfull']
	conf.env.LINKFLAGS_cprogram = []
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
Ejemplo n.º 27
0
def configure(conf):
	conf.autodetect()
	conf.find_msvc()
	conf.msvc_common_flags()
	conf.cc_load_tools()
	conf.cxx_load_tools()
	conf.cc_add_flags()
	conf.cxx_add_flags()
	conf.link_add_flags()
Ejemplo n.º 28
0
def configure(conf):
    conf.find_dcc()
    conf.find_dar()
    conf.find_dld()
    conf.find_ddump()
    conf.dcc_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
Ejemplo n.º 29
0
def configure(conf):
	conf.find_dcc()
	conf.find_dar()
	conf.find_dld()
	conf.find_ddump()
	conf.dcc_common_flags()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
Ejemplo n.º 30
0
def configure(conf):
    conf.find_clang()
    conf.find_program(['llvm-ar', 'ar'], var='AR')
    conf.find_ar()
    conf.gcc_common_flags()
    conf.gcc_modifier_platform()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
Ejemplo n.º 31
0
def configure(conf):
    conf.find_bgxlc()
    conf.find_ar()
    conf.xlc_common_flags()
    conf.env.LINKFLAGS_cshlib = ['-G', '-Wl,-bexpfull']
    conf.env.LINKFLAGS_cprogram = []
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
def setup_gnu_gcc_toolchain(conf, prefix, compiler = None, cxxcompiler = None, path_list=None):
    env = conf.env

    env.stash()
    try:
        env['GNU_GCC_PREFIX']      = prefix
        env['GNU_BINUTILS_PREFIX'] = prefix

        conf.setup_gnu_binutils(path_list)

        compiler    = compiler or (env['GNU_GCC_PREFIX'] + 'gcc')
        cxxcompiler = cxxcompiler or (env['GNU_GCC_PREFIX'] + 'g++')

        cc = conf.find_program(compiler, var='CC', path_list=path_list)
        cc = conf.cmd_to_list(cc)

        cxx = conf.find_program(cxxcompiler, var='CXX', mandatory=False, path_list=path_list)
        cxx = conf.cmd_to_list(cxx)

        conf.env.CC  = cc
        conf.env.AS  = cc

        env['CC_NAME']    = 'gcc'
        env['CC_VERSION'] = conf.cmd_and_log(env.CC + ["-dumpversion"]).strip().split('.')
        env['MACHINE']    = env['MACHINE'] or conf.cmd_and_log(env.CC +["-dumpmachine"]).strip()
        env['DEST_OS']    = 'Unknown'

        # backwards compat. Since we support clang now as well,
        # there is no common CC_PREFIX anymore. (CLANG is not prefixed)
        # please use 'MACHINE' for future developments
        env['CC_PREFIX']  = prefix.strip('-')

        conf.cc_load_tools()
        conf.gcc_common_flags()
        conf.cc_add_flags()

        conf.env.AS_TGT_F = '-o'

        if(cxx):
            env['CXX_NAME'] = 'gcc'
            env['CXX'] = cxx

            conf.cxx_load_tools()
            conf.gxx_common_flags()
            conf.cxx_add_flags()

        conf.link_add_flags()

        # we have to use gnu99 because we use some non standard gnu extensions conditionally
        # when __GNUC__ is defined
        env.append_value('CFLAGS_standard_c99', [ "-std=gnu99" ])

    except conf.errors.ConfigurationError:
        env.revert()
        raise
def configure(conf):
    conf.find_arm_none_eabi_gcc()
    conf.load("arm-none-eabi-ar", tooldir=os.path.dirname(os.path.realpath(__file__)))
    conf.gcc_common_flags()
    conf.gcc_modifier_platform()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
    v = conf.env
    v["SHLIB_MARKER"] = []
    v["STLIB_MARKER"] = []
Ejemplo n.º 34
0
def configure(conf):
    """
    Configuration for clang
    """
    conf.find_clang()
    conf.find_ar()
    conf.clang_common_flags()
    conf.clang_modifier_platform()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
Ejemplo n.º 35
0
def configure(conf):
    conf.find_owcc()
    conf.owcc_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.env.append_unique('CFLAGS', '-Wc,-xx')
    conf.cxx_load_tools()
    conf.cxx_add_flags()
    conf.env.append_unique('CXXFLAGS', '-Wc,-xx')
    conf.link_add_flags()
    conf.owcc_detect_platform()
Ejemplo n.º 36
0
def configure(conf):
	"""
	Configuration for arm-linux-gnueabi-gcc
	"""
	conf.find_arm_gcc()
        conf.find_arm_ar()
	conf.gcc_common_flags()
	conf.gcc_modifier_platform()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
Ejemplo n.º 37
0
def configure(conf):
    conf.find_clang()
    conf.find_program(['llvm-ar', 'ar'], var='AR')
    conf.find_ar()
    conf.gcc_common_flags()
    # Allow the user to provide flags for the target platform.
    conf.gcc_modifier_platform()
    # And allow more fine grained control based on the compiler's triplet.
    conf.clang_modifier_target_triple()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
Ejemplo n.º 38
0
def configure(conf):
    """
	Configuration for gcc
	"""
    conf.find_gcc()
    conf.find_ar()
    conf.gcc_common_flags()
    conf.gcc_modifier_platform()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.link_add_flags()
    conf.check_gcc_o_space()
Ejemplo n.º 39
0
Archivo: msvc.py Proyecto: jrossi/waf
def configure(conf):
	"""
	Configuration methods to call for detecting msvc
	"""
	conf.autodetect()
	conf.find_msvc()
	conf.msvc_common_flags()
	conf.cc_load_tools()
	conf.cxx_load_tools()
	conf.cc_add_flags()
	conf.cxx_add_flags()
	conf.link_add_flags()
Ejemplo n.º 40
0
def configure(conf):
	"""
	Configuration for gcc
	"""
	conf.find_gcc()
	conf.find_ar()
	conf.gcc_common_flags()
	conf.gcc_modifier_platform()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
	conf.check_gcc_o_space()
Ejemplo n.º 41
0
def configure(conf):
    """
	Configuration methods to call for detecting msvc
	"""
    conf.autodetect(True)
    conf.find_msvc()
    conf.msvc_common_flags()
    conf.cc_load_tools()
    conf.cxx_load_tools()
    conf.cc_add_flags()
    conf.cxx_add_flags()
    conf.link_add_flags()
    conf.visual_studio_add_flags()
def configure(conf):
	conf.find_emscripten()
	conf.find_ar()
	conf.gcc_common_flags()
	conf.gxx_common_flags()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.cxx_load_tools()
	conf.cxx_add_flags()
	conf.link_add_flags()
	conf.env.ARFLAGS = ['rcs']
	conf.env.cshlib_PATTERN = '%s.js'
	conf.env.cxxshlib_PATTERN = '%s.js'
	conf.env.cstlib_PATTERN = '%s.bc'
	conf.env.cxxstlib_PATTERN = '%s.bc'
	conf.env.cprogram_PATTERN = '%s.html'
	conf.env.cxxprogram_PATTERN = '%s.html'
	conf.env.append_value('LINKFLAGS',['-Wl,--enable-auto-import'])
Ejemplo n.º 43
0
def configure(conf):
    """
	Configuration for gcc
	"""
    conf.find_gcc()
    conf.find_ar()
    conf.gcc_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()
    #conf.link_add_flags()

    conf.find_gxx()
    #conf.find_ar()
    conf.gxx_common_flags()
    conf.cxx_load_tools()
    conf.cxx_add_flags()
    conf.link_add_flags()
    conf.find_gas()
Ejemplo n.º 44
0
def configure(conf):
    conf.find_emscripten()
    conf.find_ar()
    conf.gcc_common_flags()
    conf.gxx_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.cxx_load_tools()
    conf.cxx_add_flags()
    conf.link_add_flags()
    conf.env.ARFLAGS = ['rcs']
    conf.env.cshlib_PATTERN = '%s.js'
    conf.env.cxxshlib_PATTERN = '%s.js'
    conf.env.cstlib_PATTERN = '%s.bc'
    conf.env.cxxstlib_PATTERN = '%s.bc'
    conf.env.cprogram_PATTERN = '%s.html'
    conf.env.cxxprogram_PATTERN = '%s.html'
    conf.env.append_value('LINKFLAGS', ['-Wl,--enable-auto-import'])
Ejemplo n.º 45
0
def configure(conf):
	v = conf.env
	v.TI_CGT_DIR = getattr(Options.options, 'ti-cgt-dir', "")
	v.TI_DSPLINK_DIR = getattr(Options.options, 'ti-dsplink-dir', "")
	v.TI_BIOSUTILS_DIR = getattr(Options.options, 'ti-biosutils-dir', "")
	v.TI_DSPBIOS_DIR = getattr(Options.options, 'ti-dspbios-dir', "")
	v.TI_XDCTOOLS_DIR = getattr(Options.options, 'ti-xdctools-dir', "")
	conf.find_ticc()
	conf.find_tiar()
	conf.find_tild()
	conf.ticc_common_flags()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
	conf.find_program(['tconf'], var='TCONF', path_list=v.TI_XDCTOOLS_DIR)

	conf.env.TCONF_INCLUDES += [
	 opj(conf.env.TI_DSPBIOS_DIR, 'packages'),
	]

	conf.env.INCLUDES += [
	 opj(conf.env.TI_CGT_DIR, 'include'),
	]

	conf.env.LIBPATH += [
	 opj(conf.env.TI_CGT_DIR, "lib"),
	]

	conf.env.INCLUDES_DSPBIOS += [
	 opj(conf.env.TI_DSPBIOS_DIR, 'packages', 'ti', 'bios', 'include'),
	]

	conf.env.LIBPATH_DSPBIOS += [
	 opj(conf.env.TI_DSPBIOS_DIR, 'packages', 'ti', 'bios', 'lib'),
	]

	conf.env.INCLUDES_DSPLINK += [
	 opj(conf.env.TI_DSPLINK_DIR, 'dsplink', 'dsp', 'inc'),
	]
Ejemplo n.º 46
0
def configure(conf):
    conf.find_emscripten()
    conf.find_ar()
    conf.gcc_common_flags()
    conf.gxx_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()
    conf.cxx_load_tools()
    conf.cxx_add_flags()
    conf.link_add_flags()
    conf.env.ARFLAGS = ["rcs"]
    conf.env.cshlib_PATTERN = "%s.js"
    conf.env.cxxshlib_PATTERN = "%s.js"
    conf.env.cstlib_PATTERN = "%s.a"
    conf.env.cxxstlib_PATTERN = "%s.a"
    conf.env.cprogram_PATTERN = "%s.html"
    conf.env.cxxprogram_PATTERN = "%s.html"
    conf.env.CXX_TGT_F = ["-c", "-o", ""]
    conf.env.CC_TGT_F = ["-c", "-o", ""]
    conf.env.CXXLNK_TGT_F = ["-o", ""]
    conf.env.CCLNK_TGT_F = ["-o", ""]
    conf.env.append_value("LINKFLAGS", ["-Wl,--enable-auto-import"])
Ejemplo n.º 47
0
def configure(conf):
	v = conf.env
	v.TI_CGT_DIR = getattr(Options.options, 'ti-cgt-dir', "")
	v.TI_DSPLINK_DIR = getattr(Options.options, 'ti-dsplink-dir', "")
	v.TI_BIOSUTILS_DIR = getattr(Options.options, 'ti-biosutils-dir', "")
	v.TI_DSPBIOS_DIR = getattr(Options.options, 'ti-dspbios-dir', "")
	v.TI_XDCTOOLS_DIR = getattr(Options.options, 'ti-xdctools-dir', "")
	conf.find_ticc()
	conf.find_tiar()
	conf.find_tild()
	conf.ticc_common_flags()
	conf.cc_load_tools()
	conf.cc_add_flags()
	conf.link_add_flags()
	conf.find_program(['tconf'], var='TCONF', path_list=v.TI_XDCTOOLS_DIR)
	
	conf.env.TCONF_INCLUDES += [
	 opj(conf.env.TI_DSPBIOS_DIR, 'packages'),
	]
	
	conf.env.INCLUDES += [
	 opj(conf.env.TI_CGT_DIR, 'include'),
	]
	
	conf.env.LIBPATH += [
	 opj(conf.env.TI_CGT_DIR, "lib"),
	]

	conf.env.INCLUDES_DSPBIOS += [
	 opj(conf.env.TI_DSPBIOS_DIR, 'packages', 'ti', 'bios', 'include'),
	]
	
	conf.env.LIBPATH_DSPBIOS += [
	 opj(conf.env.TI_DSPBIOS_DIR, 'packages', 'ti', 'bios', 'lib'),
	]

	conf.env.INCLUDES_DSPLINK += [
	 opj(conf.env.TI_DSPLINK_DIR, 'dsplink', 'dsp', 'inc'),
	]
Ejemplo n.º 48
0
def mkspec_emscripten_configure(conf, major, minor, minimum=False,
                                force_debug=False):
    """
    :param force_debug: Always compile with debugging flags, if true
    """
    conf.set_mkspec_platform('emscripten')

    # The path to the emscripten compiler
    paths = conf.get_tool_option('emscripten_path')

    # The node.js binary can be "nodejs" or simply "node"
    conf.find_program(['nodejs', 'node'], var='NODEJS')

    # Find the clang++ compiler
    cxx = conf.find_program(['em++'], path_list=paths)
    cxx = conf.cmd_to_list(cxx)
    conf.env['CXX'] = cxx
    conf.env['CXX_NAME'] = os.path.basename(conf.env.get_flat('CXX'))

    conf.check_emscripten_version(cxx, major, minor, minimum)

    # Find clang as the C compiler
    cc = conf.find_program(['emcc'], path_list=paths)
    cc = conf.cmd_to_list(cc)
    conf.env['CC'] = cc
    conf.env['CC_NAME'] = os.path.basename(conf.env.get_flat('CC'))

    conf.check_emscripten_version(cc, major, minor, minimum)

    # Find the archiver
    conf.find_program('emar', path_list=paths, var='AR')
    conf.env.ARFLAGS = ['rcs']

    # Set up C++ tools and flags
    conf.gxx_common_flags()
    conf.cxx_load_tools()
    conf.cxx_add_flags()

    # Also set up C tools and flags
    conf.gcc_common_flags()
    conf.cc_load_tools()
    conf.cc_add_flags()

    # Add linker flags
    conf.link_add_flags()

    # Add the special flags required for emscripten
    conf.env.cshlib_PATTERN = '%s.js'
    conf.env.cxxshlib_PATTERN = '%s.js'
    conf.env.cstlib_PATTERN = '%s.a'
    conf.env.cxxstlib_PATTERN = '%s.a'
    conf.env.cprogram_PATTERN = conf.env.cxxprogram_PATTERN = '%s.js'
    conf.env.CXX_TGT_F = ['-c', '-o', '']
    conf.env.CC_TGT_F = ['-c', '-o', '']
    conf.env.CXXLNK_TGT_F = ['-o', '']
    conf.env.CCLNK_TGT_F = ['-o', '']
    conf.env.append_value('LINKFLAGS',['-Wl,--enable-auto-import'])

    # Add our own cxx flags
    conf.env['CXXFLAGS'] += \
        ['-O2', '-Wextra', '-Wall', '-Wno-warn-absolute-paths']

    if conf.has_tool_option('cxx_debug') or force_debug:
        conf.env['CXXFLAGS'] += ['-g']
        conf.env['LINKFLAGS'] += ['-s']

    if conf.has_tool_option('cxx_nodebug'):
        conf.env['DEFINES'] += ['NDEBUG']

    conf.env['CXXFLAGS'] += ['-std=c++11']

    # Add our own cc flags
    conf.env['CFLAGS'] += \
        ['-O2', '-Wextra', '-Wall', '-Wno-warn-absolute-paths']

    if conf.has_tool_option('cxx_debug') or force_debug:
        conf.env['CFLAGS'] += ['-g']

    if conf.has_tool_option('cxx_nodebug'):
        conf.env['DEFINES'] += ['NDEBUG']
Ejemplo n.º 49
0
def mkspec_emscripten_configure(conf, major, minor, minimum=False,
                                force_debug=False):
    """
    :param force_debug: Always compile with debugging flags, if true
    """
    # The path to the emscripten compiler
    paths = conf.get_tool_option('emscripten_path')

    # The node.js binary can be "nodejs" or simply "node"
    conf.find_program(['nodejs', 'node'], var='NODEJS')

    # Find the clang++ compiler
    cxx = conf.find_program(['em++'], path_list=paths)
    cxx = conf.cmd_to_list(cxx)
    conf.env['CXX'] = cxx
    conf.env['CXX_NAME'] = os.path.basename(conf.env.get_flat('CXX'))

    conf.check_emscripten_version(cxx, major, minor, minimum)

    # Find clang as the C compiler
    cc = conf.find_program(['emcc'], path_list=paths)
    cc = conf.cmd_to_list(cc)
    conf.env['CC'] = cc
    conf.env['CC_NAME'] = os.path.basename(conf.env.get_flat('CC'))

    conf.check_emscripten_version(cc, major, minor, minimum)

    # Find the archiver
    conf.find_program('emar', path_list=paths, var='AR')
    conf.env.ARFLAGS = 'rcs'

    # Set up C++ tools and flags
    conf.gxx_common_flags()
    #conf.gxx_modifier_platform()
    conf.cxx_load_tools()
    conf.cxx_add_flags()

    # Also set up C tools and flags
    conf.gcc_common_flags()
    #conf.gcc_modifier_platform()
    conf.cc_load_tools()
    conf.cc_add_flags()

    # Add linker flags
    conf.link_add_flags()

    # Add our own cxx flags
    conf.env['CXXFLAGS'] += ['-O2', '-Wextra', '-Wall']

    if conf.has_tool_option('cxx_debug') or force_debug:
        conf.env['CXXFLAGS'] += ['-g']
        conf.env['LINKFLAGS'] += ['-s']

    if conf.has_tool_option('cxx_nodebug'):
        conf.env['DEFINES'] += ['NDEBUG']

    conf.env['CXXFLAGS'] += ['-std=c++0x']

    # Add our own cc flags
    conf.env['CFLAGS'] += ['-O2', '-Wextra', '-Wall']

    if conf.has_tool_option('cxx_debug') or force_debug:
        conf.env['CFLAGS'] += ['-g']

    if conf.has_tool_option('cxx_nodebug'):
        conf.env['DEFINES'] += ['NDEBUG']

    conf.env['cprogram_PATTERN'] = conf.env['cxxprogram_PATTERN'] = '%s.js'

    conf.set_mkspec_platform('emscripten')
Ejemplo n.º 50
0
def mkspec_clang_configure(conf, major, minor, prefix=None, minimum=False,
                           force_debug=False):
    """
    :param major:       The major version number of the compiler, e.g. 3
    :param minor:       The minor version number of the compiler, e.g. 4
    :param prefix:      Prefix to compiler name, e.g. 'arm-linux-androideabi'
    :param minimum:     Only check for a minimum compiler version, if true
    :param force_debug: Always compile with debugging flags, if true
    """
    # Where to look
    paths = conf.mkspec_get_toolchain_paths()

    # Find the clang++ compiler
    clangxx_names = conf.mkspec_get_clangxx_binary_name(major, minor)
    if minimum:
        clangxx_names = 'clang++'
    cxx = conf.find_program(clangxx_names, path_list=paths)
    cxx = conf.cmd_to_list(cxx)
    conf.env['CXX'] = cxx
    conf.env['CXX_NAME'] = os.path.basename(conf.env.get_flat('CXX'))

    if minimum:
        conf.mkspec_check_minimum_cc_version(cxx, major, minor)
    else:
        conf.mkspec_check_cc_version(cxx, major, minor)

    # Find clang as the C compiler
    clang_names = conf.mkspec_get_clang_binary_name(major, minor)
    if minimum:
        clang_names = 'clang'
    cc = conf.find_program(clang_names, path_list=paths)
    cc = conf.cmd_to_list(cc)
    conf.env['CC'] = cc
    conf.env['CC_NAME'] = os.path.basename(conf.env.get_flat('CC'))

    if minimum:
        conf.mkspec_check_minimum_cc_version(cc, major, minor)
    else:
        conf.mkspec_check_cc_version(cc, major, minor)

    # Find the archiver
    ar = conf.mkspec_get_ar_binary_name(prefix)
    conf.find_program(ar, path_list=paths, var='AR')
    conf.env.ARFLAGS = 'rcs'

    # Set up C++ tools and flags
    conf.gxx_common_flags()
    conf.gxx_modifier_platform()
    conf.cxx_load_tools()
    conf.cxx_add_flags()

    # Also set up C tools and flags
    conf.gcc_common_flags()
    conf.gcc_modifier_platform()
    conf.cc_load_tools()
    conf.cc_add_flags()

    # Add linker flags
    conf.link_add_flags()

    # Add our own cxx flags
    conf.mkspec_set_clang_cxxflags(force_debug)
    # Add our own cc flags
    conf.mkspec_set_clang_ccflags(force_debug)