Esempio n. 1
0
    def configure(self):
        mcrypt_dir = self.src_dir
        mhash_dir = self.mhash_dir
        libmcrypt_dir = self.libmcrypt_dir

        # Build mhash dependency
        with local.cwd(mhash_dir):
            configure = local["./configure"]
            with local.env(CC=cc(self), CXX=cxx(self)):
                run(configure["--prefix=" + self.builddir])
                run(make["-j", CFG["jobs"], "install"])

        # Builder libmcrypt dependency
        with local.cwd(libmcrypt_dir):
            configure = local["./configure"]
            with local.env(CC=cc(self), CXX=cxx(self)):
                run(configure["--prefix=" + self.builddir])
                run(make["-j", CFG["jobs"], "install"])

        with local.cwd(mcrypt_dir):
            configure = local["./configure"]
            with local.env(CC=cc(self),
                           CXX=cxx(self),
                           LD_LIBRARY_PATH=path.join(self.builddir, "lib") +
                           ":" + CFG["ld_library_path"].value(),
                           LDFLAGS="-L" + path.join(self.builddir, "lib"),
                           CFLAGS="-I" + path.join(self.builddir, "include")):
                run(configure["--disable-dependency-tracking",
                              "--enable-static", "--disable-shared",
                              "--with-libmcrypt=" + self.builddir,
                              "--with-libmhash=" + self.builddir])
Esempio n. 2
0
    def build(self):
        from benchbuild.utils.run import run
        src_file = path.join(self.name + ".dir", self.name + ".c")
        kernel_file = path.join("{name}.dir".format(name=self.name),
                                "{name}_kernel.c".format(name=self.name))
        cflags = self.cflags
        ldflags = self.ldflags
        self.cflags = []
        self.ldflags = []

        clang_no_opts = cc(self)

        self.cflags = cflags
        self.ldflags = ldflags

        polybench_opts = [
            "-DEXTRALARGE_DATASET", "-DPOLYBENCH_USE_C99_PROTO",
            "-DPOLYBENCH_DUMP_ARRAYS", "-DPOLYBENCH_USE_RESTRICT"
        ]
        run(clang_no_opts["-I", "utilities", "-I", self.name, polybench_opts,
                          "utilities/polybench.c", kernel_file, src_file,
                          "-lm", "-o", self.run_f + ".no-opts"])
        clang = cc(self)
        run(clang["-I", "utilities", "-I", self.name, polybench_opts,
                  "utilities/polybench.c", kernel_file, src_file, "-lm", "-o",
                  self.run_f])
Esempio n. 3
0
 def configure(self):
     clang = cc(self)
     clang_cxx = cxx(self)
     with local.cwd(self.src_dir):
         with local.env(CC=str(clang), CXX=str(clang_cxx)):
             configure = local["./configure"]
             run(configure["--with-static-linked-ext", "--disable-shared"])
Esempio n. 4
0
    def build(self):
        clang = cc(self)
        clang_cxx = cxx(self)

        with local.cwd(self.src_dir):
            run(make["CC=" + str(clang), "CXX=" + str(clang_cxx), "clean",
                     "all"])
Esempio n. 5
0
 def configure(self):
     clang = cc(self)
     with local.cwd(self.src_dir):
         configure = local["./configure"]
         with local.env(CC=str(clang)):
             run(configure["--disable-dependency-tracking",
                           "--disable-silent-rules", "--with-gnu-ld"])
Esempio n. 6
0
    def compile(self):
        self.download()

        js_dir = local.path(self.src_file) / "js" / "src"
        clang = compiler.cc(self)
        clang_cxx = compiler.cxx(self)
        with local.cwd(js_dir):
            make_src_pkg = local["./make-source-package.sh"]
            with local.env(
                    DIST=self.builddir,
                    MOZJS_MAJOR_VERSION=0,
                    MOZJS_MINOR_VERSION=0,
                    MOZJS_PATCH_VERSION=0):
                make_src_pkg()

        mozjs_dir = local.path("mozjs-0.0.0")
        mozjs_src_dir = mozjs_dir / "js" / "src"
        tar("xfj", mozjs_dir + ".tar.bz2")
        with local.cwd(mozjs_src_dir):
            mkdir("obj")
            autoconf = local["autoconf-2.13"]
            autoconf()
            with local.cwd("obj"):
                with local.env(CC=str(clang), CXX=str(clang_cxx)):
                    configure = local["../configure"]
                    configure = configure["--without-system-zlib"]
                    run.run(configure)

        mozjs_obj_dir = mozjs_src_dir / "obj"
        with local.cwd(mozjs_obj_dir):
            run.run(make["-j", str(CFG["jobs"])])
