Ports: Add gcc-8.3.0 port :^)
This commit is contained in:
parent
07c3cc01ec
commit
7710863e3c
Notes:
sideshowbarker
2024-07-19 13:50:14 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/7710863e3cf
2 changed files with 77 additions and 0 deletions
44
Ports/gcc/dependencies-config.patch
Normal file
44
Ports/gcc/dependencies-config.patch
Normal file
|
@ -0,0 +1,44 @@
|
|||
diff -ru gcc/isl/config.sub gcc-patched/isl/config.sub
|
||||
--- gcc/isl/config.sub 2016-01-24 21:50:53.000000000 +0100
|
||||
+++ gcc-patched/isl/config.sub 2019-05-28 16:34:43.396758421 +0200
|
||||
@@ -1361,6 +1361,7 @@
|
||||
# Each alternative MUST END IN A *, to match a version number.
|
||||
# -sysv* is not here because it comes later, after sysvr4.
|
||||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||
+ | -serenity* \
|
||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
||||
| -sym* | -kopensolaris* | -plan9* \
|
||||
diff -ru gcc/mpc/config.sub gcc-patched/mpc/config.sub
|
||||
--- gcc/mpc/config.sub 2015-02-16 13:28:25.000000000 +0100
|
||||
+++ gcc-patched/mpc/config.sub 2019-05-28 16:34:22.308458127 +0200
|
||||
@@ -1369,6 +1369,7 @@
|
||||
# Each alternative MUST END IN A *, to match a version number.
|
||||
# -sysv* is not here because it comes later, after sysvr4.
|
||||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||
+ | -serenity* \
|
||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
||||
| -sym* | -kopensolaris* | -plan9* \
|
||||
diff -ru gcc/mpfr/config.sub gcc-patched/mpfr/config.sub
|
||||
--- gcc/mpfr/config.sub 2016-03-06 12:33:18.000000000 +0100
|
||||
+++ gcc-patched/mpfr/config.sub 2019-05-28 16:34:33.052611048 +0200
|
||||
@@ -1375,6 +1375,7 @@
|
||||
# Each alternative MUST END IN A *, to match a version number.
|
||||
# -sysv* is not here because it comes later, after sysvr4.
|
||||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||
+ | -serenity* \
|
||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
||||
| -sym* | -kopensolaris* | -plan9* \
|
||||
diff -ru gcc/gmp/configfsf.sub gcc-patched/gmp/configfsf.sub
|
||||
--- gcc/gmp/configfsf.sub 2015-11-01 16:19:48.000000000 +0100
|
||||
+++ gcc-patched/gmp/configfsf.sub 2019-05-28 16:47:14.095698619 +0200
|
||||
@@ -1375,6 +1375,7 @@
|
||||
# Each alternative MUST END IN A *, to match a version number.
|
||||
# -sysv* is not here because it comes later, after sysvr4.
|
||||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||
+ | -serenity* \
|
||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
|
||||
| -sym* | -kopensolaris* | -plan9* \
|
33
Ports/gcc/gcc.sh
Executable file
33
Ports/gcc/gcc.sh
Executable file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/bash
|
||||
PORT_DIR=gcc
|
||||
function fetch() {
|
||||
run_fetch_web "https://ftp.gnu.org/gnu/gcc/gcc-8.3.0/gcc-8.3.0.tar.xz"
|
||||
|
||||
# Add the big GCC patch (same one used by toolchain.)
|
||||
run_patch $SERENITY_ROOT/Toolchain/Patches/gcc.patch -p1
|
||||
|
||||
# Let GCC download mpfr, mpc and isl.
|
||||
run_command contrib/download_prerequisites
|
||||
|
||||
# Patch mpfr, mpc and isl to teach them about "serenity" targets.
|
||||
run_patch dependencies-config.patch -p1
|
||||
}
|
||||
function configure() {
|
||||
run_configure_autotools \
|
||||
--target=i686-pc-serenity \
|
||||
--with-sysroot=/ \
|
||||
--with-build-sysroot=$SERENITY_ROOT/Root \
|
||||
--with-newlib \
|
||||
--enable-languages=c,c++ \
|
||||
--disable-lto \
|
||||
--disable-nls
|
||||
}
|
||||
function build() {
|
||||
MAKEOPTS=""
|
||||
run_make all-gcc all-target-libgcc all-target-libstdc++-v3
|
||||
run_command find ./host-i686-pc-serenity/gcc/ -maxdepth 1 -type f -executable -exec strip --strip-debug {} \; || echo
|
||||
}
|
||||
function install() {
|
||||
run_make $INSTALLOPTS DESTDIR="$SERENITY_ROOT"/Root install-gcc install-target-libgcc install-target-libstdc++-v3
|
||||
}
|
||||
source ../.port_include.sh
|
Loading…
Add table
Reference in a new issue