513 Commits
Author SHA1 Message Date
David 2de7cf9425 link: read the Darwin SDK version from Version
Simulator SDKs set `MinimalDisplayName` to "Simulator - 27.0", so linking with
one as the libc failed with "failed to parse Darwin SDK version". Every SDK
has a plain `Version`, which is also what clang reads.
2026-10-23 02:15:09 +02:00
Alex Rønne Petersen b9c3d39bd7 musl: apply Rich Felker's CVE-2026-107891 patch
https://www.openwall.com/lists/musl/2026/10/21/1
2026-10-22 20:34:10 +02:00
Alex Rønne Petersen cce7615805 libc: update OpenBSD abilists to 8.0 2026-10-21 19:49:26 +02:00
Alex Rønne Petersen 478b3b99d2 libc: update OpenBSD headers to 8.0 2026-10-21 19:49:26 +02:00
Alex Rønne Petersen b22be11891 libc: update Linux headers to 7.3 2026-10-19 18:02:46 +02:00
Linus Groh 9c011c6a40 libc: Add macOS non-POSIX net headers 2026-10-15 22:57:08 +02:00
Alex Rønne Petersen eb8ab541be libc: add darwin header os/os_sync_wait_on_address.h 2026-10-07 00:30:52 +02:00
Alex Rønne Petersen 902c7bb4ff libc: remove __SIG_ATOMIC_TYPE__ workaround for riscv(32,64)-netbsd 2026-10-07 00:30:52 +02:00
Alex Rønne Petersen 3392984789 libc: remove __WCHAR_MIN__ workaround for riscv(32,64)-netbsd 2026-10-07 00:30:52 +02:00
Alex Rønne Petersen 5e754304de remove support for wasi-libc
closes https://github.com/ziglang/zig/issues/9342
closes https://github.com/ziglang/zig/issues/15005
closes https://github.com/ziglang/zig/issues/20747
closes https://github.com/ziglang/zig/issues/22570
closes https://codeberg.org/ziglang/zig/issues/30977
2026-10-04 18:23:18 +02:00
Alex Rønne Petersen e0998c0bef musl: declare all riscv vector registers as syscall clobbers
https://www.openwall.com/lists/musl/2026/10/04/1
2026-10-04 04:51:52 +02:00
Linus Groh 797f46d0ef libc: Update macOS headers to SDK 27.0 2026-09-11 00:11:01 +01:00
Alex Rønne Petersen 857d8ac650 glibc: prune a bunch of dead code 2026-08-24 21:27:00 +02:00
Alex Rønne Petersen 72e00c8384 libc: update Linux headers to 7.2 2026-08-18 12:28:55 +02:00
Alex Rønne Petersen 89f6d00cad musl: set up a proper stack frame in the parent thread in powerpc clone()
https://www.openwall.com/lists/musl/2026/08/09/1
2026-08-09 17:53:03 +02:00
Alex Rønne Petersen 846aa04a07 libc: update NetBSD headers to 11.0-RELEASE 2026-08-02 09:48:22 +02:00
Alex Rønne Petersen b3c063c8b8 libc: update glibc crt0 code to 2.44 2026-07-31 23:04:48 +02:00
Alex Rønne Petersen 2579b37ff6 libc: update glibc abilists to 2.44 2026-07-31 23:04:48 +02:00
Alex Rønne Petersen 23aa045ef4 libc: update glibc headers to 2.44 2026-07-31 23:04:47 +02:00
Alex Rønne Petersen 93905c8905 musl: clear fp/ra in riscv _start()
https://www.openwall.com/lists/musl/2026/07/08/1
2026-07-08 14:33:10 +02:00
Alex Rønne Petersen 02efcc88c1 musl: mark ctr and xer clobbered in syscalls on powerpc
Backport of musl commit f6944eb3c4ce1c97dc39dc36d32390dc9f70b67b.
2026-07-05 10:39:03 +02:00
Linus Groh 2f7e082381 libc: Add missing macOS mach-o headers 2026-07-03 13:17:25 +02:00
Alex Rønne Petersen 7f89b5860c libc: update MinGW-w64 sources to 31bd54ab7d5fe03c67ed2bb1a57e531b9c7f8cc4 2026-07-02 13:02:32 +02:00
Alex Rønne Petersen e118484c09 libc: update MinGW-w64 headers to 31bd54ab7d5fe03c67ed2bb1a57e531b9c7f8cc4 2026-07-02 11:50:32 +02:00
Alex Rønne Petersen f5e8338828 musl: fix read of stack slot containing ctid in x32 clone()
https://www.openwall.com/lists/musl/2026/06/19/4
2026-06-19 08:25:49 +02:00
Alex Rønne Petersen 17cf0ad040 libc: update Linux headers to 7.1 2026-06-15 14:51:59 +02:00
Alex Rønne Petersen 1af28aebd7 musl, wasi-libc: apply Rich Felker's floatscan.c patch fixing strtod() rounding
https://www.openwall.com/lists/musl/2026/05/21/3
2026-06-11 22:26:26 +02:00
Pivok 20b3aa3bcd libzigc: lround lroundf lroundl (#35600)
Implements lround, lroundf and lroundl for libzigc

See #30978

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/35600
2026-06-07 23:08:14 +02:00
Huang Zhichao 9f0a38ac81 libzigc: log1p, log1pf 2026-05-31 09:21:02 +02:00
Alex Rønne Petersen bb1f225bc8 libc: backport glibc header fix to avoid __unused
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=243bdfec8f7cd4a85a8ce6e4e9a5a5accd3ce1aa;hp=ad9784419e274cef9ba7152d7cd2490d291f837b
2026-05-29 05:44:38 +02:00
Alex Rønne Petersen 1e2bac6153 libc: update NetBSD headers to 11.0 2026-05-26 15:40:40 +02:00
Alex Rønne Petersen 0511b3cc9b libc: update NetBSD abilists to 11.0 2026-05-26 14:35:39 +02:00
Alex Rønne Petersen dbfeb07a17 libc: update NetBSD crt0 to 11.0 2026-05-26 14:35:39 +02:00
Linus Groh 10bdb48a88 libc: Update macOS headers to SDK 26.5 2026-05-21 23:32:22 +01:00
Alex Rønne Petersen c13bf5d778 libc: update OpenBSD headers to 7.9 2026-05-21 03:18:46 +02:00
Alex Rønne Petersen 50c8544a7d libc: update OpenBSD abilists for 7.9 2026-05-21 03:18:46 +02:00
mihael 764760df62 libzigc/math: Implement rintl, lrintl (#31791)
It's a fairly straightforward port of `musl`'s `rintl`, like `rint` and `rintf` were. `libc-test` tests for `rintl` are uncommented since they're now passing.

I've also covered special cases for `rint` with tests, and broke down the current `rint` and `modf` test declarations into multiple -- so each libc function get its own test declaration at the very least.

Contributes to #30978

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31791
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-04-27 16:48:55 +02:00
Alex Rønne Petersen 7ec6872cc4 libc: update Linux headers to 7.0 2026-04-22 08:37:15 +02:00
Chris Boesch 3ea77badf9 libc: strdup, strndup, wcsdup (#31935)
Contributes to: #30978

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31935
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-04-22 01:57:58 +02:00
GasInfinity 61cd38e8ac feat(libzigc): add common implementations of pthread_spin_*
* and remove their mingw, musl and wasi implementations
2026-04-21 09:03:06 +02:00
David Senoner 21914c7c01 ziglibc: migrate tee linux syscall (#31911)
Add the Linux syscall wrapper for `tee`.

Migrate the `tee` syscall from musl libc to zig libc.

langref: note `ssize_t` and `isize`  are ABI compatible

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31911
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
Co-authored-by: David Senoner <seda18@rolmail.net>
Co-committed-by: David Senoner <seda18@rolmail.net>
2026-04-18 07:30:43 +02:00
Josh Megnauth ff612334fa libzigc: dup2 and dup3
This commit adds `dup2` and `dup3` based on musl. Zig already has
wrappers for the syscalls, but musl's implementation checks for a rare,
temporary race condition with dup2/3 and `open`. Like musl, this
implementation adds a fallback for dup3 if the syscall isn't available.

Contributes to: #30978
2026-04-17 23:13:39 +02:00
Alex Rønne Petersen e7ee61cd64 musl: fix syscall argument width for mipsn32
https://www.openwall.com/lists/musl/2026/04/16/1
2026-04-16 16:00:18 +02:00
badayvedat a05a25e2bb zig libc: export fdiml and fdimf (#31759)
Exports `fdiml` and `fdimf` in zig libc and removes from from musl and mingw libc.

Contributes to: https://codeberg.org/ziglang/zig/issues/30978

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31759
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
Co-authored-by: badayvedat <badayvedat@gmail.com>
Co-committed-by: badayvedat <badayvedat@gmail.com>
2026-04-16 01:11:04 +02:00
David Rubin 36e2eaf2bd revert zig libc implementation of pow (#31794)
Partially reverts commit b5fbed986b.

Reverts commit 7aae7dd3f4.

Closes #31207

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31794
Co-authored-by: David Rubin <david@vortan.dev>
Co-committed-by: David Rubin <david@vortan.dev>
2026-04-09 17:38:17 +02:00
rpkak b5fbed986b musl,wasi-libc: remove unused exp_data and pow_data 2026-04-03 15:26:18 +02:00
rpkak 208a74a5c5 libc: remove duplicates of some functions
mingw,musl,wasi-libc: remove c files, that only provide functions already included in zigc

mingw: remove c files, that only provide functions, which are in ucrt

mingw: do not include mingw files/zigc functions on targets on which they in ucrt
2026-04-03 15:26:09 +02:00
mihael 9a53be5fb4 libzigc/math: Implement more precise sincosl in compiler_rt
The changes were tested by running:
```bash
$ ./build/stage3/bin/zig build -p stage4 -Denable-llvm -Dno-lib

$ stage4/bin/zig build test-libc -Dlibc-test-path=<LIBC-TEST-PATH> -Dtest-filter=sincosl -fqemu -fwasmtime --summary line
Build Summary: 369/369 steps succeeded
```

Additionally, I've added unit tests for `sincos`.
2026-04-02 23:54:20 +02:00
mihael a6d6af947d libzigc/math: Implement more precise cosl in compiler_rt
The implementation was ported from `musl`. Unit tests for `f80` and `f128` were also added.
`__cosl` was already implemented in `trig.zig` while working on `sinl`.

The changes were tested by running:
```
$ ./build/stage3/bin/zig build -p stage4 -Denable-llvm -Dno-lib

$ stage4/bin/zig build test-libc -Dlibc-test-path=<LIBC-TEST-PATH> -Dtest-filter='math.cosl' -fqemu -fwasmtime --summary line
Build Summary: 553/553 steps succeeded
```
2026-04-02 23:54:20 +02:00
mihael b5ec3e597e libzigc/math: Implement more precise sinl in compiler_rt
The implementation was ported from `musl`. Unit tests for `f80` and `f128` were also added.

The changes were tested by running:

```
$ ./build/stage3/bin/zig build -p stage4 -Denable-llvm -Dno-lib

$ stage4/bin/zig build test-libc -Dlibc-test-path=<LIBC-TEST-PATH> -Dtest-filter=sinl -fqemu -fwasmtime --summary line
Build Summary: 553/553 steps succeeded
```
2026-04-02 23:54:20 +02:00