Bug 683975 - Need infra for developer contributed compilers. r=rail.

Build glibc.
This commit is contained in:
Rafael Ávila de Espíndola 2012-01-24 09:41:25 -05:00
Родитель 98b67885ca
Коммит e5c521c86d
1 изменённых файлов: 17 добавлений и 1 удалений

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

@ -71,6 +71,14 @@ def build_one_stage(env, stage_dir):
build_package(binutils_source_dir, binutils_build_dir,
["--prefix=%s" % tool_inst_dir])
glibc_build_dir = stage_dir + '/glibc'
build_package(glibc_source_dir, glibc_build_dir,
["--disable-profile",
"--enable-add-ons=nptl",
"--without-selinux",
"--enable-kernel=2.6.25",
"--prefix=%s" % tool_inst_dir])
gcc_build_dir = stage_dir + '/gcc'
build_package(gcc_source_dir, gcc_build_dir,
["--prefix=%s" % tool_inst_dir,
@ -96,6 +104,7 @@ def build_source_dir(prefix, version):
return source_dir + '/' + prefix + version
binutils_version = "2.21.1"
glibc_version = "2.13" #FIXME: should probably use 2.5.1
tar_version = "1.26"
gcc_version = "4.5.2"
mpfr_version = "2.4.2"
@ -104,6 +113,8 @@ mpc_version = "0.8.1"
binutils_source_uri = "http://ftp.gnu.org/gnu/binutils/binutils-%sa.tar.bz2" % \
binutils_version
glibc_source_uri = "http://ftp.gnu.org/gnu/glibc/glibc-%s.tar.bz2" % \
glibc_version
tar_source_uri = "http://ftp.gnu.org/gnu/tar/tar-%s.tar.bz2" % \
tar_version
gcc_source_uri = "http://ftp.gnu.org/gnu/gcc/gcc-%s/gcc-%s.tar.bz2" % \
@ -115,6 +126,7 @@ mpc_source_uri = "http://www.multiprecision.org/mpc/download/mpc-%s.tar.gz" % \
mpc_version
binutils_source_tar = download_uri(binutils_source_uri)
glibc_source_tar = download_uri(glibc_source_uri)
tar_source_tar = download_uri(tar_source_uri)
mpc_source_tar = download_uri(mpc_source_uri)
mpfr_source_tar = download_uri(mpfr_source_uri)
@ -124,6 +136,7 @@ gcc_source_tar = download_uri(gcc_source_uri)
build_dir = os.path.realpath('build')
binutils_source_dir = build_source_dir('binutils-', binutils_version)
glibc_source_dir = build_source_dir('glibc-', glibc_version)
tar_source_dir = build_source_dir('tar-', tar_version)
mpc_source_dir = build_source_dir('mpc-', mpc_version)
mpfr_source_dir = build_source_dir('mpfr-', mpfr_version)
@ -134,6 +147,8 @@ if not os.path.exists(source_dir):
os.mkdir(source_dir)
extract(binutils_source_tar, source_dir)
patch('binutils-deterministic.patch', 1, binutils_source_dir)
extract(glibc_source_tar, source_dir)
patch('glibc-deterministic.patch', 1, glibc_source_dir)
extract(tar_source_tar, source_dir)
extract(mpc_source_tar, source_dir)
extract(mpfr_source_tar, source_dir)
@ -158,7 +173,8 @@ stage2_dir = build_dir + '/stage2'
build_one_stage({"CC" : stage1_tool_inst_dir + "/bin/gcc",
"CXX" : stage1_tool_inst_dir + "/bin/g++",
"AR" : stage1_tool_inst_dir + "/bin/ar",
"RANLIB" : "true" })
"RANLIB" : "true" },
stage2_dir)
build_tar_package(tar_inst_dir + "/bin/tar",
"toolchain.tar", stage2_dir, "inst")