Esempio n. 7
0
    def configure(self):
        makefile_config = os.path.join(self.SRC_FILE, "config", "make.config")
        clang = cc(self)

        with open(makefile_config, 'w') as config:
            lines = [
                "LABEL=benchbuild",
                "ENABLE_OMPSS=",
                "OMPSSC=",
                "OMPC=",
                "CC={cc}",
                "OMPSSLINK=",
                "OMPLINK={cc} -fopenmp",
                "CLINK={cc}",
                "OPT_FLAGS=",
                "CC_FLAGS=",
                "OMPC_FLAGS=",
                "OMPSSC_FLAGS=",
                "OMPC_FINAL_FLAGS=",
                "OMPSSC_FINAL_FLAG=",
                "CLINK_FLAGS=",
                "OMPLINK_FLAGS=",
                "OMPSSLINK_FLAGS=",
            ]
            lines = [l.format(cc=clang) + "\n" for l in lines]
            config.writelines(lines)
Esempio n. 8
0
    def compile(self):
        self.download()

        polybench_opts = CFG["projects"]["polybench"]
        verify = bool(polybench_opts["verify"])
        workload = str(polybench_opts["workload"])

        src_dir = local.cwd / self.src_file
        src_sub = src_dir / self.path_dict[self.name] / self.name

        src_file = src_sub / (self.name + ".c")
        kernel_file = src_sub / (self.name + "_kernel.c")
        utils_dir = src_dir / "utilities"

        polybench_opts = [
            "-D" + str(workload), "-DPOLYBENCH_USE_C99_PROTO",
            "-DPOLYBENCH_USE_RESTRICT"
        ]

        if verify:
            polybench_opts = self.compile_verify([
                "-I", utils_dir, "-I", src_sub, utils_dir / "polybench.c",
                kernel_file, src_file, "-lm"
            ], polybench_opts)

        clang = compiler.cc(self)
        run.run(clang[
            "-I", utils_dir, "-I", src_sub, polybench_opts, utils_dir /
            "polybench.c", kernel_file, src_file, "-lm", "-o", self.name])
Esempio n. 9
0
    def compile(self):
        self.download()
        download.Git(self.gdal_uri, self.gdal_dir)
        rasdaman_dir = local.path(self.src_file)
        gdal_dir = local.path(self.gdal_dir) / self.gdal_dir

        clang = compiler.cc(self)
        clang_cxx = compiler.cxx(self)

        with local.cwd(gdal_dir):
            configure = local["./configure"]

            with local.env(CC=str(clang), CXX=str(clang_cxx)):
                run.run(configure["--with-pic", "--enable-static",
                                  "--disable-debug", "--with-gnu-ld",
                                  "--without-ld-shared", "--without-libtool"])
                run.run(make["-j", CFG["jobs"]])

        with local.cwd(rasdaman_dir):
            autoreconf("-i")
            configure = local["./configure"]

            with local.env(CC=str(clang), CXX=str(clang_cxx)):
                run.run(configure["--without-debug-symbols",
                                  "--enable-benchmark", "--with-static-libs",
                                  "--disable-java", "--with-pic",
                                  "--disable-debug", "--without-docs"])
            run.run(make["clean", "all", "-j", CFG["jobs"]])
Esempio n. 10
0
 def configure(self):
     clang = cc(self)
     with local.cwd(self.src_dir):
         configure = local["./configure"]
         run(configure["--disable-shared", "--cc=" + str(
             clang), "--extra-ldflags=" + " ".join(self.ldflags),
                       "--samples=" + self.fate_dir])
