2021-01-23 05:44:05 +13:00
|
|
|
#!/usr/bin/env -S bash ../.port_include.sh
|
2019-09-24 02:56:39 -04:00
|
|
|
port=gcc
|
2021-07-28 19:41:46 +02:00
|
|
|
version=11.2.0
|
2019-09-24 02:56:39 -04:00
|
|
|
useconfigure=true
|
2022-01-19 19:18:10 +01:00
|
|
|
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")
|
2021-07-28 19:41:46 +02:00
|
|
|
files="https://ftpmirror.gnu.org/gnu/gcc/gcc-${version}/gcc-${version}.tar.xz gcc-${version}.tar.xz d08edc536b54c372a1010ff6619dd274c0f1603aa49212ba20f7aa2cda36fa8b"
|
2021-09-27 00:16:18 +02:00
|
|
|
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")
|
2021-04-27 17:32:48 +02:00
|
|
|
auth_type="sha256"
|
2021-01-21 19:12:25 +01:00
|
|
|
|
2020-02-04 01:11:35 +01:00
|
|
|
post_fetch() {
|
2019-09-24 02:56:39 -04:00
|
|
|
run contrib/download_prerequisites
|
|
|
|
}
|
2021-01-21 19:12:25 +01:00
|
|
|
|
2019-09-24 02:56:39 -04:00
|
|
|
build() {
|
2021-09-27 00:16:18 +02:00
|
|
|
run make "${makeopts[@]}"
|
2021-03-11 21:58:18 +01:00
|
|
|
run find "./host-${SERENITY_ARCH}-pc-serenity/gcc/" -maxdepth 1 -type f -executable -exec strip --strip-debug {} \; || echo
|
2019-09-24 02:56:39 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
install() {
|
2021-09-27 00:16:18 +02:00
|
|
|
run make "${installopts[@]}"
|
2021-08-13 21:05:05 +02:00
|
|
|
run ln -sf gcc "${SERENITY_INSTALL_ROOT}/usr/local/bin/cc"
|
2019-09-24 02:56:39 -04:00
|
|
|
}
|