Bug 1427344 - Build GCC without --disable-initfini-array. r?build draft
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 29 Dec 2017 17:11:48 +0900
changeset 718230 14c550ccc81ac26aa73110a45b6a540f5e7f0fbe
parent 717422 05fed903f40f05fd923ba2137696ecc1fa0bafe6
child 718231 3b2965c175200405204b7562bab2a05043953d54
push id94845
push userbmo:mh+mozilla@glandium.org
push dateTue, 09 Jan 2018 22:30:29 +0000
reviewersbuild
bugs1427344
milestone59.0a1
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.
build/unix/build-gcc/build-gcc.sh
--- 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
 }