Esempio n. 11
0
    def compile(self):
        self.download()
        download.Git(self.test_suite_uri, self.test_suite_dir)

        venv_path = local.cwd / "local"
        virtualenv(venv_path, "--python=python2")
        pip_path = local.cwd / "local" / "bin" / "pip"
        pip = local[pip_path]
        with local.cwd(self.SRC_FILE):
            pip("install", "--no-cache-dir", "--disable-pip-version-check",
                "-e", ".")

        self.sandbox_dir = local.cwd / "run"
        if self.sandbox_dir.exists():
            rm("-rf", self.sandbox_dir)
        mkdir(self.sandbox_dir)

        self.lnt = local[local.path("./local/bin/lnt")]
        self.clang = compiler.cc(self, detect_project=True)
        self.clang_cxx = compiler.cxx(self, detect_project=True)

        self.lnt("runtest", "test-suite", "-v", "-j1", "--sandbox",
                 self.sandbox_dir, "--benchmarking-only",
                 "--only-compile", "--cc", str(self.clang), "--cxx",
                 str(self.clang_cxx), "--test-suite", self.test_suite_dir,
                 "--only-test=" + self.SUBDIR)
Esempio n. 12
0
    def compile(self):
        self.download()
        tar("xfz", self.src_file)
        unpack_dir = "CLAPACK-{0}".format(self.version)

        clang = compiler.cc(self)
        clang_cxx = compiler.cxx(self)
        with local.cwd(unpack_dir):
            with open("make.inc", 'w') as makefile:
                content = [
                    "SHELL     = /bin/sh\n", "PLAT      = _LINUX\n",
                    "CC        = " + str(clang) + "\n",
                    "CXX       = " + str(clang_cxx) + "\n",
                    "CFLAGS    = -I$(TOPDIR)/INCLUDE\n",
                    "LOADER    = " + str(clang) + "\n", "LOADOPTS  = \n",
                    "NOOPT     = -O0 -I$(TOPDIR)/INCLUDE\n",
                    "DRVCFLAGS = $(CFLAGS)\n", "F2CCFLAGS = $(CFLAGS)\n",
                    "TIMER     = INT_CPU_TIME\n", "ARCH      = ar\n",
                    "ARCHFLAGS = cr\n", "RANLIB    = ranlib\n",
                    "BLASLIB   = ../../blas$(PLAT).a\n", "XBLASLIB  = \n",
                    "LAPACKLIB = lapack$(PLAT).a\n",
                    "F2CLIB    = ../../F2CLIBS/libf2c.a\n",
                    "TMGLIB    = tmglib$(PLAT).a\n",
                    "EIGSRCLIB = eigsrc$(PLAT).a\n",
                    "LINSRCLIB = linsrc$(PLAT).a\n",
                    "F2CLIB    = ../../F2CLIBS/libf2c.a\n"
                ]
                makefile.writelines(content)

            run.run(make["-j", CFG["jobs"], "f2clib", "blaslib"])
            with local.cwd(local.path("BLAS") / "TESTING"):
                run.run(make["-j", CFG["jobs"], "-f", "Makeblat2"])
                run.run(make["-j", CFG["jobs"], "-f", "Makeblat3"])
Esempio n. 13
0
    def compile(self):
        self.download()

        js_dir = local.path(self.src_file) / "js" / "src"
        clang = compiler.cc(self)
        clang_cxx = compiler.cxx(self)
        with local.cwd(js_dir):
            make_src_pkg = local["./make-source-package.sh"]
            with local.env(DIST=self.builddir,
                           MOZJS_MAJOR_VERSION=0,
                           MOZJS_MINOR_VERSION=0,
                           MOZJS_PATCH_VERSION=0):
                make_src_pkg()

        mozjs_dir = local.path("mozjs-0.0.0")
        mozjs_src_dir = mozjs_dir / "js" / "src"
        tar("xfj", mozjs_dir + ".tar.bz2")
        with local.cwd(mozjs_src_dir):
            mkdir("obj")
            autoconf = local["autoconf-2.13"]
            autoconf()
            with local.cwd("obj"):
                with local.env(CC=str(clang), CXX=str(clang_cxx)):
                    configure = local["../configure"]
                    configure = configure["--without-system-zlib"]
                    run.run(configure)

        mozjs_obj_dir = mozjs_src_dir / "obj"
        with local.cwd(mozjs_obj_dir):
            run.run(make["-j", str(CFG["jobs"])])
