コード例 #1
0
ファイル: build.py プロジェクト: govtmirror/BinaryBuilder
    # chrpath, etc.
    if "PATH" not in os.environ: os.environ["PATH"] = ""
    os.environ["PATH"] = P.join(opt.build_root, 'install/bin') + \
                         os.pathsep + os.environ["PATH"]

    MIN_CC_VERSION = 4.4

    # -Wl,-z,now ?
    build_env = Environment(CC=opt.cc,
                            CXX=opt.cxx,
                            F77=opt.f77,
                            CFLAGS='-O3 -g',
                            CXXFLAGS='-O3 -g',
                            LDFLAGS=r'-Wl,-rpath,/%s' % ('a' * 100),
                            MAKEOPTS='-j%s' % opt.threads,
                            DOWNLOAD_DIR=opt.download_dir,
                            BUILD_DIR=P.join(opt.build_root, 'build'),
                            INSTALL_DIR=P.join(opt.build_root, 'install'),
                            MISC_DIR=P.join(opt.build_root, 'misc'),
                            PKG_CONFIG_PATH=P.join(opt.build_root, 'install',
                                                   'lib', 'pkgconfig'),
                            PATH=os.environ['PATH'],
                            FAST=str(int(opt.fast)))

    if opt.ld_library_path is not None:
        build_env['LD_LIBRARY_PATH'] = opt.ld_library_path

    # Bugfix, add compiler's libraries to LD_LIBRARY_PATH.
    comp_path = which(build_env['CC'])
    libdir1 = P.join(P.dirname(P.dirname(comp_path)), "lib")
    libdir2 = P.join(P.dirname(P.dirname(comp_path)), "lib64")
コード例 #2
0
ファイル: build.py プロジェクト: novas0x2a/BinaryBuilder
        opt.build_root = grablink('last-run')

    if opt.build_root is None or not P.exists(opt.build_root):
        opt.build_root = mkdtemp(prefix='BinaryBuilder')

    # Things misbehave if the buildroot is symlinks in it
    opt.build_root = P.realpath(opt.build_root)

    # -Wl,-z,now ?
    e = Environment(
                    CC       = 'gcc',
                    CXX      = 'g++',
                    F77      = 'gfortran',
                    CFLAGS   = '-O3 -g',
                    CXXFLAGS = '-O3 -g',
                    LDFLAGS  = r'-Wl,-rpath,/%s' % ('a'*100),
                    MAKEOPTS='-j%s' % opt.threads,
                    DOWNLOAD_DIR = opt.download_dir,
                    BUILD_DIR    = P.join(opt.build_root, 'build'),
                    INSTALL_DIR  = P.join(opt.build_root, 'install'),
                    MISC_DIR = P.join(opt.build_root, 'misc'),
                    PATH=os.environ['PATH'],
                    **({} if opt.isisroot is None else dict(ISISROOT=opt.isisroot)))

    arch = get_platform()

    if arch.os == 'linux':
        e.append('LDFLAGS', '-Wl,-O1 -Wl,--enable-new-dtags -Wl,--hash-style=both')
    elif arch.os == 'osx':
        e.append('LDFLAGS', '-Wl,-headerpad_max_install_names')

        # ISIS only supports 32-bit
コード例 #3
0
ファイル: build.py プロジェクト: dshean/BinaryBuilder
    # chrpath, etc.
    if "PATH" not in os.environ: os.environ["PATH"] = ""
    os.environ["PATH"] = P.join(opt.build_root, 'install/bin') + \
                         os.pathsep + os.environ["PATH"]

    MIN_CC_VERSION = 4.4

    # -Wl,-z,now ?
    build_env = Environment(
        CC       = opt.cc,
        CXX      = opt.cxx,
        F77      = opt.f77,
        CFLAGS   = '-O3 -g',
        CXXFLAGS = '-O3 -g',
        LDFLAGS  = r'-Wl,-rpath,/%s' % ('a'*100),
        MAKEOPTS = '-j%s' % opt.threads,
        DOWNLOAD_DIR = opt.download_dir,
        BUILD_DIR    = P.join(opt.build_root, 'build'),
        INSTALL_DIR  = P.join(opt.build_root, 'install'),
        MISC_DIR = P.join(opt.build_root, 'misc'),
        PKG_CONFIG_PATH = P.join(opt.build_root, 'install', 'lib', 'pkgconfig'),
        PATH = os.environ['PATH'],
        FAST = str(int(opt.fast))
        )

    if opt.ld_library_path is not None:
        build_env['LD_LIBRARY_PATH'] = opt.ld_library_path

    # Bugfix, add compiler's libraries to LD_LIBRARY_PATH.
    comp_path = which(build_env['CC'])
    libdir1 = P.join(P.dirname(P.dirname(comp_path)), "lib")
    libdir2 = P.join(P.dirname(P.dirname(comp_path)), "lib64")
コード例 #4
0
    compiler_root = os.path.dirname(os.path.dirname(which(opt.cc)))
    path_to_libs = P.join(compiler_root, 'lib') + ':' + P.join(
        compiler_root, 'lib64')
    install_dir = P.join(opt.build_root, 'install')
    build_env = Environment(
        CC       = opt.cc,
        CXX      = opt.cxx,
        GFORTRAN = opt.gfortran,
        CFLAGS   = '-O3',
        CXXFLAGS = '-O3',
        BUILD_DIR    = P.join(opt.build_root, 'build'),
        INSTALL_DIR  = install_dir,
        # Use this meaningless RPATH of 'a's so later we have enough room the obtained
        # path to fit in a real path. Also set the paths to the compiler libs
        # and to installed libs.
        LDFLAGS  = r'-Wl,-rpath,/%s' % ('a'*100) + ' -Wl,-rpath,' + path_to_libs + \
         ' -Wl,-rpath,' + install_dir + '/lib',
        MAKEOPTS = '-j%s' % opt.threads,
        DOWNLOAD_DIR = opt.download_dir,
        ASP_DEPS_DIR = opt.asp_deps_dir,
        MISC_DIR = P.join(opt.build_root, 'misc'),
        PKG_CONFIG_PATH = P.join(opt.build_root, 'install', 'lib', 'pkgconfig'),
        PATH = os.environ['PATH'],
        LD_LIBRARY_PATH = os.environ['LD_LIBRARY_PATH'],
        FAST = str(int(opt.fast)),
        SKIP_TESTS = str(int(opt.skip_tests)),
        )

    if opt.ld_library_path is not None:
        build_env['LD_LIBRARY_PATH'] = opt.ld_library_path