ladybird/Ports/gcc/package.sh
Daniel Bertalan bd3ed700f2 Toolchain+Ports: Use the GNU hash format by default
This hash format offers faster symbol lookup than the System V hash.

We've been using it in all our shared libraries for a long time, but did
not have it enabled by default in our toolchain, so ports couldn't make
use of it.
2022-01-24 10:41:47 +00:00

25 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env -S bash ../.port_include.sh
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" "--enable-initfini-array" "--with-linker-hash-style=gnu")
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")
depends=("binutils")
auth_type="sha256"
post_fetch() {
run contrib/download_prerequisites
}
build() {
run make "${makeopts[@]}"
run find "./host-${SERENITY_ARCH}-pc-serenity/gcc/" -maxdepth 1 -type f -executable -exec strip --strip-debug {} \; || echo
}
install() {
run make "${installopts[@]}"
run ln -sf gcc "${SERENITY_INSTALL_ROOT}/usr/local/bin/cc"
}