diff options
author | Daniel Bertalan <dani@danielbertalan.dev> | 2022-01-19 19:12:50 +0100 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2022-01-24 10:41:47 +0000 |
commit | 5576e9c4c515b148c3a2e4472fce84b7d1b43716 (patch) | |
tree | aa5d53b2da203f9046bf5382d627f69b6fd400fb /Ports/gcc | |
parent | eeb74e2578e69ccfaa872e654f2ece674f8e6d63 (diff) | |
download | serenity-5576e9c4c515b148c3a2e4472fce84b7d1b43716.zip |
Kernel+Toolchain: Use `.init_array` section for global constructors
Before this change, our dynamic linker's global constructor handler
relied on the GNU linker implicitly including the content of `.ctors`
section inside `.init_array`. The mold linker does not do this, so
global constructors would fail to be called in the mold-built userland.
There is no point in sticking to `.ctors`, as most other systems already
use the superior `.init_array` scheme. This commit changes the kernel
linker script to not discard this new section, and enables it by default
in our toolchain.
Diffstat (limited to 'Ports/gcc')
-rwxr-xr-x | Ports/gcc/package.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Ports/gcc/package.sh b/Ports/gcc/package.sh index 49c33ba648..39eedd4c09 100755 --- a/Ports/gcc/package.sh +++ b/Ports/gcc/package.sh @@ -2,7 +2,7 @@ port=gcc version=11.2.0 useconfigure=true -configopts=("--target=${SERENITY_ARCH}-pc-serenity" "--with-sysroot=/" "--with-build-sysroot=${SERENITY_INSTALL_ROOT}" "--with-newlib" "--enable-languages=c,c++" "--disable-lto" "--disable-nls" "--enable-shared" "--enable-default-pie" "--enable-host-shared" "--enable-threads=posix") +configopts=("--target=${SERENITY_ARCH}-pc-serenity" "--with-sysroot=/" "--with-build-sysroot=${SERENITY_INSTALL_ROOT}" "--with-newlib" "--enable-languages=c,c++" "--disable-lto" "--disable-nls" "--enable-shared" "--enable-default-pie" "--enable-host-shared" "--enable-threads=posix" "--enable-initfini-array") files="https://ftpmirror.gnu.org/gnu/gcc/gcc-${version}/gcc-${version}.tar.xz gcc-${version}.tar.xz d08edc536b54c372a1010ff6619dd274c0f1603aa49212ba20f7aa2cda36fa8b" makeopts=("all-gcc" "all-target-libgcc" "all-target-libstdc++-v3" "-j$(nproc)") installopts=("DESTDIR=${SERENITY_INSTALL_ROOT}" "install-gcc" "install-target-libgcc" "install-target-libstdc++-v3") |