Commit 5979c89
committed
fix: strip .sframe from glibc crt objects to unblock Zig linker on GCC 15+
GCC 15+ compiles glibc crt startup objects (crt1.o, Scrt1.o, rcrt1.o)
with .sframe sections that use R_X86_64_PC64 relocations. Zig's
self-hosted linker doesn't support this relocation type, causing
build-time helpers such as ghostty-build-data to fail with:
error: fatal linker error: unhandled relocation type R_X86_64_PC64
note: in /usr/lib/crt1.o:.sframe
After pacman installs packages in setup-env.sh, use objcopy to strip
.sframe and .rela.sframe from the affected objects. This is
version-agnostic and requires no changes to the Zig invocation.
Also remove URUNTIME_PRELOAD from bundle-appimage.sh — the aarch64
dwarfs-lite uruntime variant does not support the URUNTIME_MOUNT marker
patching it requires, causing AppImage packaging to fail on aarch64.
Fixes: pkgforge-dev#138
See: https://ziggit.dev/t/linker-error-when-building-zig-from-source/143941 parent 64aa416 commit 5979c89
3 files changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | | - | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
17 | 25 | | |
18 | 26 | | |
19 | 27 | | |
| |||
0 commit comments