summaryrefslogtreecommitdiff
path: root/Ports
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-05-30 15:27:56 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-05-30 15:27:56 +0200
commit7710863e3cfe3d0404780fc22a2e54655aeb4c54 (patch)
treeaf4af7229ffbc142f198f36f280612ce1c05ff53 /Ports
parent07c3cc01ec530c862f62f1d3f11b5bb5e0e2076c (diff)
downloadserenity-7710863e3cfe3d0404780fc22a2e54655aeb4c54.zip
Ports: Add gcc-8.3.0 port :^)
Diffstat (limited to 'Ports')
-rw-r--r--Ports/gcc/dependencies-config.patch44
-rwxr-xr-xPorts/gcc/gcc.sh33
2 files changed, 77 insertions, 0 deletions
diff --git a/Ports/gcc/dependencies-config.patch b/Ports/gcc/dependencies-config.patch
new file mode 100644
index 0000000000..c78ffa35b2
--- /dev/null
+++ b/Ports/gcc/dependencies-config.patch
@@ -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* \
diff --git a/Ports/gcc/gcc.sh b/Ports/gcc/gcc.sh
new file mode 100755
index 0000000000..9b1cbbdfa8
--- /dev/null
+++ b/Ports/gcc/gcc.sh
@@ -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