Commit Graph

415 Commits

Author SHA1 Message Date
Alex Rønne Petersen 0f51f663f0 musl: update some hexagon headers from the quic fork 2026-01-27 23:24:57 +01:00
Andrew Kelley 3729a53eec Merge pull request 'libc: use common implementations for linux syscalls' (#30993) from GasInfinity/zig:libc-musl-syscalls into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/30993
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-01-27 07:48:58 +01:00
Alex Rønne Petersen 519f1eb361 musl: zero fp/lr registers in _start() and clone() on hexagon 2026-01-27 05:23:31 +01:00
Alex Rønne Petersen ff8dbd010f libc: update glibc crt0 code to 2.43 2026-01-26 05:56:54 +01:00
Alex Rønne Petersen e4058f2c27 libc: update glibc abilists to 2.43 2026-01-26 05:56:54 +01:00
Alex Rønne Petersen 49afd7eee0 libc: update glibc headers to 2.43 2026-01-26 05:56:54 +01:00
GasInfinity 9cf34a8d81 feat(libzigc): move over some linux syscalls
* does not move all of them, only those which map almost 1:1
* also removes their musl implementation
2026-01-24 20:41:15 +01:00
Andrew Kelley 4b2eae32f1 Merge pull request 'libc: use common implementation for sys/utsname.h' (#30904) from GasInfinity/zig:libc-uname into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/30904
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-01-22 02:23:52 +01:00
Alex Rønne Petersen 3245eddcb1 musl: fix typo in 171b104640 2026-01-21 17:53:11 +01:00
GasInfinity 4f652fb4e3 feat(libzigc): use common implementations for sys/utsname.h
* and remove their musl/wasi implementation
2026-01-21 00:06:42 +01:00
GasInfinity f67d21f736 chore(libc/musl): remove unused ffs impls
* forgot to remove them in the previous PR
2026-01-21 00:06:42 +01:00
rpkak e6ac1b77f0 libzigc: test and fix acos 2026-01-20 18:02:15 +01:00
Daggerfall-is-the-best-TES-game 21fc85f035 Add acos to ziglibc (#30888)
Since this is my first time contributing I wanted to keep it simple and I added just one function
I tested with
```bash
stage3/bin/zig build -p stage4 -Dno-lib -Dno-langref -Denable-llvm=true --search-prefix ~/repos/zig-boostrap/out/native-linux-musl-baseline/
stage4/bin/zig build test-libc -Dlibc-test-path=../libc-test -Dtest-target-filter=x86_64-linux-musl
```
and the tests passed.
I'm planning on doing more once I get the hang of it.

Co-authored-by: david <davidc.fried@gmail.com>
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/30888
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
Co-authored-by: Daggerfall-is-the-best-TES-game <daggerfall-is-the-best-tes-game@noreply.codeberg.org>
Co-committed-by: Daggerfall-is-the-best-TES-game <daggerfall-is-the-best-tes-game@noreply.codeberg.org>
2026-01-19 22:43:57 +01:00
GasInfinity f0649dd978 feat(libzigc): use common implementations for strings.h and string.h
* forwards all functions to their equivalent `std`
* removes their musl, wasi-libc and mingw implementations
2026-01-17 22:37:29 +01:00
Andrew Kelley d417441f4f Merge pull request 'libc: use common implementations for wchar.h' (#30850) from GasInfinity/zig:libc-wchar into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/30850
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-01-17 00:58:01 +01:00
Alex Rønne Petersen 081888286b musl: patch riscv bits/fenv.h for soft float 2026-01-16 13:29:34 +01:00
Alex Rønne Petersen 171b104640 musl: patch loongarch bits/fenv.h for soft float
This change was missed in 1f7ee99b35.
2026-01-16 13:25:21 +01:00
GasInfinity e22bf480aa feat(libzigc): use common implementation for wchar.h
* but does not fully implement it (missing locale/unicode tables)
* also removes their musl/mingw implementation
2026-01-15 18:01:20 +01:00
GasInfinity e10a325410 feat(libzigc): implement the drand48 family
* also remove their musl implementation
2026-01-14 13:14:33 +01:00
GasInfinity ad3828db45 feat(libzigc): use common rand implementations
* also remove their musl implementation
2026-01-14 12:47:58 +01:00
Carl Åstholm 6376103b23 wasi-libc: De-deduplicate erroneously removed headers
05d8b565ad deduplicated wasi-libc headers
that are identical to upstream musl, but because some public headers
match the same `#include <>` patterns as private headers, this resulted
in unmodified upstream musl headers sometimes getting prioritized when
compiling wasi-libc, resulting in incorrect definitions. For example,
`UTIME_OMIT` is supposed to be -2 on WASI, but became 0x3ffffffe.

The restored headers were sourced from
<https://github.com/WebAssembly/wasi-libc/tree/c89896107d7b57aef69dcadede47409ee4f702ee>
which is the same revision as the most recent wasi-libc sync
07cc32b004.
2026-01-12 22:33:29 +01:00
GasInfinity 514f6e589c feat(libzigc): use common integer ato* and strto* implementations
* also removes their musl implementation
2026-01-12 00:55:11 +01:00
rpkak 08d37d6e14 compiler_rt: fix sqrtf implementation; libc: remove sqrt implementations 2026-01-10 00:09:54 +01:00
rpkak 813ae89208 libc -> libzigc: copysign 2026-01-10 00:09:54 +01:00
rpkak aa7dac9739 libc: remove fmin/fmax implementations 2026-01-10 00:09:54 +01:00
rpkak a2861a6c8d libc: remove fmod implementations 2026-01-10 00:09:54 +01:00
rpkak 9dd32d5e65 libc: remove some more log implementations 2026-01-10 00:09:54 +01:00
GasInfinity 6abb1dcd35 feat(libzigc): add common ctype implementation
* implements all functions in the standard `ctype.h` header
* also removes their musl implementations
2026-01-09 02:51:29 +01:00
GasInfinity 7f6eab2704 feat(libzigc): add nan, nanf, nanl and bsearch
* also remove musl implementation
2026-01-09 00:26:20 +01:00
GasInfinity 335c0fcba1 feat(libzigc): add div, ldiv, lldiv and imaxdiv
* also remove musl implementation
2026-01-07 21:53:40 +01:00
GasInfinity fa625e878f feat(libzigc): add qsort
* also remove musl implementation
2026-01-07 00:06:57 +01:00
Alex Rønne Petersen e226df2ed5 Merge pull request 'add OpenBSD libc cross-compilation support' (#30064) from alexrp/zig:openbsd into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/30064
Reviewed-by: Andrew Kelley <andrewrk@noreply.codeberg.org>
2026-01-06 16:12:54 +01:00
Alex Rønne Petersen 4d3a847cd1 libc: add openbsd libc startup code for 7.8 2026-01-05 14:52:48 +01:00
Alex Rønne Petersen de13923d69 libc: add openbsd 7.8 abilists 2026-01-05 14:52:48 +01:00
Alex Rønne Petersen 66d97267c7 libc: add openbsd 7.8 headers
This excludes all headers in /usr/include/dev because that directory is bonkers
huge (18M). We can add these on an as-needed basis.
2026-01-05 14:52:48 +01:00
mercenary eab93d3574 libc: remove log/f, log2/f and log10/f
These symbols are already provided by compiler_rt
2026-01-01 15:25:40 +01:00
mercenary 814b1e9a58 libc: remove fmod, fmodf and fmodl
These symbols are already provided by compiler_rt
2026-01-01 15:18:44 +01:00
mercenary bffd5c5112 libc: remove exp2 and exp2f
These symbols are already provided by compiler_rt
2025-12-30 18:27:19 +01:00
mercenary 1c05823ff8 libc: remove exp and expf
These symbols are already provided by compiler_rt
2025-12-29 15:55:18 +01:00
mercenary 5e4aefd2a6 libc: remove bcmp
This symbol is already provided by compiler_rt
2025-12-29 15:54:04 +01:00
Alex Rønne Petersen b27bdd5af0 libc: add back freebsd bsm headers
Accidentally removed in #30135.
2025-12-21 03:54:17 +01:00
Linus Groh 648c1c5d28 libc: Update macOS headers to SDK 26.2 2025-12-14 20:35:07 +00:00
Alex Rønne Petersen 27e5047a88 musl: add nop after b to __dlsym in powerpc64 ldso code
https://www.openwall.com/lists/musl/2025/12/12/1
2025-12-12 02:10:41 +01:00
Alex Rønne Petersen 1add36403a musl: add nop after bl to start_c in powerpc64 crt code
https://www.openwall.com/lists/musl/2025/12/11/4
2025-12-12 00:52:07 +01:00
Alex Rønne Petersen 5b8545e4d9 libc: update headers from freebsd 15 2025-12-07 09:32:28 +01:00
Alex Rønne Petersen 51f62ea918 libc: update startup code from freebsd 15 2025-12-07 09:18:38 +01:00
Alex Rønne Petersen 6906460d56 libc: add freebsd 15 abilists file 2025-12-07 09:18:19 +01:00
Luna Schwalbe adc5a39de2 Change github links to codeberg 2025-12-05 14:12:39 +01:00
Alex Rønne Petersen ca7523742f libc: rename any-macos-any to any-darwin-any 2025-11-14 19:19:00 +01:00
Linus Groh f55eb18abb libc: Add mach-o/getsect.h and mach/exception.h macOS headers
Closes #18257.
2025-11-04 21:51:48 +00:00