Ports: Bring all ReadMes in line with their respective patches

This commit is contained in:
Tim Schumacher 2022-05-21 21:05:39 +02:00 committed by Linus Groh
parent 0e0db33a2a
commit 6641868c35
15 changed files with 118 additions and 139 deletions

View file

@ -3,6 +3,7 @@
## `0001-accept.c-Include-sys-select.h.patch`
accept.c: Include sys/select.h
This is transitively pulled in by other headers in some systems,
serenity is not one of them.

View file

@ -1,9 +1,14 @@
# Patches for Binutils on SerenityOS
# Patches for binutils on SerenityOS
## `binutils.patch`
Teaches the assembler, BFD, and the linker about the SerenityOS target triple.
Add support for SerenityOS
Teaches the assembler, BFD, and the linker about the SerenityOS target
triple.
On x86_64, we override the default base address of non-PIE executables,
because the default (0x400000) is too close to the beginning of the
address space, and DynamicLoader often ends up allocating internal data
at that address. See commit 292398b5857d0104f7c33fdb5d79f45fe8b395dd.
On x86_64, we override the default base address of non-PIE executables, because
the default (0x400000) is too close to the beginning of the address space, and
DynamicLoader often ends up allocating internal data at that address.

View file

@ -3,6 +3,13 @@ From: Brian Gianforcaro <b.gianfo@gmail.com>
Date: Tue, 21 Dec 2021 23:47:36 -0800
Subject: [PATCH 2/4] Port: fio - Add SerenityOS platform support
`fio` abstracts individual operating system support out into to an
`os/os-<name>.h` header where you can select which platform features
are available and implement missing function stubs for our operating
system.
This patch implements basic OS support for Serenity just to get fio up
and running.
---
os/os-serenity.h | 87 ++++++++++++++++++++++++++++++++++++++++++++++++
os/os.h | 3 ++

View file

@ -3,6 +3,9 @@ From: Brian Gianforcaro <b.gianfo@gmail.com>
Date: Tue, 21 Dec 2021 23:48:09 -0800
Subject: [PATCH 3/4] Port: Add SerenityOS support to configure
This patch implements targetos detection for serenity, and also
disables shared memory support automatically for serenity, as it's not
currently supported.
---
configure | 3 +++
1 file changed, 3 insertions(+)

View file

@ -3,6 +3,11 @@ From: Brian Gianforcaro <b.gianfo@gmail.com>
Date: Tue, 21 Dec 2021 23:48:46 -0800
Subject: [PATCH 4/4] Port: fio - Disable rdtsc support for serenity
This patch disables the function which uses `rdtsc` to get the current
clock time, as that instruction isn't allowed to be called from user
space by serenity.
If you did attempt to call it you would trip a segfault.
---
arch/arch-x86.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

View file

@ -1,25 +1,40 @@
# Patches for fio 3.29 on SerenityOS
# Patches for fio on SerenityOS
## `0001-fio-remove-non-existent-header-sys-ipc.patch`
Serenity currently doesn't have a <sys/ipc.h> header, so we have to patch the include out.
Port: fio, remove non existent header sys/ipc.h
Serenity doesn't currently have this header, and
it doesn't appear to be needed on our platform so
remove it for the port.
## `0002-fio-add-serenityos-platform-support.patch`
`fio` abstracts individual operating system support out into to an `os/os-<name>.h` header
where you can select which platform features are available and implement missing function
stubs for our operating system.
Port: fio - Add SerenityOS platform support
This patch implements basic OS support for Serenity just to get fio up and running.
`fio` abstracts individual operating system support out into to an
`os/os-<name>.h` header where you can select which platform features
are available and implement missing function stubs for our operating
system.
This patch implements basic OS support for Serenity just to get fio up
and running.
## `0003-fio-add-serenityos-support-to-configure.patch`
This patch implements targetos detection for serenity, and also disables shared memory
support automatically for serenity, as it's not currently supported.
Port: Add SerenityOS support to configure
This patch implements targetos detection for serenity, and also
disables shared memory support automatically for serenity, as it's not
currently supported.
## `0004-fio-disable-rdtsc-support-for-serenityos.patch`
This patch disables the function which uses `rdtsc` to get the current clock time,
as that instruction isn't allowed to be called from user space by serenity.
Port: fio - Disable rdtsc support for serenity
This patch disables the function which uses `rdtsc` to get the current
clock time, as that instruction isn't allowed to be called from user
space by serenity.
If you did attempt to call it you would trip a segfault.

View file

@ -3,7 +3,7 @@ From: Kenneth Myhra <kennethmyhra@gmail.com>
Date: Thu, 12 Aug 2021 20:33:11 +0200
Subject: [PATCH 04/12] meson.build: Disable IPV6 support
Serenity does not ahve IPV6 support so disable it
Serenity does not have IPV6 support so disable it
---
meson.build | 2 ++
1 file changed, 2 insertions(+)

