30902 Commits

Author SHA1 Message Date
Alex Rønne Petersen
4b4fce3e89
glibc: Set asm and include paths for arc. 2024-09-05 06:16:26 +02:00
Alex Rønne Petersen
747460025e
glibc: Add csky start files. 2024-09-05 06:16:26 +02:00
Alex Rønne Petersen
06945d5eb7
glibc: Add arc start files. 2024-09-05 06:16:26 +02:00
Alex Rønne Petersen
9eb66ab3fb
glibc: Set asm and include paths for m68k. 2024-09-05 06:16:26 +02:00
Alex Rønne Petersen
0bbfa199e9
glibc: Add include path for gnux32. 2024-09-05 06:16:26 +02:00
Alex Rønne Petersen
e492e7232f
glibc: Set asm and include paths for s390x. 2024-09-05 06:16:25 +02:00
Alex Rønne Petersen
c852992c7e
glibc: Also pass -Wno-unsupported-floating-point-opt when building libc_nonshared.a.
Apparently 3fb6e46f6e4231b9569193a15a4357a2ae11fb0f wasn't enough.
2024-09-05 06:16:25 +02:00
Arwalk
f87dd43c12
stdlib : base64 encode to writer (#20961) 2024-09-04 08:10:12 +00:00
Alex Rønne Petersen
e5ee9c1e43 std.elf: Bring the EM enum up to date.
Based on:

* `include/elf/common.h` in binutils
* `include/uapi/linux/elf-em.h` in Linux
* https://www.sco.com/developers/gabi/latest/ch4.eheader.html

I opted to use the tag naming of binutils because it seems to be by far the most
complete and authoritative source at this point in time.
2024-09-03 17:44:01 -07:00
Alex Rønne Petersen
290ccb160e glibc: Avoid building and linking stub libraries that were emptied in 2.34.
Closes #20919.
2024-09-03 17:33:23 -07:00
Michael Dusan
7a4d69983a AstGen: update @errorCast to maybe eval to err
Consequently, `AstGen.ret()` now passes the error code to
`.defer_error_code`. Previously, the error union value was passed.

closes #20371
2024-09-03 22:56:23 +01:00
Andrew Kelley
242d268a06
Merge pull request #21277 from antlilja/llvm-module-flags
LLVM: Set module flags through Builder instead of LLVM API bindings
2024-09-02 17:57:27 -07:00
Alex Rønne Petersen
9bcb0e938c
std.crypto.ml_kem: Reduce test iteration counts from 100 to 10. (#21285)
Closes #21255.
2024-09-02 23:20:48 +00:00
fdfdjfk3
a670f55195
std.fmt.fmtIntSize*: document when precision is ignored 2024-09-02 14:21:59 +03:00
Jeremy Hertel
13da34955c std.hash_map: fix error message in getAutoHashFn 2024-09-02 12:09:10 +03:00
Matthew Lugg
6d2945f1fe
Merge pull request #21264 from mlugg/decl-literals
compiler: implement decl literals
2024-09-02 00:44:11 +01:00
Jeremy Hertel
227fb4875f std.math: rename make_f80 to F80.toFloat and break_f80 to F80.fromFloat 2024-09-02 00:10:22 +03:00
mlugg
0b9fccf508
std: deprecate some incorrect default initializations
In favour of newly-added decls, which can be used via decl literals.
2024-09-01 17:34:07 +01:00
mlugg
6e3e23a941
compiler: implement decl literals
Resolves: #9938
2024-09-01 17:34:07 +01:00
mlugg
9e683f0f35
compiler: provide result type to operand of try
This is mainly useful in conjunction with Decl Literals (#9938).

Resolves: #19777
2024-09-01 17:34:07 +01:00
David Rubin
fbac7afa0f
riscv: implement errunion_payload_ptr_set 2024-09-01 17:34:06 +01:00
WillLillis
28383d4d98 fix(Sema): patch segfault in finishStructInit 2024-09-01 17:31:00 +03:00
antlilja
15b4c01ab1 Rename usesLargePIC to picLevel and return the PIC level 2024-09-01 15:12:49 +02:00
antlilja
76908da3ac LLVM: Set module flag behaviors to match what LLVM and clang does 2024-09-01 14:43:30 +02:00
antlilja
7cb87c14fe LLVM: Remove cpp bindings for setPICLevel, setPIELevel and setCodeModel 2024-09-01 14:21:19 +02:00
antlilja
629bd90e26 LLVM: Emit module flags through Builder instead of LLVM API 2024-09-01 14:10:56 +02:00
Nico Elbers
cad65307b7 std: make debug.dumpStackPointerAddr compile
Very simply add the format specifier to the print statement.
Since debug.print is hard coded I couldn't come up with a reasonalble
way to add a test, and since this function is simple enough I doubt it's
useful.

fixes one part of #21094
2024-09-01 00:45:31 -07:00
Jeremy Hertel
52fc046907 std.c: fix pthread_mutex_t size for x86_64-linux-gnu 2024-09-01 00:44:09 -07:00
Federico Di Pierro
b7a98d0d59 lib: guard definition of strl{cat,cpy} against glibc version when _FORTIFY_SOURCE is enabled.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-09-01 00:34:15 -07:00
Hila Friedman
a76e98e7d5 remove length assertion from mprotect 2024-08-31 20:59:47 -07:00
YANG Xudong
c34cfe486d
loongarch: use medium code model for zig loongarch64 binary (#21153) 2024-08-31 20:59:24 -07:00
Andrew Kelley
96daca7b3b
Merge pull request #21173 from mrjbq7/writeStackTrace
std.debug: remove allocator from std.debug.writeStackTrace()
2024-08-31 20:57:27 -07:00
fn ⌃ ⌥
69e304bd51 std.c.passwd: support macOS and NetBSD 2024-08-31 20:56:27 -07:00
YANG Xudong
67fc44fc6f add qemu-loongarch64 2024-08-31 20:49:24 -07:00
Andrew Kelley
37df6ba86e langref: separate header for faulty default field values 2024-08-30 21:12:17 -07:00
Andrew Kelley
e084c46ed6 fix invisible merge conflict 2024-08-30 14:55:28 -07:00
Alex Rønne Petersen
cb0e6d8aa6 std.os.linux: Fix syscall6() when building for PIC/PIE.
LLVM would run out of registers due to the edi usage. Just extend what we're
already doing for ebp to edi as well.
2024-08-30 14:48:17 -07:00
Andrew Kelley
e4e91a1314
Merge pull request #21224 from alexrp/mips-gnu-fixes
Fix MIPS PIC level and work around an LLVM bug for `mips(el)-linux-gnueabi(hf)`
2024-08-30 14:47:43 -07:00
Andrew Kelley
5d08b7f054
Merge pull request #21178 from alexrp/glibc-thumb
`std.zig.target`: Remove `thumb*-linux-gnueabi*` target triples.
2024-08-30 14:35:30 -07:00
Andrew Kelley
a4cc43c42b
Merge pull request #21174 from alexrp/win-arm
Change `arm-windows-gnu` to `thumb-windows-gnu`, plus some initial port work
2024-08-30 14:34:53 -07:00
Alex Rønne Petersen
5723fcaac1 llvm: Pass EmitOptions to libzigcpp by pointer.
Passing it by value means that bringup on new architectures is harder for no
real benefit. Passing it by pointer allows to get the compiler running without
needing to figure out the C calling convention details first. This manifested in
practice on LoongArch, for example.
2024-08-30 11:02:12 -07:00
Jakub Konka
aaca4ff74d
Merge pull request #21254 from jacobly0/fix-dwarf
Dwarf: fix issues with emitted debug info
2024-08-30 19:07:36 +02:00
Jacob Young
a1a9d7440c Elf: fix reference from eh_frame_hdr to eh_frame 2024-08-30 09:24:32 -04:00
Jacob Young
7305184203 dwarf: share and use std.dwarf.EH_PE constants 2024-08-30 09:24:32 -04:00
Jacob Young
f0c0f697a6 Dwarf: fix zir inst index comparison not checking the file 2024-08-30 08:21:24 -04:00
Matthew Lugg
d997ddaa10
Merge pull request #21231 from mlugg/field-decl-name-conflict
AstGen: disallow fields and decls from sharing names
2024-08-30 03:06:52 +01:00
mlugg
c3fb30803f
behavior: avoid field/decl name conflicts 2024-08-29 23:43:52 +01:00
mlugg
605f2a0978
cases: update for new error wording, add coverage for field/decl name conflict 2024-08-29 23:43:52 +01:00
mlugg
c62487da76
compiler: avoid field/decl name conflicts
Most of the required renames here are net wins for readaibility, I'd
say. The ones in `arch` are a little more verbose, but I think better. I
didn't bother renaming the non-conflicting functions in
`arch/arm/bits.zig` and `arch/aarch64/bits.zig`, since these backends
are pretty bit-rotted anyway AIUI.
2024-08-29 23:43:52 +01:00
mlugg
ba8d3f69ca
std.pdb: obey naming conventions
These names aren't matching any formal specification; they're mostly
just ripped from LLVM code. Therefore, we should definitely follow Zig
naming conventions here.
2024-08-29 23:43:52 +01:00