Esempio n. 14
0
 def build(self):
     clang = cc(self)
     with local.cwd(self.src_dir):
         target_opts = ["-DCPUS=1", "-DSYZYGY", "-DTEST"]
         crafty_make = make["target=UNIX", "CC="+str(clang),
                            "opt="+" ".join(target_opts), "crafty-make"]
         run(crafty_make)
Esempio n. 15
0
    def compile(self):
        self.download()
        tar("xfz", self.src_file)
        unpack_dir = "CLAPACK-{0}".format(self.version)

        clang = compiler.cc(self)
        clang_cxx = compiler.cxx(self)
        with local.cwd(unpack_dir):
            with open("make.inc", 'w') as makefile:
                content = [
                    "SHELL     = /bin/sh\n", "PLAT      = _LINUX\n",
                    "CC        = " + str(clang) + "\n", "CXX       = " +
                    str(clang_cxx) + "\n", "CFLAGS    = -I$(TOPDIR)/INCLUDE\n",
                    "LOADER    = " + str(clang) + "\n", "LOADOPTS  = \n",
                    "NOOPT     = -O0 -I$(TOPDIR)/INCLUDE\n",
                    "DRVCFLAGS = $(CFLAGS)\n", "F2CCFLAGS = $(CFLAGS)\n",
                    "TIMER     = INT_CPU_TIME\n", "ARCH      = ar\n",
                    "ARCHFLAGS = cr\n", "RANLIB    = ranlib\n",
                    "BLASLIB   = ../../blas$(PLAT).a\n", "XBLASLIB  = \n",
                    "LAPACKLIB = lapack$(PLAT).a\n",
                    "F2CLIB    = ../../F2CLIBS/libf2c.a\n",
                    "TMGLIB    = tmglib$(PLAT).a\n",
                    "EIGSRCLIB = eigsrc$(PLAT).a\n",
                    "LINSRCLIB = linsrc$(PLAT).a\n",
                    "F2CLIB    = ../../F2CLIBS/libf2c.a\n"
                ]
                makefile.writelines(content)

            run.run(make["-j", CFG["jobs"], "f2clib", "blaslib"])
            with local.cwd(local.path("BLAS") / "TESTING"):
                run.run(make["-j", CFG["jobs"], "-f", "Makeblat2"])
                run.run(make["-j", CFG["jobs"], "-f", "Makeblat3"])
Esempio n. 16
0
    def compile(self):
        self.download()
        makefile_config = local.path(self.src_file) / "config" / "make.config"
        clang = compiler.cc(self)

        with open(makefile_config, 'w') as config:
            lines = [
                "LABEL=benchbuild",
                "ENABLE_OMPSS=",
                "OMPSSC=",
                "OMPC=",
                "CC={cc}",
                "OMPSSLINK=",
                "OMPLINK={cc} -fopenmp",
                "CLINK={cc}",
                "OPT_FLAGS=",
                "CC_FLAGS=",
                "OMPC_FLAGS=",
                "OMPSSC_FLAGS=",
                "OMPC_FINAL_FLAGS=",
                "OMPSSC_FINAL_FLAG=",
                "CLINK_FLAGS=",
                "OMPLINK_FLAGS=",
                "OMPSSLINK_FLAGS=",
            ]
            lines = [l.format(cc=clang) + "\n" for l in lines]
            config.writelines(lines)
        mkdir(local.path(self.src_file) / "bin")
        with local.cwd(self.src_file):
            run.run(make["-C", self.path_dict[self.name]])
Esempio n. 17
0
    def configure(self):
        clang = cc(self)
        clang_cxx = cxx(self)

        with local.cwd(self.src_dir):
            configure = local["./configure"]
            with local.env(CC=str(clang), CXX=str(clang_cxx)):
                run(configure["--disable-shared", "--without-gcc"])
Esempio n. 18
0
    def compile(self):
        self.download()
        lp_patch = path.template_path("../projects/patches/linpack.patch")
        (patch["-p0"] < lp_patch)()

        self.ldflags += ["-lm"]
        clang = compiler.cc(self)
        run.run(clang["-o", self.run_f, "linpack.c"])
