pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
webkit-gtk60: update the report on patches.
Module Name: pkgsrc-wip
Committed By: Santhosh Raju <fox%NetBSD.org@localhost>
Pushed By: fox
Date: Sat Apr 18 19:16:33 2026 +0200
Changeset: 08a190ba582a76806d0a773bd556cf456fd3dd7c
Modified Files:
webkit-gtk60/PATCHES_REPORT.md
Log Message:
webkit-gtk60: update the report on patches.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=08a190ba582a76806d0a773bd556cf456fd3dd7c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
webkit-gtk60/PATCHES_REPORT.md | 243 ++++++++++++++++++++++++++---------------
1 file changed, 156 insertions(+), 87 deletions(-)
diffs:
diff --git a/webkit-gtk60/PATCHES_REPORT.md b/webkit-gtk60/PATCHES_REPORT.md
index 3c27d19fd1..0e7c60bcd3 100644
--- a/webkit-gtk60/PATCHES_REPORT.md
+++ b/webkit-gtk60/PATCHES_REPORT.md
@@ -9,149 +9,200 @@
> GTK4, WPE). This report focuses only on patches relevant to the GTK 6.0 /
> webkit2gtk-6.0 build, which is the only variant built by wip/webkit-gtk60.
-> Report Generated by Claude Code, sonnet 4.7, medium thinking.
+> Report Generated by Claude Code, sonnet 4.6 , medium thinking.
+
+> Each entry has been cross-verified by reading both the OpenBSD patch and the
+> corresponding file in the unpatched NetBSD source tree
+> (`work/webkitgtk-2.52.3/`) and checking for existing `OS(NETBSD)` /
+> `__NetBSD__` / `BOS_NETBSD` / `PAS_OS_NETBSD` guards, as well as checking
+> whether the NetBSD `patches/` directory already covers the file.
---
## HIGH PRIORITY — Likely needed for a working GTK 6.0 build on NetBSD
-### `Source/JavaScriptCore/runtime/MachineContext.h`
+### ~~`Source/JavaScriptCore/runtime/MachineContext.h`~~ — NOT NEEDED
**OpenBSD patch:** `patch-Source_JavaScriptCore_runtime_MachineContext_h`
-Adds complete CPU register extraction from signal context for all supported
-architectures (x86_64, arm64, etc.). Without this, JIT exception handling and
-stack unwinding may be incorrect or crash. The current NetBSD patches do not
-touch this file.
+**Verified not applicable.** The upstream WebKit source already contains
+complete `OS(NETBSD)` blocks for all six register-extraction functions
+(`stackPointerImpl`, `framePointerImpl`, `instructionPointerImpl`,
+`argumentPointer<1>`, `wasmInstancePointer`, `llintInstructionPointer`),
+covering x86_64, ARM, and ARM64. The OpenBSD patch only adds new `OS(OPENBSD)`
+blocks alongside the existing NetBSD ones; it does not modify any NetBSD code.
+No patch is required for NetBSD.
---
-### `Source/JavaScriptCore/assembler/ARM64Assembler.h`
-**OpenBSD patch:** `patch-Source_JavaScriptCore_assembler_ARM64Assembler_h`
+### `Source/JavaScriptCore/assembler/ARM64Assembler.h` — NEEDS IMPROVEMENT
+**OpenBSD patch:** `patch-Source_JavaScriptCore_assembler_ARM64Assembler_h`
+**NetBSD patch:** `patch-Source_JavaScriptCore_assembler_ARM64Assembler.h` (exists but incomplete)
-NetBSD's existing patch for this file merely converts `#error` to `#warning`
-for missing cache flush support, suppressing the build error without fixing the
-underlying problem. OpenBSD's patch actually *implements* the instruction cache
-flush via `__clear_cache()` for FreeBSD/NetBSD/OpenBSD. On ARM64 builds this
-means the NetBSD package silently produces incorrect behaviour at runtime when
-the JIT emits code.
+**Verified: NetBSD patch is present but only suppresses the problem.**
+The upstream source has no cache-flush implementation for BSD platforms. The
+existing NetBSD patch converts the `#error` into a `#warning`, silencing the
+build without fixing the underlying issue. The OpenBSD patch instead implements
+the cache flush properly via `__clear_cache()` for FreeBSD, NetBSD, and
+OpenBSD. On ARM64 builds the NetBSD package currently silently skips the
+instruction cache flush after JIT code emission, which can produce incorrect
+runtime behaviour. The NetBSD patch should be extended to include the
+`__clear_cache()` implementation as OpenBSD does.
---
-### `Source/cmake/WebKitCommon.cmake`
-**OpenBSD patch:** `patch-Source_cmake_WebKitCommon_cmake`
+### `Source/cmake/WebKitCommon.cmake` — MISSING
+**OpenBSD patch:** `patch-Source_cmake_WebKitCommon_cmake`
+**NetBSD patch:** none
-Fixes a CMake function call (`CheckIncludeFile` → `CheckIncludeFiles`) that can
-cause configure-time failures, bumps the required Ruby version to ≥ 3.3, and
-adds SPARC64 CPU detection. The `CheckIncludeFile` fix is not
-architecture-specific and may affect NetBSD builds.
+**Verified: all three changes are absent from the NetBSD source and patches.**
+- The source at line 222 still uses `include(CheckIncludeFile)` (singular);
+ the correct form is `CheckIncludeFiles` (plural). This can cause
+ configure-time failures.
+- The Ruby version requirement is still 2.5; OpenBSD bumps it to 3.3 to
+ reflect the actual minimum needed.
+- No SPARC64 CPU detection is present (not applicable to NetBSD, but the
+ `CheckIncludeFiles` fix is platform-neutral and should be applied).
---
-### `Source/cmake/WebKitCompilerFlags.cmake`
-**OpenBSD patch:** `patch-Source_cmake_WebKitCompilerFlags_cmake`
+### `Source/cmake/WebKitCompilerFlags.cmake` — MISSING
+**OpenBSD patch:** `patch-Source_cmake_WebKitCompilerFlags_cmake`
+**NetBSD patch:** none
-Removes the `--no-undefined` linker flag. On BSD systems some symbols are
-resolved at runtime and are not visible at static link time, causing spurious
-link failures when `--no-undefined` is active. This is a common BSD porting
-fix.
+**Verified: `--no-undefined` is still active in the unpatched source (line
+352).** On BSD systems, some symbols are resolved at runtime and are invisible
+at static link time, causing spurious link failures when `--no-undefined` is
+set. Removing or guarding this flag is a standard BSD porting step and is
+directly applicable to NetBSD.
---
-### `Source/cmake/OptionsCommon.cmake`
-**OpenBSD patch:** `patch-Source_cmake_OptionsCommon_cmake`
+### `Source/cmake/OptionsCommon.cmake` — MISSING
+**OpenBSD patch:** `patch-Source_cmake_OptionsCommon_cmake`
+**NetBSD patch:** none
-Prepends the build's internal library directory to the linker search path,
-ensuring the build's own libraries take precedence over any installed system
-versions. Can prevent subtle linking issues on BSD platforms.
+**Verified: the `link_directories()` prepend is absent from the unpatched
+source.** The patch adds `link_directories("${CMAKE_BINARY_DIR}/lib")` to
+ensure the build's own libraries take precedence over any previously installed
+system versions. Without this, the linker may pick up a stale or incompatible
+installed library during the build.
---
## MODERATE PRIORITY — Platform correctness issues that may surface at runtime
-### `Source/WTF/wtf/PlatformEnable.h`
-**OpenBSD patch:** `patch-Source_WTF_wtf_PlatformEnable_h`
+### ~~`Source/WTF/wtf/PlatformEnable.h`~~ — ALREADY PATCHED
+**OpenBSD patch:** `patch-Source_WTF_wtf_PlatformEnable_h`
+**NetBSD patch:** `patch-Source_WTF_wtf_PlatformEnable.h` (covers this)
-OpenBSD explicitly enables DFG JIT for its supported architectures using
-surgical per-platform guards. The current NetBSD approach gates JIT enablement
-via `WebKitFeatures.cmake` using a Linux check, which is a coarser mechanism.
-The OpenBSD approach is more correct and less likely to accidentally disable
-optimisations on future NetBSD configurations.
+**Verified not needed as a separate patch.** The unpatched source at line 792
+gates DFG JIT enablement on a list that already includes `OS(NETBSD)` after the
+existing NetBSD patch is applied. The OpenBSD patch adds `OS(OPENBSD)` to the
+same list, but the NetBSD patch already handles the NetBSD case correctly.
---
-### `Source/WTF/wtf/glib/FileSystemGlib.cpp`
-**OpenBSD patch:** `patch-Source_WTF_wtf_glib_FileSystemGlib_cpp`
+### `Source/WTF/wtf/glib/FileSystemGlib.cpp` — MISSING
+**OpenBSD patch:** `patch-Source_WTF_wtf_glib_FileSystemGlib_cpp`
+**NetBSD patch:** none
-Returns an empty path for `currentExecutablePath()` on OpenBSD. The GLib
-implementation attempts to read `/proc/self/exe`, which does not exist on
-systems without procfs. NetBSD does not mount procfs by default and may exhibit
-the same failure.
+**Verified: the unpatched source uses a generic `OS(UNIX)` fallback for
+`currentExecutablePath()` that attempts to read `/proc/curproc/file` via
+`readlink`.** NetBSD does not mount procfs by default, so this path will fail
+and return garbage. OpenBSD's patch returns an empty `CString` on OpenBSD;
+NetBSD likely needs the same treatment, returning empty rather than attempting
+a procfs read that will fail.
---
-### `Source/WTF/wtf/posix/FileSystemPOSIX.cpp`
+### ~~`Source/WTF/wtf/posix/FileSystemPOSIX.cpp`~~ — NOT NEEDED
**OpenBSD patch:** `patch-Source_WTF_wtf_posix_FileSystemPOSIX_cpp`
-Uses `__st_birthtime` (double-underscore prefix) instead of `st_birthtime` for
-reading file creation time. NetBSD uses the same field name as OpenBSD
-(`__st_birthtime`), so this patch is directly applicable.
+**Verified not applicable.** The unpatched source at line 112 already has a
+combined `#elif OS(DARWIN) || OS(OPENBSD) || OS(NETBSD) || OS(FREEBSD)` guard
+that uses `st_birthtime` (without double-underscore). NetBSD follows the
+Darwin/FreeBSD convention and uses `st_birthtime` directly, not
+`__st_birthtime`. The OpenBSD patch changes that guard specifically for
+OpenBSD's `__st_birthtime` variant, which does not apply to NetBSD.
---
-### `Source/WTF/wtf/unix/MemoryPressureHandlerUnix.cpp`
-**OpenBSD patch:** `patch-Source_WTF_wtf_unix_MemoryPressureHandlerUnix_cpp`
+### `Source/WTF/wtf/unix/MemoryPressureHandlerUnix.cpp` — MISSING
+**OpenBSD patch:** `patch-Source_WTF_wtf_unix_MemoryPressureHandlerUnix_cpp`
+**NetBSD patch:** none
+
+**Verified: the unpatched source has no NetBSD-specific handling in this
+file.** Three concrete problems were found:
+- `<malloc.h>` is included unconditionally; it may not be present on NetBSD.
+- The per-process memory usage sysctl block is guarded by `OS(FREEBSD)` only.
+- The struct field names used (`ki_rssize`, `ki_tsize`) are FreeBSD-specific;
+ NetBSD uses different field names in its process info structs.
-Implements BSD-specific memory pressure detection and per-process memory usage
-reporting. NetBSD has its own sysctl-based memory detection in `bmalloc`, but
-`MemoryPressureHandlerUnix.cpp` may still contain Linux-only code paths (e.g.
-`/proc/self/status` parsing) that fail or produce wrong results on NetBSD.
+NetBSD needs equivalent handling, though the field names will differ from the
+OpenBSD patch.
---
-### `Source/WebCore/platform/network/DNS.h`
-**OpenBSD patch:** `patch-Source_WebCore_platform_network_DNS_h`
+### `Source/WebCore/platform/network/DNS.h` — MISSING
+**OpenBSD patch:** `patch-Source_WebCore_platform_network_DNS_h`
+**NetBSD patch:** none
-Adds `#include <sys/socket.h>` to bring in `AF_INET` / `AF_INET6` definitions.
-On BSD platforms these constants are not always pulled in transitively, which
-can cause compile errors in the DNS resolution code.
+**Verified: the unpatched source at line 42 includes `<netinet/in.h>` but not
+`<sys/socket.h>`.** On BSD platforms `AF_INET` and `AF_INET6` may not be
+transitively available without an explicit `sys/socket.h` include, which can
+cause compile errors in the DNS resolution code.
---
-### `Source/bmalloc/libpas/src/libpas/pas_probabilistic_guard_malloc_allocator.c`
-**OpenBSD patch:** `patch-Source_bmalloc_libpas_src_libpas_pas_probabilistic_guard_malloc_allocator_c`
+### `Source/bmalloc/libpas/src/libpas/pas_probabilistic_guard_malloc_allocator.c` — MISSING
+**OpenBSD patch:** `patch-Source_bmalloc_libpas_src_libpas_pas_probabilistic_guard_malloc_allocator_c`
+**NetBSD patch:** none
-Disables use of `backtrace()`, which may be unavailable or not linked by
-default in the pkgsrc build environment. Without this guard the build may fail
-to link or produce broken stack traces.
+**Verified: the unpatched source at line 47 enables `backtrace()` only for
+Android (API ≥ 33), Darwin, and glibc Linux.** NetBSD is not included in this
+guard. Whether `backtrace()` is available in the pkgsrc build environment needs
+to be confirmed; if it is not linked by default the build will fail at link
+time. Adding a `PAS_OS(NETBSD)` exclusion matches what OpenBSD does.
---
-### `Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.c`
-**OpenBSD patch:** `patch-Source_bmalloc_libpas_src_libpas_pas_thread_local_cache_c`
+### `Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.c` — MISSING
+**OpenBSD patch:** `patch-Source_bmalloc_libpas_src_libpas_pas_thread_local_cache_c`
+**NetBSD patch:** none
-Uses `pthread_get_name_np()` with the BSD-compatible argument order, which
-differs from the glibc signature. NetBSD uses the same argument order as
-OpenBSD here, so this patch applies directly.
+**Verified: the unpatched source handles `pthread_get_name_np()` only for
+PlayStation (2-argument form) and uses `pthread_getname_np()` (no underscore,
+POSIX form) elsewhere.** OpenBSD's patch adds an `#include <pthread_np.h>` and
+uses the 3-argument `pthread_get_name_np(thread, buf, size)` form specific to
+BSD. NetBSD also provides `pthread_get_name_np()` via `<pthread_np.h>` with the
+same 3-argument BSD signature, so NetBSD needs the same treatment.
---
## LOW PRIORITY — Worth investigating but less likely to block the build
-### `Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h`
-**OpenBSD patch:** `patch-Source_JavaScriptCore_assembler_MacroAssemblerX86_64_h`
+### `Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h` — MISSING
+**OpenBSD patch:** `patch-Source_JavaScriptCore_assembler_MacroAssemblerX86_64_h`
+**NetBSD patch:** none
-Undefines `swap32` and `swap64` macros that conflict with identically named
-symbols in OpenBSD system headers. NetBSD system headers should be checked for
-the same conflict.
+**Verified: no `swap32`/`swap64` undefines are present in the unpatched
+source.** OpenBSD's patch adds `#undef swap32` and `#undef swap64` at the top
+of the file to avoid conflicts with identically named macros in OpenBSD system
+headers. NetBSD system headers should be checked at build time; if the same
+macros are defined there this file will fail to compile on NetBSD x86_64.
---
-### `Source/WTF/wtf/RawHex.h`
-**OpenBSD patch:** `patch-Source_WTF_wtf_RawHex_h`
+### `Source/WTF/wtf/RawHex.h` — MISSING
+**OpenBSD patch:** `patch-Source_WTF_wtf_RawHex_h`
+**NetBSD patch:** none
-Adds OpenBSD to the 32/64-bit integer constructor selection logic. The same
-portability fix may be needed on NetBSD depending on how integer types are
-defined.
+**Verified: the unpatched source at lines 55 and 66 disambiguates `int32_t`
+and `int64_t` constructors only for `CPU(ADDRESS64) || OS(DARWIN) ||
+OS(HAIKU)` and `CPU(ADDRESS32) || OS(DARWIN)` respectively.** `OS(NETBSD)` is
+absent from both conditions. OpenBSD adds itself to these guards; NetBSD likely
+needs to be added as well, particularly for 32-bit builds where the wrong
+constructor overload may be selected.
---
@@ -162,6 +213,9 @@ wip/webkit-gtk60 package:
| Patch | Reason not applicable |
|---|---|
+| `patch-Source_JavaScriptCore_runtime_MachineContext_h` | Upstream already has complete `OS(NETBSD)` blocks for all six functions |
+| `patch-Source_WTF_wtf_posix_FileSystemPOSIX_cpp` | Upstream already includes `OS(NETBSD)` using `st_birthtime` (not `__st_birthtime`) |
+| `patch-Source_WTF_wtf_PlatformEnable_h` | Already covered by existing NetBSD patch |
| `patch-Source_WebCore_CMakeLists_txt` | Links `epoll-shim`; NetBSD has native kqueue |
| `patch-Source_WebKit_gtk_webkitgtk_pc_in` | Adds `wxneeded`/`nobtcfi` flags; OpenBSD W^X enforcement only |
| `patch-Source_WTF_wtf_Compiler_h` | Disables `musttail` on MIPS64; not a NetBSD target |
@@ -170,11 +224,26 @@ wip/webkit-gtk60 package:
---
-## Patch Count Summary
-
-| Category | Count |
-|---|---|
-| High priority (missing, likely blocking) | 5 |
-| Moderate priority (runtime correctness) | 7 |
-| Low priority (worth investigating) | 2 |
-| Not applicable to NetBSD | 12+ |
+## Summary
+
+| File | Priority | Status |
+|---|---|---|
+| `JavaScriptCore/runtime/MachineContext.h` | HIGH | Not needed — upstream already handles NetBSD |
+| `JavaScriptCore/assembler/ARM64Assembler.h` | HIGH | Needs improvement — NetBSD patch suppresses error; should implement `__clear_cache()` |
+| `cmake/WebKitCommon.cmake` | HIGH | Missing — `CheckIncludeFile` fix, Ruby 3.3 |
+| `cmake/WebKitCompilerFlags.cmake` | HIGH | Missing — `--no-undefined` still active |
+| `cmake/OptionsCommon.cmake` | HIGH | Missing — internal lib dir prepend absent |
+| `WTF/wtf/PlatformEnable.h` | MODERATE | Already patched by NetBSD |
+| `WTF/wtf/glib/FileSystemGlib.cpp` | MODERATE | Missing — `/proc` fallback will fail on NetBSD |
+| `WTF/wtf/posix/FileSystemPOSIX.cpp` | MODERATE | Not needed — upstream already uses `st_birthtime` for NetBSD |
+| `WTF/wtf/unix/MemoryPressureHandlerUnix.cpp` | MODERATE | Missing — no NetBSD sysctl/struct handling |
+| `WebCore/platform/network/DNS.h` | MODERATE | Missing — `sys/socket.h` not included |
+| `libpas/pas_probabilistic_guard_malloc_allocator.c` | MODERATE | Missing — backtrace not guarded for NetBSD |
+| `libpas/pas_thread_local_cache.c` | MODERATE | Missing — `pthread_get_name_np` signature not handled |
+| `JavaScriptCore/assembler/MacroAssemblerX86_64.h` | LOW | Missing — `swap32`/`swap64` undefines absent |
+| `WTF/wtf/RawHex.h` | LOW | Missing — `int32_t`/`int64_t` constructor guards absent |
+
+**Actionable missing patches: 10**
+**Patches needing improvement: 1** (`ARM64Assembler.h`)
+**Verified not needed: 3**
+**Already covered by existing NetBSD patches: 1**
Home |
Main Index |
Thread Index |
Old Index