pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

webkit-gtk60: add a report of patches from OpenBSD.



Module Name:	pkgsrc-wip
Committed By:	Santhosh Raju <fox%NetBSD.org@localhost>
Pushed By:	fox
Date:		Sat Apr 18 12:41:09 2026 +0200
Changeset:	bc69a464e1238c4466503c1459135fc38a9f7677

Added Files:
	webkit-gtk60/PATCHES_REPORT.md

Log Message:
webkit-gtk60: add a report of patches from OpenBSD.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=bc69a464e1238c4466503c1459135fc38a9f7677

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 | 180 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 180 insertions(+)

diffs:
diff --git a/webkit-gtk60/PATCHES_REPORT.md b/webkit-gtk60/PATCHES_REPORT.md
new file mode 100644
index 0000000000..3c27d19fd1
--- /dev/null
+++ b/webkit-gtk60/PATCHES_REPORT.md
@@ -0,0 +1,180 @@
+# Missing Patches Report: NetBSD wip/webkit-gtk60 vs OpenBSD webkitgtk4
+
+**Source versions compared:** webkitgtk-2.52.3  
+**NetBSD patch count:** 38  
+**OpenBSD patch count:** 57  
+**Date:** 2026-04-18
+
+> Note: OpenBSD's webkitgtk4 port uses flavors to build multiple variants (GTK3,
+> 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.
+
+---
+
+## HIGH PRIORITY — Likely needed for a working GTK 6.0 build on NetBSD
+
+### `Source/JavaScriptCore/runtime/MachineContext.h`
+**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.
+
+---
+
+### `Source/JavaScriptCore/assembler/ARM64Assembler.h`
+**OpenBSD patch:** `patch-Source_JavaScriptCore_assembler_ARM64Assembler_h`
+
+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.
+
+---
+
+### `Source/cmake/WebKitCommon.cmake`
+**OpenBSD patch:** `patch-Source_cmake_WebKitCommon_cmake`
+
+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.
+
+---
+
+### `Source/cmake/WebKitCompilerFlags.cmake`
+**OpenBSD patch:** `patch-Source_cmake_WebKitCompilerFlags_cmake`
+
+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.
+
+---
+
+### `Source/cmake/OptionsCommon.cmake`
+**OpenBSD patch:** `patch-Source_cmake_OptionsCommon_cmake`
+
+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.
+
+---
+
+## MODERATE PRIORITY — Platform correctness issues that may surface at runtime
+
+### `Source/WTF/wtf/PlatformEnable.h`
+**OpenBSD patch:** `patch-Source_WTF_wtf_PlatformEnable_h`
+
+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.
+
+---
+
+### `Source/WTF/wtf/glib/FileSystemGlib.cpp`
+**OpenBSD patch:** `patch-Source_WTF_wtf_glib_FileSystemGlib_cpp`
+
+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.
+
+---
+
+### `Source/WTF/wtf/posix/FileSystemPOSIX.cpp`
+**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.
+
+---
+
+### `Source/WTF/wtf/unix/MemoryPressureHandlerUnix.cpp`
+**OpenBSD patch:** `patch-Source_WTF_wtf_unix_MemoryPressureHandlerUnix_cpp`
+
+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.
+
+---
+
+### `Source/WebCore/platform/network/DNS.h`
+**OpenBSD patch:** `patch-Source_WebCore_platform_network_DNS_h`
+
+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.
+
+---
+
+### `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`
+
+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.
+
+---
+
+### `Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.c`
+**OpenBSD patch:** `patch-Source_bmalloc_libpas_src_libpas_pas_thread_local_cache_c`
+
+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.
+
+---
+
+## 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`
+
+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.
+
+---
+
+### `Source/WTF/wtf/RawHex.h`
+**OpenBSD patch:** `patch-Source_WTF_wtf_RawHex_h`
+
+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.
+
+---
+
+## NOT APPLICABLE TO NETBSD
+
+The following OpenBSD patches address concerns that do not apply to the NetBSD
+wip/webkit-gtk60 package:
+
+| Patch | Reason not applicable |
+|---|---|
+| `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 |
+| SPARC64 patches (5 files) | SPARC64 architecture support; not a target for this package |
+| RISCV64 assembler patches (4 files) | RISCV64 assembler fixes; only relevant if NetBSD targets RISCV64 |
+
+---
+
+## 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+ |


Home | Main Index | Thread Index | Old Index