summaryrefslogtreecommitdiff
path: root/Ports/bdwgc
diff options
context:
space:
mode:
authorPeter Elliott <pelliott@ualberta.ca>2022-05-07 00:44:52 -0600
committerAndreas Kling <kling@serenityos.org>2022-05-23 00:13:26 +0200
commit8a007e755d2bf671070af6c600430061be419bb0 (patch)
treef22ff59cbe3b28cfc613deafe30ecd9b88c446d3 /Ports/bdwgc
parentbccf0a93461d83547c986c967bde3b17d48836d7 (diff)
downloadserenity-8a007e755d2bf671070af6c600430061be419bb0.zip
Ports/bdwgc: Build using automake
This provides the necessary pkg-config files for other automake ports that depend on it.
Diffstat (limited to 'Ports/bdwgc')
-rwxr-xr-xPorts/bdwgc/package.sh18
-rw-r--r--Ports/bdwgc/patches/0001-Teach-os_dep-and-gcconfig.h-about-serenity.patch6
-rw-r--r--Ports/bdwgc/patches/0002-Error-on-unknown-arch.patch6
-rw-r--r--Ports/bdwgc/patches/0003-Teach-dyn_load.c-about-serenity.patch6
-rw-r--r--Ports/bdwgc/patches/0004-Teach-bdwgc-about-serenity-signals.patch6
-rw-r--r--Ports/bdwgc/patches/0005-Explicitly-link-with-pthread.patch6
-rw-r--r--Ports/bdwgc/patches/0006-Make-the-collector-build-with-threads.patch6
-rw-r--r--Ports/bdwgc/patches/0007-Add-serenity-to-the-conigure-list-of-pthread-unixes.patch25
-rw-r--r--Ports/bdwgc/patches/ReadMe.md5
9 files changed, 52 insertions, 32 deletions
diff --git a/Ports/bdwgc/package.sh b/Ports/bdwgc/package.sh
index 54b6b388f1..558d6f0dbc 100755
--- a/Ports/bdwgc/package.sh
+++ b/Ports/bdwgc/package.sh
@@ -8,18 +8,8 @@ depends=(libatomic_ops)
workdir=gc-$version
auth_type=sha256
-build() {
- cd $workdir
- mkdir build || true
- cd build
- cmake .. \
- -Denable_threads=ON \
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY="$DESTDIR/usr/local/bin" \
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY="$DESTDIR/usr/local/lib"
- cmake --build .
-}
-
-install() {
- cd ..
- cp -r include "$DESTDIR/usr/local/include/gc"
+useconfigure=true
+configopts=("--enable-threads=posix")
+pre_configure() {
+ run ./autogen.sh
}
diff --git a/Ports/bdwgc/patches/0001-Teach-os_dep-and-gcconfig.h-about-serenity.patch b/Ports/bdwgc/patches/0001-Teach-os_dep-and-gcconfig.h-about-serenity.patch
index 23ea7049d8..a1a4aa51da 100644
--- a/Ports/bdwgc/patches/0001-Teach-os_dep-and-gcconfig.h-about-serenity.patch
+++ b/Ports/bdwgc/patches/0001-Teach-os_dep-and-gcconfig.h-about-serenity.patch
@@ -1,7 +1,7 @@
-From 1e6a332dc87920d79eca1b1ddb66033c7f369d38 Mon Sep 17 00:00:00 2001
+From a866ef2debf6c1639d14e6990be440614dce9a56 Mon Sep 17 00:00:00 2001
From: Ali Mohammad Pur <ali.mpfard@gmail.com>
Date: Thu, 24 Feb 2022 01:00:57 +0330
-Subject: [PATCH 1/6] Teach os_dep and gcconfig.h about serenity
+Subject: [PATCH 1/7] Teach os_dep and gcconfig.h about serenity
---
include/private/gcconfig.h | 48 +++++++++++++++++++++++++++++++++++---
@@ -211,5 +211,5 @@ index b183423..a6d62b9 100644
# elif defined(LINUX)
# define CODE_OK TRUE
--
-2.35.1
+2.36.1
diff --git a/Ports/bdwgc/patches/0002-Error-on-unknown-arch.patch b/Ports/bdwgc/patches/0002-Error-on-unknown-arch.patch
index f6245174aa..ae011599f3 100644
--- a/Ports/bdwgc/patches/0002-Error-on-unknown-arch.patch
+++ b/Ports/bdwgc/patches/0002-Error-on-unknown-arch.patch
@@ -1,7 +1,7 @@
-From 044ec10fa839e67da2adb0990a60d5a02de205a8 Mon Sep 17 00:00:00 2001
+From ae7f99f75b0957d62364a19e9a75e74e2ef9bd8d Mon Sep 17 00:00:00 2001
From: Ali Mohammad Pur <ali.mpfard@gmail.com>
Date: Thu, 24 Feb 2022 01:50:40 +0330
-Subject: [PATCH 2/6] Error on unknown arch
+Subject: [PATCH 2/7] Error on unknown arch
---
include/private/gcconfig.h | 2 ++
@@ -21,5 +21,5 @@ index e9d1d42..8e48b66 100644
#endif
# if defined(__HAIKU__) && (defined(__amd64__) || defined(__x86_64__))
--
-2.35.1
+2.36.1
diff --git a/Ports/bdwgc/patches/0003-Teach-dyn_load.c-about-serenity.patch b/Ports/bdwgc/patches/0003-Teach-dyn_load.c-about-serenity.patch
index 15f9675fb1..9d4418db43 100644
--- a/Ports/bdwgc/patches/0003-Teach-dyn_load.c-about-serenity.patch
+++ b/Ports/bdwgc/patches/0003-Teach-dyn_load.c-about-serenity.patch
@@ -1,7 +1,7 @@
-From a7fd9227e9111502a6134666d6636a8695c36f4e Mon Sep 17 00:00:00 2001
+From 1f1a8460083486969fd81d0e1bf74fff4fe18e3d Mon Sep 17 00:00:00 2001
From: Ali Mohammad Pur <ali.mpfard@gmail.com>
Date: Thu, 24 Feb 2022 01:54:50 +0330
-Subject: [PATCH 3/6] Teach dyn_load.c about serenity
+Subject: [PATCH 3/7] Teach dyn_load.c about serenity
---
dyn_load.c | 23 ++++++++++++++++++++---
@@ -63,5 +63,5 @@ index d857246..734643d 100644
|| defined(NACL) || defined(NETBSD) \
|| defined(OPENBSD)))
--
-2.35.1
+2.36.1
diff --git a/Ports/bdwgc/patches/0004-Teach-bdwgc-about-serenity-signals.patch b/Ports/bdwgc/patches/0004-Teach-bdwgc-about-serenity-signals.patch
index 04889f36a9..56b396dbbe 100644
--- a/Ports/bdwgc/patches/0004-Teach-bdwgc-about-serenity-signals.patch
+++ b/Ports/bdwgc/patches/0004-Teach-bdwgc-about-serenity-signals.patch
@@ -1,7 +1,7 @@
-From d37f9022e78b9df4959f9be265f91e611e84e03a Mon Sep 17 00:00:00 2001
+From de33591aec7243f14206913f8188519744714389 Mon Sep 17 00:00:00 2001
From: Ali Mohammad Pur <ali.mpfard@gmail.com>
Date: Thu, 24 Feb 2022 03:30:02 +0330
-Subject: [PATCH 4/6] Teach bdwgc about serenity signals
+Subject: [PATCH 4/7] Teach bdwgc about serenity signals
Serenity doesn't have the realtime POSIX signals, so use SIGXCPU and
SIGXFSZ instead.
@@ -62,5 +62,5 @@ index 4b2c429..25eb2a5 100644
# if defined(_SIGRTMIN) && !defined(CPPCHECK)
# define SIG_THR_RESTART _SIGRTMIN + 5
--
-2.35.1
+2.36.1
diff --git a/Ports/bdwgc/patches/0005-Explicitly-link-with-pthread.patch b/Ports/bdwgc/patches/0005-Explicitly-link-with-pthread.patch
index 4f2032c19a..df423f26cb 100644
--- a/Ports/bdwgc/patches/0005-Explicitly-link-with-pthread.patch
+++ b/Ports/bdwgc/patches/0005-Explicitly-link-with-pthread.patch
@@ -1,7 +1,7 @@
-From 3c107421a9541856ba7f5a495bb3aac35a377583 Mon Sep 17 00:00:00 2001
+From 55a28f3dbf0ddcf24077281e38ba7bc7904308d6 Mon Sep 17 00:00:00 2001
From: Ali Mohammad Pur <ali.mpfard@gmail.com>
Date: Thu, 24 Feb 2022 03:47:50 +0330
-Subject: [PATCH 5/6] Explicitly link with pthread
+Subject: [PATCH 5/7] Explicitly link with pthread
The cmakelists was using the wrong variable to link against pthread.
---
@@ -69,5 +69,5 @@ index 3c84220..5e15727 100644
+TARGET_LINK_LIBRARIES(smashtest gc-lib ${LIBS})
ADD_TEST(NAME smashtest COMMAND smashtest)
--
-2.35.1
+2.36.1
diff --git a/Ports/bdwgc/patches/0006-Make-the-collector-build-with-threads.patch b/Ports/bdwgc/patches/0006-Make-the-collector-build-with-threads.patch
index 5e83d7d941..eef830b609 100644
--- a/Ports/bdwgc/patches/0006-Make-the-collector-build-with-threads.patch
+++ b/Ports/bdwgc/patches/0006-Make-the-collector-build-with-threads.patch
@@ -1,7 +1,7 @@
-From 825f33e226dbe842fb6588ba73c31b9fbb079f11 Mon Sep 17 00:00:00 2001
+From a9832f6c77e837637544926717061d00951a6321 Mon Sep 17 00:00:00 2001
From: Ali Mohammad Pur <ali.mpfard@gmail.com>
Date: Fri, 25 Feb 2022 04:53:53 +0330
-Subject: [PATCH 6/6] Make the collector build with threads
+Subject: [PATCH 6/7] Make the collector build with threads
In an extremely limited way for now:
- No extra threads
@@ -48,5 +48,5 @@ index 8e2e3a6..f38fb22 100644
#endif
--
-2.35.1
+2.36.1
diff --git a/Ports/bdwgc/patches/0007-Add-serenity-to-the-conigure-list-of-pthread-unixes.patch b/Ports/bdwgc/patches/0007-Add-serenity-to-the-conigure-list-of-pthread-unixes.patch
new file mode 100644
index 0000000000..1cf95b29ab
--- /dev/null
+++ b/Ports/bdwgc/patches/0007-Add-serenity-to-the-conigure-list-of-pthread-unixes.patch
@@ -0,0 +1,25 @@
+From d55e0b907be765212bdd214c9b0c248646d294e8 Mon Sep 17 00:00:00 2001
+From: Peter Elliott <pelliott@ualberta.ca>
+Date: Mon, 16 May 2022 23:55:41 -0600
+Subject: [PATCH 7/7] Add serenity to the conigure list of pthread unixes
+
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 3b38e6f..5b6daa4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -201,7 +201,7 @@ case "$THREADS" in
+ *-*-aix* | *-*-android* | *-*-cygwin* | *-*-darwin* | *-*-dragonfly* | \
+ *-*-freebsd* | *-*-haiku* | *-*-hpux11* | *-*-irix* | \
+ *-*-kfreebsd*-gnu | *-*-gnu* | *-*-*linux* | *-*-msys* | *-*-nacl* | \
+- *-*-netbsd* | *-*-openbsd* | *-*-osf* | *-*-solaris*)
++ *-*-netbsd* | *-*-openbsd* | *-*-osf* | *-*-solaris* | *-*-serenity* )
+ AC_DEFINE(GC_THREADS)
+ AC_DEFINE([_REENTRANT], [1],
+ [Required define if using POSIX threads.])
+--
+2.36.1
+
diff --git a/Ports/bdwgc/patches/ReadMe.md b/Ports/bdwgc/patches/ReadMe.md
index 216abbd188..1075666b11 100644
--- a/Ports/bdwgc/patches/ReadMe.md
+++ b/Ports/bdwgc/patches/ReadMe.md
@@ -42,3 +42,8 @@ In an extremely limited way for now:
- No fork handling
Seems borked for unknown reasons.
+## `0007-Add-serenity-to-the-conigure-list-of-pthread-unixes.patch`
+
+Add serenity to the conigure list of pthread unixes
+
+