add OpenBSD libc cross-compilation support #30064
No reviewers
Labels
No labels
abi/f32
abi/ilp32
abi/sf
accepted
arch/21k
arch/6502
arch/aarch64
arch/alpha
arch/amdgcn
arch/arc
arch/arc32
arch/arc64
arch/arm
arch/avr
arch/bfin
arch/bpf
arch/colossus
arch/cris
arch/csky
arch/dlx
arch/epiphany
arch/fr30
arch/frv
arch/hexagon
arch/hppa
arch/hppa64
arch/ia64
arch/kalimba
arch/kvx
arch/lanai
arch/lm32
arch/loongarch32
arch/loongarch64
arch/m32r
arch/m68k
arch/m88k
arch/mcore
arch/microblaze
arch/mips
arch/mips64
arch/mmix
arch/moxie
arch/mrisc32
arch/msp430
arch/nds32
arch/ns32k
arch/nvptx
arch/or1k
arch/powerpc
arch/powerpc64
arch/propeller
arch/riscv32
arch/riscv64
arch/rl78
arch/rx
arch/s390x
arch/sh
arch/sparc
arch/sparc64
arch/spirv
arch/spu
arch/tricore
arch/v850
arch/vax
arch/vc4
arch/ve
arch/wasm
arch/x86
arch/x86_64
arch/xcore
arch/xtensa
autodoc
backend/c
backend/llvm
backend/self-hosted
binutils
breaking
build system
debug info
docs
error message
frontend
fuzzing
incremental
lib/c
lib/compiler-rt
lib/cxx
lib/std
lib/tsan
lib/ubsan-rt
lib/unwind
linking
miscompilation
os/android
os/dragonfly
os/driverkit
os/emscripten
os/freebsd
os/fuchsia
os/haiku
os/hurd
os/illumos
os/ios
os/linux
os/maccatalyst
os/macos
os/managarm
os/netbsd
os/ohos
os/openbsd
os/plan9
os/redox
os/rtems
os/serenity
os/tvos
os/uefi
os/visionos
os/wasi
os/watchos
os/windows
proposal
release notes
testing
zig cc
zig fmt
zig reduce
bounty
bug
contributor-friendly
downstream
enhancement
infra
optimization
question
regression
upstream
use case
No milestone
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ziglang/zig!30064
Loading…
Reference in a new issue
No description provided.
Delete branch "alexrp/zig:openbsd"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This adds the following cross targets:
aarch64-openbsd-nonearm-openbsd-eabimips64-openbsd-nonemips64el-openbsd-nonepowerpc-openbsd-eabihfpowerpc64-openbsd-noneriscv64-openbsd-nonesparc64-openbsd-nonex86-openbsd-nonex86_64-openbsd-nonecloses https://github.com/ziglang/zig/issues/2878
e021dc98d6 can be reverted once #30063 is implemented, which I'll probably do soon after this if no one else bites in the meantime.
Size of the added headers here is a bit of a problem:
18M of that is just
lib/libc/include/generic-openbsd/dev! I'm not sure if there's an easy way to determine how much of that directory is even appropriate for userspace (it may unfortunately turn out to be all of it). For comparison, that directory is 1.8M and 3M for FreeBSD and NetBSD respectively. Without that bloat, the total size of the OpenBSD headers is more in line with the other BSDs.af6fc954cf979e12a0c1979e12a0c19275f3f5139275f3f5134d6e979360I've excluded
/usr/include/devfrom this, bringing the total size of OpenBSD headers down to:(For comparison, FreeBSD and NetBSD are both 17M each.)
Any of these headers that turn out to be needed in the wild can be added as necessary.
https://codeberg.org/ziglang/infra/src/branch/master/libc-update/openbsd.md
4d6e97936026935d9da126935d9da15750d3016cJust due to the sheer amount of installation size increase here I'd like a chance to poke around at this before it permanently increases the size of the git repo
5750d3016cc0d3dd7641c0d3dd764171745866737174586673b40e65d94a@alexrp wrote in #30064 (comment):
To put these numbers into perspective:
@ -1364,6 +1364,89 @@ const test_targets = blk: {.link_libc = true,},// NetBSD TargetsTypo: NetBSD -> OpenBSD
std.Io.Threadedshould usefutexon OpenBSD #30063std.Io.Threadedshould usefutexon OpenBSD #30063std.Io.Threadedshould usefutexon OpenBSD #30063std.Io.Threadedshould usefutexon OpenBSD #30063Nice work.
b40e65d94aefa93b99b0efa93b99b0b318ee6cdaShould the "Tier System" issues on github.com be updated after this?
yes
x86_64-openbsdas tar to download #30871