Alex Rønne Petersen
b27c5fbbde
Merge pull request #23913 from alexrp/netbsd-libc
...
Support dynamically-linked NetBSD libc when cross-compiling
2025-05-20 07:46:08 +02:00
Matthew Lugg
23c817548b
Merge pull request #23836 from mlugg/incr-fixes
...
Incremental fixes, refactor `Zcu.File`
2025-05-20 03:25:19 +01:00
Alex Rønne Petersen
e882956ef6
std.leb128: Disable two tests on x86-linux-musl with dynamic linkage.
...
https://github.com/ziglang/zig/issues/23922
2025-05-19 00:22:19 +02:00
Andrew Kelley
b77e601342
Merge pull request #23834 from jacobly0/x86_64-rewrite
...
x86_64: finish rewriting scalar overflow and saturate operations
2025-05-18 14:36:33 -04:00
mlugg
d32829e053
std.Build.Cache: change contract of addFilePostContents
...
This function was broken, because it took ownership of the buffer on
error *sometimes*, in a way which the caller could not tell. Rather than
trying to be clever, it's easier to just follow the same interface as
all other `addFilePost` methods, and not take ownership of the path.
This is a breaking change. The next commits will apply it to the
compiler, which is the only user of this function in the ziglang/zig
repository.
2025-05-18 17:10:04 +01:00
Alex Rønne Petersen
74a3ae4927
start: Don't artificially limit some posixCallMainAndExit() logic to Linux.
...
This code applies to ~any POSIX OS where we don't link libc. For example, it'll
be useful for FreeBSD and NetBSD.
As part of this, move std.os.linux.pie to std.pie since there's really nothing
Linux-specific about what that file is doing.
2025-05-18 17:14:09 +02:00
Jacob Young
a3b0c242b0
x86_64: rewrite @splat
2025-05-17 18:00:17 -04:00
Jacob Young
58d2bd601e
x86_64: rewrite scalar <<|
...
Closes #23035
2025-05-17 18:00:17 -04:00
Jacob Young
4adb7eca6a
debug: correctly detect missing entries in .eh_frame_hdr
2025-05-17 02:08:41 -04:00
Jacob Young
6d68a494c8
x86_64: rewrite vector +|
2025-05-17 02:08:41 -04:00
Alex Rønne Petersen
1a82cceb8c
std.Target: Factor arch/ABI into NetBSD minimum OS version selection.
...
Based on data in std.zig.target.
2025-05-17 04:41:27 +02:00
Alex Rønne Petersen
a090ef007b
std.zig.target: Add NetBSD libc support.
2025-05-17 04:41:27 +02:00
Alex Rønne Petersen
35f8121194
std.zig.LibCDirs: Add NetBSD libc support.
2025-05-17 04:41:27 +02:00
Alex Rønne Petersen
6028db7f29
std.Target: Add isNetBSDLibC() function.
2025-05-17 04:41:27 +02:00
Alex Rønne Petersen
8a7d925d36
std.Target: Fix requiresLibC() for NetBSD.
2025-05-17 04:41:27 +02:00
Alex Rønne Petersen
3d6f83b331
std.Target: Adjust DynamicLinker.standard() for NetBSD.
...
* powerpc64 does not appear to be a thing.
* riscv32/riscv64 have not had actual releases yet.
2025-05-17 04:41:27 +02:00
Alex Rønne Petersen
9af8e7c68e
std.c: Fill out some missing definitions for supported NetBSD libc targets.
...
This allows ubsan-rt to build.
2025-05-17 04:41:26 +02:00
Marc Tiehuis
224e39316f
std.hash.Wyhash: fix dangling stack pointer
...
Closes #23895 .
2025-05-16 15:28:20 +02:00
HydroH
cc1475c91d
std: remove std.crypto.Certificate.Parsed.pubKeySigAlgo method ( #23811 )
2025-05-16 00:21:25 +02:00
wooster0
56fad6a195
make error messages prettier
...
Error messages never contain periods or grave accents.
Get rid of the periods and use apostrophes instead in
probably the only two error messages that had them.
2025-05-15 16:39:15 +01:00
Isaac Freund
bc2f7c7547
Revert "Work around stage1 not yet returning null-terminated @typeInfo strings"
...
This reverts commit c8fa767f08 .
2025-05-14 06:47:23 +02:00
Cezary Kupaj
518105471e
Fix SIGSEGV handler for AArch64 Darwin targets
...
* ucontext_t ptr is 8-byte aligned instead of 16-byte aligned which @alignCast() expects
* Retrieve pc address from ucontext_t since unwind_state is null
* Work around __mcontext_data being written incorrectly by the kernel
2025-05-14 05:38:38 +02:00
Alex Rønne Petersen
5b606d435d
Merge pull request #21882 from alexrp/compiler-fixes
...
compiler: Fix some real and theoretical miscompilations with `allowzero` and `volatile`
2025-05-13 10:42:05 +02:00
wooster0
a365971a33
std.meta.intToEnum -> std.enums.fromInt
...
Also use an optional as the return type instead of an error code.
2025-05-13 07:28:41 +02:00
Alex Rønne Petersen
bc3c50c21e
Merge pull request #23700 from sorairolake/rename-trims
...
chore(std.mem): Rename `trimLeft` and `trimRight` to `trimStart` and `trimEnd`
2025-05-12 17:11:52 +02:00
Alex Rønne Petersen
9d8adb38a1
std.Build: Make no_builtin a property of Module instead of Step.Compile.
...
This reflects how the compiler actually treats it.
Closes #23424 .
2025-05-12 17:08:22 +02:00
Alex Rønne Petersen
fe5dbc2474
std.Build: Change Step.Compile.no_builtin from bool to ?bool.
...
To be in line with other, similar options.
2025-05-12 17:07:50 +02:00
Alex Rønne Petersen
8285de62d5
Merge pull request #23745 from alexrp/target-os-versions
...
`std.Target`: Update supported OS version ranges
2025-05-12 16:59:46 +02:00
Alex Rønne Petersen
833d4c9ce4
Merge pull request #23835 from alexrp/freebsd-libc
...
Support dynamically-linked FreeBSD libc when cross-compiling
2025-05-12 01:19:23 +02:00
Alex Rønne Petersen
c3906718b3
Merge pull request #23810 from alexrp/more-test-targets
2025-05-11 20:52:47 +02:00
Alex Rønne Petersen
837e0f9c37
std.Target: Remove ObjectFormat.nvptx (and associated linker code).
...
Textual PTX is just assembly language like any other. And if we do ever add
support for emitting PTX object files after reverse engineering the bytecode
format, we'd be emitting ELF files like the CUDA toolchain. So there's really no
need for a special ObjectFormat tag here, nor linker code that treats it as a
distinct format.
2025-05-10 12:21:57 +02:00
Alex Rønne Petersen
0e3609b8e0
std.Target: Factor arch/ABI into FreeBSD minimum OS version selection.
...
Based on data in std.zig.target.
2025-05-10 12:19:26 +02:00
Alex Rønne Petersen
eeaa1b17c6
std.zig.target: Add FreeBSD libc support.
2025-05-10 12:19:26 +02:00
Alex Rønne Petersen
01390cc533
std.zig.LibCDirs: Add FreeBSD libc support.
2025-05-10 12:19:26 +02:00
Alex Rønne Petersen
309ff9c34e
std.Target: Add isFreeBSDLibC() function.
2025-05-10 12:19:26 +02:00
Alex Rønne Petersen
46042170cb
std.Target: Fix requiresLibC() for FreeBSD.
2025-05-10 12:19:26 +02:00
Michael Pfaff
49c7318056
Fix implementation of std.os.linux.accept on x86
2025-05-10 02:24:33 +02:00
Pat Tullmann
6eb5e56306
std.posix: Add sigrtmin() and sigrtmax()
...
For C code the macros SIGRTMIN and SIGRTMAX provide these values. In
practice what looks like a constant is actually provided by a libc call.
So the Zig implementations are explicitly function calls.
glibc (and Musl) export a run-time minimum "real-time" signal number,
based on how many signals are reserved for internal implementation details
(generally threading). In practice, on Linux, sigrtmin() is 35 on glibc
with the older LinuxThread and 34 with the newer NPTL-based
implementation. Musl always returns 35. The maximum "real-time" signal
number is NSIG - 1 (64 on most Linux kernels, but 128 on MIPS).
When not linking a C Library, Zig can report the full range of "rt"
signals (none are reserved by Zig).
Fixes #21189
2025-05-09 15:10:25 +02:00
Alex Rønne Petersen
23cb2b2662
std.Target: Handle {powerpc64,riscv32}-netbsd in DynamicLinker.standard().
2025-05-09 14:07:40 +02:00
Meghan Denny
a5cfa3db3a
std.os: handle ENOENT for fnctl on macos
2025-05-09 11:20:42 +02:00
HydroH
32bf1fbf46
std: fix error.Unexpected on certain Windows file operations
...
Closes #23690 .
2025-05-09 08:57:00 +02:00
Alex Rønne Petersen
c272ddc070
std: Disable os.linux.test.test.fallocate on MIPS N32.
...
https://github.com/ziglang/zig/issues/23809
2025-05-08 21:32:22 +02:00
Alex Rønne Petersen
2261d13759
std: Disable posix.test.test.fchmodat smoke test on MIPS N32.
...
https://github.com/ziglang/zig/issues/23808
2025-05-08 21:32:22 +02:00
Alex Rønne Petersen
dd1de18f96
std: Disable hash.xxhash.test.xxhash3 on MIPS N32.
...
https://github.com/ziglang/zig/issues/23807
2025-05-08 21:32:22 +02:00
Alex Rønne Petersen
d381645c73
std: Disable fs.test.test.setEndPos on MIPS N32.
...
https://github.com/ziglang/zig/issues/23806
2025-05-08 21:32:22 +02:00
Alex Rønne Petersen
d3e8541268
std.Target: Prune dead targets in Abi.default() and DynamicLinker.standard().
2025-05-08 21:32:20 +02:00
Seiichi Uchida
bbc21393b4
Add register_file_alloc_range
2025-05-06 18:01:07 +02:00
Alex Rønne Petersen
35f30558ad
std.Build: Rename --glibc-runtimes to --libc-runtimes and enable it for musl.
2025-05-06 01:52:47 +02:00
HydroH
a14352b0b2
std: fix compile errors in std.crypto.ecc ( #23797 )
...
Implemented `neg()` method for `AffineCoordinates` struct of p256,
p384 and secp256k1 curves.
Resolves : #20505 (partially)
2025-05-05 18:50:25 +00:00
David Rubin
369177f0ba
crypto: add sub function to Ristretto255 ( #23724 )
2025-05-05 15:30:59 +02:00