Esempio n. 19
0
    def build(self):
        clang = cc(self)

        with local.cwd(self.src_dir):
            run(clang["-fPIC", "-I.", "-c", "sqlite3.c"])
            run(clang["-shared", "-o", "libsqlite3.so", "sqlite3.o", "-ldl"])

        self.build_leveldb()
Esempio n. 20
0
    def configure(self):
        clang = cc(self)

        with local.cwd(self.src_dir):
            mkdir("build")
            with local.cwd("build"):
                configure = local["../configure"]
                run(configure["--cc=" + str(clang), "--with-libgcc"])
Esempio n. 21
0
    def compile(self):
        self.download()

        testfiles = [local.path(self.testdir) / x for x in self.testfiles]
        cp(testfiles, '.')

        clang = compiler.cc(self)
        with local.cwd(self.src_file):
            run.run(make["CFLAGS=-O3", "CC=" + str(clang), "clean", "bzip2"])
Esempio n. 22
0
    def configure(self):
        clang = cc(self)
        clang_cxx = cxx(self)

        with local.cwd(self.SRC_FILE):
            configure = local["./configure"]
            with local.env(CC=str(clang), CXX=str(clang_cxx)):
                run(configure["--without-ccache", "--disable-pic14-port",
                              "--disable-pic16-port"])
Esempio n. 23
0
    def compile(self):
        self.download()

        clang = compiler.cc(self)
        clang_cxx = compiler.cxx(self)
        with local.cwd(self.src_file):
            with local.env(CXX=str(clang_cxx), CC=str(clang)):
                make("clean")
                run.run(make["all", "-i"])
Esempio n. 24
0
    def configure(self):
        clang = cc(self)

        with local.cwd(self.SRC_FILE):
            configure = local["./configure"]

            with local.env(CC=str(clang)):
                run(configure["--disable-thread", "--disable-opencl",
                              "--enable-pic"])
Esempio n. 25
0
    def configure(self):
        clang = cc(self)
        clang_cxx = cxx(self)

        ccrypt_dir = path.join('.', self.src_dir)
        with local.cwd(ccrypt_dir):
            configure = local["./configure"]
            with local.env(CC=str(clang),
                           CXX=str(clang_cxx)):
                run(configure)
Esempio n. 26
0
    def configure(self):
        self.cflags += ["-fPIC"]
        clang = cc(self)
        configure = local[path.join(self.src_dir, "configure")]

        with local.cwd(self.src_dir):
            with local.env(CC=str(clang)):
                run(configure["--disable-asm", "--disable-shared",
                              "--enable-static",
                              "--disable-dependency-tracking",
                              "--with-pic=yes"])
Esempio n. 27
0
 def configure(self):
     clang = cc(self)
     with local.cwd(self.src_dir):
         configure = local["./configure"]
         with local.env(CC=str(clang)):
             run(configure["--enable-threads=no", "--with-gnu-ld=yes",
                           "--disable-shared",
                           "--disable-dependency-tracking",
                           "--disable-xzdec", "--disable-lzmadec",
                           "--disable-lzmainfo", "--disable-lzma-links",
                           "--disable-scripts", "--disable-doc"])
Esempio n. 28
0
    def compile(self):
        self.download()
        with local.cwd(self.src_file):
            git("fetch", "origin", "pull/17/head:clang")
            git("checkout", "clang")

            run.run(make["config"])

            clang = compiler.cc(self)
            clang_cxx = compiler.cxx(self)
            run.run(make["CC=" + str(clang), "CXX=" + str(clang_cxx), "clean",
                         "lsh", "sh"])
Esempio n. 29
0
    def build(self):
        c_compiler = cc(self)
        cxx_compiler = cxx(self)

        with local.cwd(self.in_src_dir):
            for outfile, srcfiles in self.config['src'].items():
                cls = type(self)
                compiler = cls.select_compiler(c_compiler, cxx_compiler)
                if "flags" in self.config:
                    compiler = compiler[self.config["flags"]]
                compiler = compiler[srcfiles]
                compiler = compiler["-o", outfile]
                run(compiler)
