Bug 1427344 - Build GCC without --disable-initfini-array. r?build
When building on Debian (which we now are), this means we enable
.init_array/.fini_array.
When building on CentOS, this means no change. Which implies we could
roll back to CentOS-based toolchains by just switching back the
toolchain jobs to use the desktop-build docker image again.
This change causes massive differences in the resulting binaries because
of the offset differences, but practically speaking, there is no
difference. .init_array/.fini_array have been supported in glibc for 18
years.
--- a/build/unix/build-gcc/build-gcc.sh
+++ b/build/unix/build-gcc/build-gcc.sh
@@ -107,17 +107,17 @@ build_binutils() {
make install $make_flags DESTDIR=$root_dir
export PATH=$root_dir/${prefix-/tools/gcc}/bin:$PATH
popd
}
build_gcc() {
mkdir $root_dir/gcc-objdir
pushd $root_dir/gcc-objdir
- ../gcc-$gcc_version/configure --prefix=${prefix-/tools/gcc} --enable-languages=c,c++ --disable-nls --disable-gnu-unique-object --enable-__cxa_atexit --with-arch-32=pentiumpro --disable-initfini-array --with-sysroot=/
+ ../gcc-$gcc_version/configure --prefix=${prefix-/tools/gcc} --enable-languages=c,c++ --disable-nls --disable-gnu-unique-object --enable-__cxa_atexit --with-arch-32=pentiumpro --with-sysroot=/
make $make_flags
make $make_flags install DESTDIR=$root_dir
cd $root_dir/tools
ln -s gcc gcc/bin/cc
tar caf $root_dir/gcc.tar.xz gcc/
popd
}