mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-07 08:29:58 +00:00
Ports: Update gnuapl's patches to use git patches
This commit is contained in:
parent
4876a943cd
commit
fd388bb239
29
Ports/gnuapl/patches/0001-Include-fcntl-find-fcntl.h.patch
Normal file
29
Ports/gnuapl/patches/0001-Include-fcntl-find-fcntl.h.patch
Normal file
|
@ -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
|
||||
|
|
@ -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
|
||||
|
28
Ports/gnuapl/patches/0003-Remove-use-of-sbrk.patch
Normal file
28
Ports/gnuapl/patches/0003-Remove-use-of-sbrk.patch
Normal file
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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.
|
||||
|
|
|
@ -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>
|
|
@ -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"
|
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in a new issue