2021-01-22 16:44:05 +00:00
|
|
|
#!/usr/bin/env -S bash ../.port_include.sh
|
2019-09-24 06:56:39 +00:00
|
|
|
port=gcc
|
2022-08-23 07:24:30 +00:00
|
|
|
version=12.2.0
|
2019-09-24 06:56:39 +00:00
|
|
|
useconfigure=true
|
2022-05-07 16:31:52 +00:00
|
|
|
configopts=("--target=${SERENITY_ARCH}-pc-serenity" "--with-sysroot=/" "--with-build-sysroot=${SERENITY_INSTALL_ROOT}" "--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")
|
2022-08-23 07:24:30 +00:00
|
|
|
files="https://ftpmirror.gnu.org/gnu/gcc/gcc-${version}/gcc-${version}.tar.xz gcc-${version}.tar.xz e549cf9cf3594a00e27b6589d4322d70e0720cdd213f39beb4181e06926230ff"
|
2021-09-26 22:16:18 +00: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")
|
2022-05-07 15:01:03 +00:00
|
|
|
depends=("binutils" "gmp" "mpfr" "mpc" "isl")
|
2021-04-27 15:32:48 +00:00
|
|
|
auth_type="sha256"
|
2021-01-21 18:12:25 +00:00
|
|
|
|
|
|
|
|
2019-09-24 06:56:39 +00:00
|
|
|
build() {
|
2021-09-26 22:16:18 +00:00
|
|
|
run make "${makeopts[@]}"
|
2022-05-07 16:31:52 +00:00
|
|
|
run find "./host-${SERENITY_ARCH}-pc-serenity/gcc/" -maxdepth 1 -type f -executable -exec $STRIP --strip-debug {} \; || echo
|
2019-09-24 06:56:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
install() {
|
2021-09-26 22:16:18 +00:00
|
|
|
run make "${installopts[@]}"
|
2021-08-13 19:05:05 +00:00
|
|
|
run ln -sf gcc "${SERENITY_INSTALL_ROOT}/usr/local/bin/cc"
|
2022-05-07 16:31:52 +00:00
|
|
|
run ln -sf g++ "${SERENITY_INSTALL_ROOT}/usr/local/bin/c++"
|
2019-09-24 06:56:39 +00:00
|
|
|
}
|