Esempio n. 30
0
    def compile(self):
        self.download()
        tar("xfz", self.src_file)
        unpack_dir = local.path('ruby-{0}'.format(self.version))

        clang = compiler.cc(self)
        clang_cxx = compiler.cxx(self)
        with local.cwd(unpack_dir):
            with local.env(CC=str(clang), CXX=str(clang_cxx)):
                configure = local["./configure"]
                run.run(configure["--with-static-linked-ext",
                                  "--disable-shared"])
            run.run(make["-j", CFG["jobs"]])
Esempio n. 31
0
    def build_leveldb(self):
        sqlite_dir = self.src_dir
        leveldb_dir = "leveldb.src"

        # We need to place sqlite3 in front of all other flags.
        self.ldflags += ["-L{0}".format(path.abspath(sqlite_dir))]
        self.cflags += ["-I{0}".format(path.abspath(sqlite_dir))]
        clang_cxx = cxx(self)
        clang = cc(self)

        with local.cwd(leveldb_dir):
            with local.env(CXX=str(clang_cxx), CC=str(clang)):
                run(make["clean", "out-static/db_bench_sqlite3"])
Esempio n. 32
0
    def compile(self):
        download.Svn(self.src_uri, self.SRC_FILE)

        clang = compiler.cc(self)
        clang_cxx = compiler.cxx(self)

        with local.cwd(self.SRC_FILE):
            configure = local["./configure"]
            with local.env(CC=str(clang), CXX=str(clang_cxx)):
                run.run(configure["--without-ccache", "--disable-pic14-port",
                                  "--disable-pic16-port"])

            run.run(make["-j", CFG["jobs"]])
Esempio n. 33
0
    def build_leveldb(self):
        sqlite_dir = local.path('sqlite-amalgamation-{0}'.format(self.version))
        leveldb_dir = "leveldb.src"

        # We need to place sqlite3 in front of all other flags.
        self.ldflags += ["-L{0}".format(sqlite_dir)]
        self.cflags += ["-I{0}".format(sqlite_dir)]
        clang_cxx = compiler.cxx(self)
        clang = compiler.cc(self)

        with local.cwd(leveldb_dir):
            with local.env(CXX=str(clang_cxx), CC=str(clang)):
                run.run(make["clean", "out-static/db_bench_sqlite3"])
Esempio n. 34
0
    def compile(self):
        self.download()

        download.Wget(self.libmcrypt_uri, self.libmcrypt_file)
        download.Wget(self.mhash_uri, self.mhash_file)

        tar('xfz', self.src_file)
        tar('xfz', self.libmcrypt_file)
        tar('xfz', self.mhash_file)

        builddir = local.path(self.builddir)
        mcrypt_dir = builddir / "mcrypt-2.6.8"
        mhash_dir = builddir / self.mhash_dir
        libmcrypt_dir = builddir / self.libmcrypt_dir

        _cc = compiler.cc(self)
        _cxx = compiler.cxx(self)

        # Build mhash dependency
        with local.cwd(mhash_dir):
            configure = local["./configure"]
            with local.env(CC=_cc, CXX=_cxx):
                run.run(configure["--prefix=" + builddir])
                run.run(make["-j", CFG["jobs"], "install"])

        # Builder libmcrypt dependency
        with local.cwd(libmcrypt_dir):
            configure = local["./configure"]
            with local.env(CC=_cc, CXX=_cxx):
                run.run(configure["--prefix=" + builddir])
                run.run(make["-j", CFG["jobs"], "install"])

        with local.cwd(mcrypt_dir):
            configure = local["./configure"]
            lib_dir = builddir / "lib"
            inc_dir = builddir / "include"
            env = CFG["env"].value
            mod_env = dict(
                CC=_cc,
                CXX=_cxx,
                LD_LIBRARY_PATH=path.list_to_path(
                    [str(lib_dir)] + env.get("LD_LIBRARY_PATH", [])),
                LDFLAGS="-L" + str(lib_dir),
                CFLAGS="-I" + str(inc_dir))
            env.update(mod_env)
            with local.env(**env):
                run.run(configure["--disable-dependency-tracking",
                                  "--enable-static", "--disable-shared",
                                  "--with-libmcrypt=" +
                                  builddir, "--with-libmhash=" + builddir])
            run.run(make["-j", CFG["jobs"]])