View file

@ -1,7 +1,7 @@
From fb55058ea91d87802c696aa58bcaf97a6ff5b827 Mon Sep 17 00:00:00 2001
From: Kenneth Myhra <kennethmyhra@gmail.com>
Date: Fri, 13 Aug 2021 22:32:25 +0200
Subject: [PATCH 13/13] arpa/nameser.h is not needed, and Serenity do not have it at the moment.
Subject: [PATCH 13/13] arpa/nameser.h is not needed, and Serenity does not have it at the moment.
---
gio/gnetworking.h.in | 2 ++

View file

@ -1,111 +1,67 @@
# Patches for glib (and submodules) on SerenityOS
# Patches for glib on SerenityOS
## `0001-poll.h-is-located-at-root.patch`
glib includes poll.h from sys/poll.h, but our poll.h is located at root.
meson.build: 'poll.h' is located at root, not 'sys/poll.h'
### Status
- [ ] Local?
- [X] Should be merged to upstream?
- [ ] Resolves issue(s) with our side of things
- [ ] Hack
## `0002-use-glib-in-built-C_IN.patch`
We do not have C_IN so use glib's in-built C_IN
gio/meson.build: Use glib's in-built C_IN
### Status
- [X] Local?
- [ ] Should be merged to upstream?
- [X] Resolves issue(s) with our side of things
- [ ] Hack
Since we do not have C_IN and glib has functionality for providing it,
let glib provide it.
## `0003-let-glib-know-where-our-resolv.h-is.patch`
Let glib's res_query_test know where our resolv.h is located.
gio/meson.build: Let glib know where our 'resolv.h' is located
### Status
- [ ] Local?
- [X] Should be merged to upstream?
- [ ] Resolves issue(s) with our side of things
- [ ] Hack
## `0004-disable-IPV6-support.patch`
Disable IPV6 support since we do not support that yet.
meson.build: Disable IPV6 support
### Status
- [X] Local?
- [ ] Should be merged to upstream?
- [X] Resolves issue(s) with our side of things
- [ ] Hack
Serenity does not have IPV6 support so disable it
## `0005-serenity-does-not-have-IN_MULTICAST.patch`
Since Serenity does not have IN_MULTICAST we just return 0 instead of calling IN_MULTICAST.
gio/ginetaddress.c: Serenity does not have IN_MULTICAST, just return 0
### Status
- [ ] Local?
- [ ] Should be merged to upstream?
- [X] Resolves issue(s) with our side of things
- [X] Hack
Since Serenity does not have IN_MULTICAST we just return 0
## `0006-conflict-rename-gio-mount-function.patch`
Somehow we get a conflict with glib's mount function. This patch renames glib's mount function to gio_mount.
gio/gio-tool-mount.c: Rename glib/gio mount function to gio_mount
### Status
- [ ] Local?
- [ ] Should be merged to upstream?
- [X] Resolves issue(s) with our side of things
- [X] Hack
Somehow glib picks up on Serenity's mount function and gets confused
## `0009-include-section-with-missing-functionality.patch`
This includes a bigger section with functionality that Serenity is missing.
gio/gthredresolver.c: Need to include this section
### Status
- [ ] Local?
- [ ] Should be merged to upstream?
- [X] Resolves issue(s) with our side of things
- [ ] Hack
Serenity is missing all that is defined in this section so let's
include it.
## `0010-stub-for-function-dn_expand.patch`
Adds a stub for the function dn_expand.
gio/gthreadedresolver.c: Add stub for function dn_expand.
### Status
- [ ] Local?
- [ ] Should be merged to upstream?
- [X] Resolves issue(s) with our side of things
- [X] Hack
Serenity is missing dn_expand so include a stub for it
## `0011-ntohl-ntohs-located-in-arpa-inet.h.patch`
In Serenity ntohl/ntohs is located in arpa/inet.h, other stuff glib needs is included in 'netinet/in.h'.
gio/xdgmime/xdgmimecache.c: ntohl/ntohs is located in 'arpa/inet.h'
### Status
- [ ] Local?
- [X] Should be merged to upstream?
- [X] Resolves issue(s) with our side of things
- [ ] Hack
In Serenity ntohl/ntohs is located in arpa/inet.h, other stuff glib
needs is included in 'netinet/in.h'.
## `0012-include-strings.h-for-strcasecmp.patch`
Include 'strings.h' for strcasecmp.
Include 'strings.h' for strcasecmp
### Status
- [ ] Local?
- [X] Should be merged to upstream?
- [X] Resolves issue(s) with our side of things
- [ ] Hack
## `0013-nameser.h-is-not-needed.patch`
glib compiles fine without arpa/nameser.h so do not include since we do not yet support it.
arpa/nameser.h is not needed, and Serenity does not have it at the moment.
### Status
- [ ] Local?
- [ ] Should be merged to upstream?
- [X] Resolves issue(s) with our side of things
- [X] Hack

