From 6641868c357822f885b97db3af17f58c0d6144b8 Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Sat, 21 May 2022 21:05:39 +0200 Subject: [PATCH] Ports: Bring all ReadMes in line with their respective patches --- Ports/bash/patches/ReadMe.md | 1 + Ports/binutils/patches/ReadMe.md | 15 ++-- ...-fio-add-serenityos-platform-support.patch | 7 ++ ...-add-serenityos-support-to-configure.patch | 3 + ...disable-rdtsc-support-for-serenityos.patch | 5 ++ Ports/fio/patches/ReadMe.md | 37 +++++--- .../patches/0004-disable-IPV6-support.patch | 2 +- .../0013-nameser.h-is-not-needed.patch | 2 +- Ports/glib/patches/ReadMe.md | 90 +++++-------------- Ports/halflife/patches/ReadMe.md | 24 +++-- Ports/libuv/patches/ReadMe.md | 51 ++--------- Ports/opfor/patches/ReadMe.md | 7 +- Ports/pcre/patches/ReadMe.md | 1 + Ports/zlib/patches/ReadMe.md | 9 +- .../zlib/patches/fix-cross-compilation.patch | 3 + 15 files changed, 118 insertions(+), 139 deletions(-) diff --git a/Ports/bash/patches/ReadMe.md b/Ports/bash/patches/ReadMe.md index 4485ff4c6e..b0d244fbd1 100644 --- a/Ports/bash/patches/ReadMe.md +++ b/Ports/bash/patches/ReadMe.md @@ -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. diff --git a/Ports/binutils/patches/ReadMe.md b/Ports/binutils/patches/ReadMe.md index 46dc4ec81a..511eb7155b 100644 --- a/Ports/binutils/patches/ReadMe.md +++ b/Ports/binutils/patches/ReadMe.md @@ -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. diff --git a/Ports/fio/patches/0002-fio-add-serenityos-platform-support.patch b/Ports/fio/patches/0002-fio-add-serenityos-platform-support.patch index 11ace38112..3c669029ec 100644 --- a/Ports/fio/patches/0002-fio-add-serenityos-platform-support.patch +++ b/Ports/fio/patches/0002-fio-add-serenityos-platform-support.patch @@ -3,6 +3,13 @@ From: Brian Gianforcaro 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-.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 ++ diff --git a/Ports/fio/patches/0003-fio-add-serenityos-support-to-configure.patch b/Ports/fio/patches/0003-fio-add-serenityos-support-to-configure.patch index 99144ee7b7..b38d887d07 100644 --- a/Ports/fio/patches/0003-fio-add-serenityos-support-to-configure.patch +++ b/Ports/fio/patches/0003-fio-add-serenityos-support-to-configure.patch @@ -3,6 +3,9 @@ From: Brian Gianforcaro 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(+) diff --git a/Ports/fio/patches/0004-fio-disable-rdtsc-support-for-serenityos.patch b/Ports/fio/patches/0004-fio-disable-rdtsc-support-for-serenityos.patch index ad3a04bf53..68bb143f2c 100644 --- a/Ports/fio/patches/0004-fio-disable-rdtsc-support-for-serenityos.patch +++ b/Ports/fio/patches/0004-fio-disable-rdtsc-support-for-serenityos.patch @@ -3,6 +3,11 @@ From: Brian Gianforcaro 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(-) diff --git a/Ports/fio/patches/ReadMe.md b/Ports/fio/patches/ReadMe.md index fab55e5557..0aed5a8f7a 100644 --- a/Ports/fio/patches/ReadMe.md +++ b/Ports/fio/patches/ReadMe.md @@ -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 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-.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-.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. + diff --git a/Ports/glib/patches/0004-disable-IPV6-support.patch b/Ports/glib/patches/0004-disable-IPV6-support.patch index 297a270ee7..704b1e35c1 100644 --- a/Ports/glib/patches/0004-disable-IPV6-support.patch +++ b/Ports/glib/patches/0004-disable-IPV6-support.patch @@ -3,7 +3,7 @@ From: Kenneth Myhra 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(+) diff --git a/Ports/glib/patches/0013-nameser.h-is-not-needed.patch b/Ports/glib/patches/0013-nameser.h-is-not-needed.patch index 2fd3c9782d..039f072ac3 100644 --- a/Ports/glib/patches/0013-nameser.h-is-not-needed.patch +++ b/Ports/glib/patches/0013-nameser.h-is-not-needed.patch @@ -1,7 +1,7 @@ From fb55058ea91d87802c696aa58bcaf97a6ff5b827 Mon Sep 17 00:00:00 2001 From: Kenneth Myhra 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 ++ diff --git a/Ports/glib/patches/ReadMe.md b/Ports/glib/patches/ReadMe.md index 3918a11443..d7fd524f6b 100644 --- a/Ports/glib/patches/ReadMe.md +++ b/Ports/glib/patches/ReadMe.md @@ -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 diff --git a/Ports/halflife/patches/ReadMe.md b/Ports/halflife/patches/ReadMe.md index 155a564b30..bc3810de20 100644 --- a/Ports/halflife/patches/ReadMe.md +++ b/Ports/halflife/patches/ReadMe.md @@ -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. diff --git a/Ports/libuv/patches/ReadMe.md b/Ports/libuv/patches/ReadMe.md index 92f7af10a4..d694ba503f 100644 --- a/Ports/libuv/patches/ReadMe.md +++ b/Ports/libuv/patches/ReadMe.md @@ -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 diff --git a/Ports/opfor/patches/ReadMe.md b/Ports/opfor/patches/ReadMe.md index 01a3c98829..5418332348 100644 --- a/Ports/opfor/patches/ReadMe.md +++ b/Ports/opfor/patches/ReadMe.md @@ -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. diff --git a/Ports/pcre/patches/ReadMe.md b/Ports/pcre/patches/ReadMe.md index 1d8825336b..5a93a57812 100644 --- a/Ports/pcre/patches/ReadMe.md +++ b/Ports/pcre/patches/ReadMe.md @@ -3,5 +3,6 @@ ## `0001-test-Disable-S-on-serenity.patch` test: Disable '-S' on serenity + This flag uses setrlimit(), which is not supported. diff --git a/Ports/zlib/patches/ReadMe.md b/Ports/zlib/patches/ReadMe.md index 0a17e81f54..d0b2bc82c3 100644 --- a/Ports/zlib/patches/ReadMe.md +++ b/Ports/zlib/patches/ReadMe.md @@ -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. + diff --git a/Ports/zlib/patches/fix-cross-compilation.patch b/Ports/zlib/patches/fix-cross-compilation.patch index 0136071eab..fc055c5107 100644 --- a/Ports/zlib/patches/fix-cross-compilation.patch +++ b/Ports/zlib/patches/fix-cross-compilation.patch @@ -3,6 +3,9 @@ From: Mark Adler 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(+)