Esempio n. 35
0
    def compile(self):
        self.download()
        tar("xfJ", self.src_file)
        unpack_dir = local.path('Python-{0}'.format(self.version))

        clang = compiler.cc(self)
        clang_cxx = compiler.cxx(self)

        with local.cwd(unpack_dir):
            configure = local["./configure"]
            with local.env(CC=str(clang), CXX=str(clang_cxx)):
                run.run(configure["--disable-shared", "--without-gcc"])

            run.run(make)
Esempio n. 36
0
    def compile(self):
        self.download()
        tar('xfj', self.src_file)
        unpack_dir = "ffmpeg-{0}".format(self.version)
        clang = compiler.cc(self)

        with local.cwd(unpack_dir):
            download.Rsync(self.fate_uri, self.fate_dir)
            configure = local["./configure"]
            run.run(configure[
                "--disable-shared", "--cc=" + str(clang), "--extra-ldflags=" +
                " ".join(self.ldflags), "--samples=" + self.fate_dir])
            run.run(make["clean"])
            run.run(make["-j{0}".format(str(CFG["jobs"])), "all"])
Esempio n. 37
0
    def compile(self):
        self.download()

        tar("xf", self.src_file)
        unpack_dir = local.path('tcc-{0}.tar.bz2'.format(self.version))

        clang = compiler.cc(self)

        with local.cwd(unpack_dir):
            mkdir("build")
            with local.cwd("build"):
                configure = local["../configure"]
                run.run(configure["--cc=" + str(clang), "--with-libgcc"])
                run.run(make)
Esempio n. 38
0
    def compile(self):
        self.download()
        unzip(self.src_file)
        unpack_dir = local.path('sqlite-amalgamation-{0}'.format(self.version))

        SQLite3.fetch_leveldb()

        clang = compiler.cc(self)

        with local.cwd(unpack_dir):
            run.run(clang["-fPIC", "-I.", "-c", "sqlite3.c"])
            run.run(
                clang["-shared", "-o", "libsqlite3.so", "sqlite3.o", "-ldl"])

        self.build_leveldb()
Esempio n. 39
0
    def compile(self):
        package_atom = "{domain}/{name}".format(
            domain=self.domain, name=self.name)

        LOG.debug('Installing dependencies.')
        emerge(package_atom, '--onlydeps', env=self.emerge_env)
        c_compiler = local.path(str(compiler.cc(self)))
        cxx_compiler = local.path(str(compiler.cxx(self)))

        setup_compilers('/etc/portage/make.conf')
        ln("-sf", str(c_compiler), local.path('/') / c_compiler.basename)
        ln('-sf', str(cxx_compiler), local.path('/') / cxx_compiler.basename)

        LOG.debug('Installing %s.', package_atom)
        emerge(package_atom, env=self.emerge_env)
Esempio n. 40
0
    def compile(self):
        self.download()
        tar("xfJ", self.src_file)
        unpack_dir = "gzip-{0}.tar.xz".format(self.version)

        testfiles = [local.path(self.testdir) / x for x in self.testfiles]
        cp(testfiles, '.')

        clang = compiler.cc(self)
        with local.cwd(unpack_dir):
            configure = local["./configure"]
            with local.env(CC=str(clang)):
                run.run(configure["--disable-dependency-tracking",
                                  "--disable-silent-rules", "--with-gnu-ld"])
            run.run(make["-j" + str(CFG["jobs"]), "clean", "all"])
Esempio n. 41
0
    def compile_verify(self, compiler_args, polybench_opts):
        polybench_opts.append("-DPOLYBENCH_DUMP_ARRAYS")

        cflags = self.cflags
        ldflags = self.ldflags

        self.cflags = []
        self.ldflags = []

        clang_no_opts = compiler.cc(self)

        self.cflags = cflags
        self.ldflags = ldflags
        run.run(clang_no_opts[polybench_opts, compiler_args, "-o", self.name +
                              ".no-opts", "-lm"])
        return polybench_opts
