Bug 683975 - build unifdef. r=rail

This commit is contained in:
Rafael Ávila de Espíndola 2012-02-24 12:11:01 -05:00
Родитель e2bf9b33e6
Коммит 0cde4c94e7
1 изменённых файлов: 17 добавлений и 2 удалений

Просмотреть файл

@ -4,7 +4,7 @@
# a reproducible build is to run it in a know absolute directory.
# We use a directory in /builds/slave because the mozilla infrastructure
# cleans it up automatically.
base_dir = "/builds/slave/moz-toolschain"
base_dir = "/builds/slave/moz-toolchain"
source_dir = base_dir + "/src"
build_dir = base_dir + "/build"
@ -58,6 +58,10 @@ def build_aux_tools(base_dir):
make_build_dir = base_dir + '/make_build'
build_package(make_source_dir, make_build_dir,
["--prefix=%s" % aux_inst_dir], "make")
run_in(unifdef_source_dir, ["make"])
run_in(unifdef_source_dir, ["make", "prefix=%s" % aux_inst_dir, "install"])
tar_build_dir = base_dir + '/tar_build'
build_package(tar_source_dir, tar_build_dir,
["--prefix=%s" % aux_inst_dir])
@ -84,12 +88,17 @@ def build_glibc_aux(stage_dir, inst_dir):
"--libdir=%s/lib64" % inst_dir,
"--prefix=%s" % inst_dir])
def build_linux_headers(inst_dir):
def build_linux_headers_aux(inst_dir):
run_in(linux_source_dir, [old_make, "headers_check"])
run_in(linux_source_dir, [old_make, "INSTALL_HDR_PATH=dest",
"headers_install"])
shutil.move(linux_source_dir + "/dest", inst_dir)
def build_linux_headers(inst_dir):
def f():
build_linux_headers_aux(inst_dir)
with_env({"PATH" : aux_inst_dir + "/bin:%s" % os.environ["PATH"]}, f)
def build_one_stage(env, stage_dir, is_stage_one):
def f():
build_one_stage_aux(stage_dir, is_stage_one)
@ -167,6 +176,7 @@ gcc_version = "4.5.2"
mpfr_version = "2.4.2"
gmp_version = "5.0.1"
mpc_version = "0.8.1"
unifdef_version = "2.6"
binutils_source_uri = "http://ftp.gnu.org/gnu/binutils/binutils-%sa.tar.bz2" % \
binutils_version
@ -178,6 +188,8 @@ tar_source_uri = "http://ftp.gnu.org/gnu/tar/tar-%s.tar.bz2" % \
tar_version
make_source_uri = "http://ftp.gnu.org/gnu/make/make-%s.tar.bz2" % \
make_version
unifdef_source_uri = "http://dotat.at/prog/unifdef/unifdef-%s.tar.gz" % \
unifdef_version
gcc_source_uri = "http://ftp.gnu.org/gnu/gcc/gcc-%s/gcc-%s.tar.bz2" % \
(gcc_version, gcc_version)
mpfr_source_uri = "http://www.mpfr.org/mpfr-%s/mpfr-%s.tar.bz2" % \
@ -191,6 +203,7 @@ glibc_source_tar = download_uri(glibc_source_uri)
linux_source_tar = download_uri(linux_source_uri)
tar_source_tar = download_uri(tar_source_uri)
make_source_tar = download_uri(make_source_uri)
unifdef_source_tar = download_uri(unifdef_source_uri)
mpc_source_tar = download_uri(mpc_source_uri)
mpfr_source_tar = download_uri(mpfr_source_uri)
gmp_source_tar = download_uri(gmp_source_uri)
@ -201,6 +214,7 @@ glibc_source_dir = build_source_dir('glibc-', glibc_version)
linux_source_dir = build_source_dir('linux-', linux_version)
tar_source_dir = build_source_dir('tar-', tar_version)
make_source_dir = build_source_dir('make-', make_version)
unifdef_source_dir = build_source_dir('unifdef-', unifdef_version)
mpc_source_dir = build_source_dir('mpc-', mpc_version)
mpfr_source_dir = build_source_dir('mpfr-', mpfr_version)
gmp_source_dir = build_source_dir('gmp-', gmp_version)
@ -216,6 +230,7 @@ if not os.path.exists(source_dir):
run_in(glibc_source_dir, ["autoconf"])
extract(tar_source_tar, source_dir)
extract(make_source_tar, source_dir)
extract(unifdef_source_tar, source_dir)
extract(mpc_source_tar, source_dir)
extract(mpfr_source_tar, source_dir)
extract(gmp_source_tar, source_dir)