View file

@ -1,19 +1,31 @@
# Patches for halflife
# Patches for halflife on SerenityOS
## `fwgs-add-serenity.patch`
Add SerenityOS to the supported architectures of FWGS.
Build: Add SerenityOS to list of compatible systems
This is required by the build system to spit out a library with
the correct name/platform.
## `fwgs-dont-format-nan-loop.patch`
This keeps FWGS from formatting a NaN value multiple times each frame,
which would otherwise result in a big performance hit.
Engine: Keep HTTP from endlessly formatting NaN values
For whatever reason, our progress count for HTTP downloads stays at 0.
This results in the engine calculating a NaN progress value many times
each frame, which results in a significant performance hit.
## `hlsdk-add-serenity.patch`
Add SerenityOS to the supported architectures of hlsdk.
Build: Add SerenityOS to list of compatible systems
This is required by the build system to spit out a library with
the correct name/platform.
## `hlsdk-strings-compat.patch`
This bypasses a bunch of `str[n]cmpcase` errors that occur due to weird LibC compatibility problems.
Build: Add `__STRINGS_H_COMPAT_HACK` macro
This bypasses a bunch of `str[n]cmpcase` errors that occur due to weird
LibC compatibility problems.

View file

@ -1,72 +1,37 @@
# Patches for LibUV on SerenityOS
# Patches for libuv on SerenityOS
## `0001-unix-Stub-out-get-set-priority-for-serenity.patch`
Serenity does not have `{get,set}priority()`, this stubs them out.
unix: Stub out {get,set}priority for serenity
### Status
- [X] Local?
- [ ] Should be merged to upstream?
- [X] Resolves issues(s) with our side of things
- [X] Hack
## `0002-fs-Stub-out-unsupported-syscalls.patch`
Makes libuv use `statvfs` instead of `statfs`.
fs: Stub out unsupported syscalls
### Status
- [ ] Local?
- [X] Should be merged to upstream?
- [ ] Resolves issues(s) with our side of things
- [ ] Hack
## `0003-stream-Don-t-use-AF_INET6.patch`
Serenity does not support IPv6, this removes them.
stream: Don't use AF_INET6
### Status
- [ ] Local?
- [ ] Should be merged to upstream?
- [X] Resolves issues(s) with our side of things
- [ ] Hack
## `0004-tcp-Don-t-use-SO_LINGER.patch`
Serenity does not support `SO_LINGER`, this removes them.
tcp: Don't use SO_LINGER
### Status
- [ ] Local?
- [ ] Should be merged to upstream?
- [X] Resolves issues(s) with our side of things
- [X] Hack
## `0005-build-Add-SerenityOS-platform-definitions.patch`
Adds SerenityOS platform definitions to the build.
build: Add SerenityOS platform definitions
### Status
- [ ] Local?
- [X] Should be merged to upstream?
- [ ] Resolves issues(s) with our side of things
- [ ] Hack
## `0006-include-Teach-the-header-about-serenity.patch`
Make the header include guards understand that SerenityOS is a thing.
include: Teach the header about serenity
### Status
- [ ] Local?
- [X] Should be merged to upstream?
- [ ] Resolves issues(s) with our side of things
- [ ] Hack
## `0007-build-Add-platform-specific-stubs-and-implementation.patch`
Adds implementations for libuv's primitives specific to SerenityOS.
build: Add platform-specific stubs and implementations
### Status
- [ ] Local?
- [X] Should be merged to upstream?
- [ ] Resolves issues(s) with our side of things
- [ ] Hack

View file

@ -1,6 +1,9 @@
# Patches for opfor
# Patches for opfor on SerenityOS
## `hlsdk-add-serenity.patch`
Add SerenityOS to the supported architectures of hlsdk.
Build: Add SerenityOS to list of compatible systems
This is required by the build system to spit out a library with
the correct name/platform.

View file

@ -3,5 +3,6 @@
## `0001-test-Disable-S-on-serenity.patch`
test: Disable '-S' on serenity
This flag uses setrlimit(), which is not supported.

View file

@ -2,6 +2,9 @@
## `fix-cross-compilation.patch`
Backports an upstream fix for a bug that caused the host compiler to be used
for linking even though the cross-compiler was specified in the `CC`
environment variable.
Fix configure issue that discarded provided CC definition.
Backports an upstream fix for a bug that caused the host compiler to be
used for linking even though the cross-compiler was specified in the
`CC` environment variable.

View file

@ -3,6 +3,9 @@ From: Mark Adler <madler@alumni.caltech.edu>
Date: Mon, 28 Mar 2022 18:34:10 -0700
Subject: [PATCH] Fix configure issue that discarded provided CC definition.
Backports an upstream fix for a bug that caused the host compiler to be
used for linking even though the cross-compiler was specified in the
`CC` environment variable.
---
configure | 3 +++
1 file changed, 3 insertions(+)