Esempio n. 42
0
    def compile(self):
        self.download()
        testfiles = [local.path(self.testdir) / x for x in self.inputfiles]
        for testfile in testfiles:
            cp(testfile, self.builddir)

        clang = compiler.cc(self)

        with local.cwd(self.SRC_FILE):
            configure = local["./configure"]

            with local.env(CC=str(clang)):
                run.run(configure["--disable-thread", "--disable-opencl",
                                  "--enable-pic"])

            run.run(make["clean", "all", "-j", CFG["jobs"]])
Esempio n. 43
0
    def compile(self):
        self.download()
        book_file = "book.bin"
        book_bin = "http://www.craftychess.com/downloads/book/" + book_file
        download.Wget(book_bin, book_file)

        unpack_dir = "crafty.src"
        mkdir(unpack_dir)

        with local.cwd(unpack_dir):
            unzip(local.path("..") / self.src_file)
        mv(book_file, unpack_dir)

        clang = compiler.cc(self)
        with local.cwd(unpack_dir):
            target_opts = ["-DCPUS=1", "-DSYZYGY", "-DTEST"]
            crafty_make = make["target=UNIX", "CC=" + str(clang), "opt=" +
                               " ".join(target_opts), "crafty-make"]
            run.run(crafty_make)
Esempio n. 44
0
    def compile(self):
        self.download()
        tar("xf", self.src_file)
        unpack_dir = local.path('rodinia_{0}'.format(self.version))

        c_compiler = compiler.cc(self)
        cxx_compiler = compiler.cxx(self)

        config_dir = self.config['dir']
        config_src = self.config['src']
        config_flags = self.config['flags']

        with local.cwd(unpack_dir / config_dir):
            for outfile, srcfiles in config_src.items():
                cls = type(self)
                _cc = cls.select_compiler(c_compiler, cxx_compiler)
                if "flags" in self.config:
                    _cc = _cc[config_flags]
                _cc = _cc[srcfiles]
                _cc = _cc["-o", outfile]
                run.run(_cc)
Esempio n. 45
0
    def compile(self):
        self.download()
        download.Wget(self.boost_src_uri, self.boost_src_file)
        tar("xfj", self.boost_src_file)

        cp("-ar", local.path(self.testdir) / "cfg", '.')
        cp("-ar", local.path(self.testdir) / "etc", '.')
        cp("-ar", local.path(self.testdir) / "scenes", '.')
        cp("-ar", local.path(self.testdir) / "share", '.')
        cp("-ar", local.path(self.testdir) / "test", '.')

        clang = compiler.cc(self)
        clang_cxx = compiler.cxx(self)
        # First we have to prepare boost for lady povray...
        boost_prefix = "boost-install"
        with local.cwd(self.boost_src_dir):
            mkdir(boost_prefix)
            bootstrap = local["./bootstrap.sh"]
            run.run(bootstrap["--with-toolset=clang",
                              "--prefix=\"{0}\"".format(boost_prefix)])
            _b2 = local["./b2"]
            run.run(
                _b2["--ignore-site-config", "variant=release", "link=static",
                    "threading=multi", "optimization=speed", "install"])

        src_file = local.path(self.src_file)
        with local.cwd(src_file):
            with local.cwd("unix"):
                sh("prebuild.sh")

            configure = local["./configure"]
            with local.env(
                    COMPILED_BY="BB <*****@*****.**>",
                    CC=str(clang),
                    CXX=str(clang_cxx)):
                run.run(configure["--with-boost=" + boost_prefix])
            run.run(make["all"])
Esempio n. 46
0
 def compile(self):
     self.download()
     unzip(local.cwd / self.src_file)
     clang = cc(self)
     run(make["CC=" + str(clang), "scimark2"])
Esempio n. 47
0
 def test_create(self):
     with local.cwd(self.tmp_dir):
         cmd = compilers.cc(EmptyProject(empty.Empty()))
     self.assertTrue(os.path.exists(str(cmd)))
Esempio n. 48
0
    def compile(self):
        self.download()

        clang = compiler.cc(self)
        with local.cwd(self.src_file):
            run.run(make["CC=" + str(clang)])