Bug 1719228 - Build GCC with the toolchain sysroot. r=firefox-build-system-reviewers,andi

Because GCC is built in stages, the final stage is built with
intermediate stages's GCC, which handles the sysroot correctly, so we
end up with headers and libraries with the expected compatibility.
This allows to use the same toolchain docker images as other toolchains,
based on Debian buster.

Differential Revision: https://phabricator.services.mozilla.com/D119136
This commit is contained in:
Mike Hommey 2021-07-06 21:47:10 +00:00
Родитель 51effea05b
Коммит 5d89676954
2 изменённых файлов: 9 добавлений и 5 удалений

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

@ -61,7 +61,12 @@ build_gcc() {
mkdir $root_dir/gcc-objdir
pushd $root_dir/gcc-objdir
../gcc-source/configure --prefix=${prefix-/tools/gcc} --build=x86_64-unknown-linux-gnu --target="${target}" --enable-languages=c,c++ --disable-nls --disable-gnu-unique-object --enable-__cxa_atexit --with-arch-32=pentiumpro --with-sysroot=/
if [ -d $MOZ_FETCHES_DIR/sysroot ]; then
EXTRA_CONFIGURE_FLAGS="--with-build-sysroot=$MOZ_FETCHES_DIR/sysroot"
export CFLAGS_FOR_BUILD="--sysroot=$MOZ_FETCHES_DIR/sysroot"
fi
../gcc-source/configure --prefix=${prefix-/tools/gcc} --build=x86_64-unknown-linux-gnu --target="${target}" --enable-languages=c,c++ --disable-nls --disable-gnu-unique-object --enable-__cxa_atexit --with-arch-32=pentiumpro --with-sysroot=/ $EXTRA_CONFIGURE_FLAGS
make $make_flags
make $make_flags install DESTDIR=$root_dir

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

@ -5,15 +5,14 @@
job-defaults:
worker-type: b-linux
worker:
# For now we need to keep GCC built on debian 8 because we need
# its headers and libraries to be compatible, as we reship them in
# clang.
docker-image: {in-tree: deb8-toolchain-build}
max-run-time: 3600
run:
resources:
- 'build/unix/build-gcc/build-gcc.sh'
toolchain-artifact: public/build/gcc.tar.xz
fetches:
toolchain:
- linux64-toolchain-sysroot
linux64-gcc-7:
description: "GCC 7 toolchain build"