summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2022-05-16 19:21:38 +0430
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2022-05-19 20:17:10 +0430
commitfd388bb239ca53d219563e02e6b44d2d78fd7595 (patch)
treef7a15cc751527616a20ecf73075e2c5bf6ad3715
parent4876a943cd5c590fee0aed31ad835d00027dfc55 (diff)
downloadserenity-fd388bb239ca53d219563e02e6b44d2d78fd7595.zip
Ports: Update gnuapl's patches to use git patches
-rw-r--r--Ports/gnuapl/patches/0001-Include-fcntl-find-fcntl.h.patch29
-rw-r--r--Ports/gnuapl/patches/0002-Stub-out-the-performance-report-macro.patch26
-rw-r--r--Ports/gnuapl/patches/0003-Remove-use-of-sbrk.patch28
-rw-r--r--Ports/gnuapl/patches/0004-Teach-config.sub-about-serenity.patch (renamed from Ports/gnuapl/patches/sub-config.patch)18
-rw-r--r--Ports/gnuapl/patches/ReadMe.md20
-rw-r--r--Ports/gnuapl/patches/fix-common-includes.patch12
-rw-r--r--Ports/gnuapl/patches/stub-performance-macro.patch11
-rw-r--r--Ports/gnuapl/patches/stub-sbrk.patch13
8 files changed, 113 insertions, 44 deletions
diff --git a/Ports/gnuapl/patches/0001-Include-fcntl-find-fcntl.h.patch b/Ports/gnuapl/patches/0001-Include-fcntl-find-fcntl.h.patch
new file mode 100644
index 0000000000..d1bf3dfa5e
--- /dev/null
+++ b/Ports/gnuapl/patches/0001-Include-fcntl-find-fcntl.h.patch
@@ -0,0 +1,29 @@
+From 579a391c43b9f0972205d565b3baf908cfd79330 Mon Sep 17 00:00:00 2001
+From: Tobias Christiansen <tobyase@serenityos.org>
+Date: Fri, 11 Mar 2022 19:01:35 +0100
+Subject: [PATCH 1/4] Include fcntl find fcntl.h
+
+`fcntl.h` was included as `sys/fcntl.h`, which is not where this lives in Serenity.
+
+Also `sys/select.h` is included here.
+---
+ src/Common.hh | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/Common.hh b/src/Common.hh
+index 2482a13..6476f11 100644
+--- a/src/Common.hh
++++ b/src/Common.hh
+@@ -26,7 +26,8 @@
+ #include <netinet/in.h>
+ #include <sys/un.h>
+ #include <sys/stat.h>
+-#include <sys/fcntl.h>
++#include <fcntl.h>
++#include <sys/select.h>
+
+ #ifdef ENABLE_NLS
+ #include <libintl.h>
+--
+2.36.1
+
diff --git a/Ports/gnuapl/patches/0002-Stub-out-the-performance-report-macro.patch b/Ports/gnuapl/patches/0002-Stub-out-the-performance-report-macro.patch
new file mode 100644
index 0000000000..25cb52e6b2
--- /dev/null
+++ b/Ports/gnuapl/patches/0002-Stub-out-the-performance-report-macro.patch
@@ -0,0 +1,26 @@
+From 44e3ce1d066e2bcc574081ed828368974e0262a2 Mon Sep 17 00:00:00 2001
+From: Tobias Christiansen <tobyase@serenityos.org>
+Date: Fri, 11 Mar 2022 19:01:35 +0100
+Subject: [PATCH 2/4] Stub out the performance report macro
+
+The Macro for performance reporting was throwing compile errors, so we just stub it out.
+---
+ src/Performance.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Performance.cc b/src/Performance.cc
+index e77b6da..1d6ff6e 100644
+--- a/src/Performance.cc
++++ b/src/Performance.cc
+@@ -224,7 +224,7 @@ const uint64_t subsq_avg_AB = Statistics_record::average(sum_subsq_cycles_AB,
+ //
+ #define perfo_1(id, ab, _name, _thr)
+ #define perfo_2(id, ab, _name, _thr)
+-#define perfo_3(id, ab, _name, _thr) fs_ ## id ## ab.print(out);
++#define perfo_3(id, ab, _name, _thr)
+ #define perfo_4(id, ab, name, thr) perfo_3(id, ab, name, thr)
+
+ #include "Performance.def"
+--
+2.36.1
+
diff --git a/Ports/gnuapl/patches/0003-Remove-use-of-sbrk.patch b/Ports/gnuapl/patches/0003-Remove-use-of-sbrk.patch
new file mode 100644
index 0000000000..6d4b6afaa8
--- /dev/null
+++ b/Ports/gnuapl/patches/0003-Remove-use-of-sbrk.patch
@@ -0,0 +1,28 @@
+From c7d2b841f46831b159ed715cc5f313129ba6fb10 Mon Sep 17 00:00:00 2001
+From: Tobias Christiansen <tobyase@serenityos.org>
+Date: Fri, 11 Mar 2022 19:01:35 +0100
+Subject: [PATCH 3/4] Remove use of sbrk()
+
+Again, for performance reporting the function `sbrk` is needed which we don't have. We just stub it out.
+---
+ src/sbrk.cc | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/src/sbrk.cc b/src/sbrk.cc
+index 6e5292f..704d75c 100644
+--- a/src/sbrk.cc
++++ b/src/sbrk.cc
+@@ -34,9 +34,6 @@ extern uint64_t top_of_memory();
+ uint64_t
+ top_of_memory()
+ {
+- if (sizeof(const void *) == 4)
+- return 0xFFFFFFFFULL & uint64_t(sbrk(0));
+- else
+- return uint64_t(sbrk(0));
++ return 0xFFFFFFFFULL;
+ }
+
+--
+2.36.1
+
diff --git a/Ports/gnuapl/patches/sub-config.patch b/Ports/gnuapl/patches/0004-Teach-config.sub-about-serenity.patch
index a4c79c9058..71c8442490 100644
--- a/Ports/gnuapl/patches/sub-config.patch
+++ b/Ports/gnuapl/patches/0004-Teach-config.sub-about-serenity.patch
@@ -1,5 +1,16 @@
---- apl-1.8/config.sub
-+++ apl-1.8/config.sub
+From b60680828e48ca362e86913de773a37b7a06bc74 Mon Sep 17 00:00:00 2001
+From: Tobias Christiansen <tobyase@serenityos.org>
+Date: Fri, 11 Mar 2022 19:01:35 +0100
+Subject: [PATCH 4/4] Teach config.sub about serenity
+
+---
+ config.sub | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/config.sub b/config.sub
+index eb0389a..bde853e 100755
+--- a/config.sub
++++ b/config.sub
@@ -1290,7 +1290,7 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
@@ -9,3 +20,6 @@
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
+--
+2.36.1
+
diff --git a/Ports/gnuapl/patches/ReadMe.md b/Ports/gnuapl/patches/ReadMe.md
index 9f5fd61e0a..977b3af137 100644
--- a/Ports/gnuapl/patches/ReadMe.md
+++ b/Ports/gnuapl/patches/ReadMe.md
@@ -1,19 +1,27 @@
-# Patches for GNU APL on SerenityOS
+# Patches for gnuapl on SerenityOS
-## `fix-common-includes.patch`
+## `0001-Include-fcntl-find-fcntl.h.patch`
+
+Include fcntl find fcntl.h
`fcntl.h` was included as `sys/fcntl.h`, which is not where this lives in Serenity.
Also `sys/select.h` is included here.
-## `stub-performance-macro.patch`
+## `0002-Stub-out-the-performance-report-macro.patch`
+
+Stub out the performance report macro
The Macro for performance reporting was throwing compile errors, so we just stub it out.
-## `stub-sbrk.patch`
+## `0003-Remove-use-of-sbrk.patch`
+
+Remove use of sbrk()
Again, for performance reporting the function `sbrk` is needed which we don't have. We just stub it out.
-## `sub-config.patch`
+## `0004-Teach-config.sub-about-serenity.patch`
+
+Teach config.sub about serenity
+
-The default change to `config.sub`: Add `serenity` as a valid target.
diff --git a/Ports/gnuapl/patches/fix-common-includes.patch b/Ports/gnuapl/patches/fix-common-includes.patch
deleted file mode 100644
index 491c6f8559..0000000000
--- a/Ports/gnuapl/patches/fix-common-includes.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- apl-1.8/src/Common.hh
-+++ apl-1.8/src/Common.hh
-@@ -26,7 +26,8 @@
- #include <netinet/in.h>
- #include <sys/un.h>
- #include <sys/stat.h>
--#include <sys/fcntl.h>
-+#include <fcntl.h>
-+#include <sys/select.h>
-
- #ifdef ENABLE_NLS
- #include <libintl.h>
diff --git a/Ports/gnuapl/patches/stub-performance-macro.patch b/Ports/gnuapl/patches/stub-performance-macro.patch
deleted file mode 100644
index d35dd7da38..0000000000
--- a/Ports/gnuapl/patches/stub-performance-macro.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- apl-1.8/src/Performance.cc
-+++ apl-1.8/src/Performance.cc
-@@ -224,7 +224,7 @@ const uint64_t subsq_avg_AB = Statistics_record::average(sum_subsq_cycles_AB,
- //
- #define perfo_1(id, ab, _name, _thr)
- #define perfo_2(id, ab, _name, _thr)
--#define perfo_3(id, ab, _name, _thr) fs_ ## id ## ab.print(out);
-+#define perfo_3(id, ab, _name, _thr)
- #define perfo_4(id, ab, name, thr) perfo_3(id, ab, name, thr)
-
- #include "Performance.def"
diff --git a/Ports/gnuapl/patches/stub-sbrk.patch b/Ports/gnuapl/patches/stub-sbrk.patch
deleted file mode 100644
index ab62be89d5..0000000000
--- a/Ports/gnuapl/patches/stub-sbrk.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- apl-1.8/src/sbrk.cc
-+++ apl-1.8/src/sbrk.cc
-@@ -34,9 +34,6 @@ extern uint64_t top_of_memory();
- uint64_t
- top_of_memory()
- {
-- if (sizeof(const void *) == 4)
-- return 0xFFFFFFFFULL & uint64_t(sbrk(0));
-- else
-- return uint64_t(sbrk(0));
-+ return 0xFFFFFFFFULL;
- }
-