aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/include
AgeCommit message (Collapse)Author
2023-09-25macos: vendored libc: combine headers: part 1Michael Dusan
- combine *-macos-* → any-macos-any - SDK headers as a single tree support targeting multiple arch/versions - bump to SDK 14.0 (release candidate)
2023-08-19macos: add <paths.h> header to Zig shipped libcJakub Konka
2023-06-20musl: update headers to v1.2.4Andrew Kelley
2023-06-15update linux kernel headers to 6.3.8Andrew Kelley
2023-06-04macos+libc: add zlib.h,sys/paths.h,netinet/{ip.h,udp.h}Jakub Konka
2023-05-04glibc hacks: also add a few dn_* functionsMotiejus Jakštys
2023-04-13macos: add missing getopt.h headerJakub Konka
2023-04-06Merge pull request #15101 from motiejus/glibc_compatAndrew Kelley
glibc: add backwards compatibility for some symbols
2023-03-31libc: update macOS libc headers to latest SDK 13.3Jakub Konka
2023-03-28glibc: add backwards compatibility for some symbolsMotiejus Jakštys
- `fcntl` was renamed to `fcntl64` in glibc 2.28 (see #9485) - `res_{,n}{search,query,querydomain}` became "their own" symbols since glibc 2.34: they were prefixed with `__` before. This PR makes it possible to use `fcntl` with glibc 2.27 or older and the `res_*` functions with glibc 2.33 or older. These patches will become redundant with universal-headers and can be dropped. But we have to do with what we have now. Closes #9485
2023-03-25libc: update macOS libc headersJakub Konka
2023-01-10Update wasi-libc to a1c7c2c7a4b2813c6f67bd2ef6e0f430d31cebadFrank Denis
Some notable changes: - `ENOENT` is returned instead of `ENOTCAPABLE` when a path has not be pre-opened (https://github.com/WebAssembly/wasi-libc/pull/370) - `fd_readdir()`: some implementations may not set the inode number, so an additional call to `fstatat()` is now done in order to get it when that happens.
2022-11-28Update wasi-libc to a00bf321eeeca836ee2a0d2d25aeb8524107b8cc (#13626)Frank Denis
* Update wasi-libc to a00bf321eeeca836ee2a0d2d25aeb8524107b8cc It includes a port of emscripten's allocator that performs performs much better than the old one. Most importantly, it includes the prerequisites to later add support for POSIX threads.
2022-11-04rename i386-linux-gnu to x86-linux-gnuVeikka Tuominen
2022-10-25darwin: update macOS libc headersJakub Konka
Add aarch64-macos.13 and x86_64-macos.13 libc headers, and remove x86_64-macos.10 headers.
2022-10-11update mingw-w64 headers to v10.0.0Andrew Kelley
2022-07-04update macOS libc headersAndrew Kelley
notably this adds copyfile.h fetch-them-macos-headers rev 900567517197df46e98006c53023fa10cb986004
2022-05-22Set macOS/iPhoneOS/tvOS/watchOS ABI to none (unspecified) by defaultJakub Konka
Prior to this change we would assume the ABI for Apple targets to be GNU which could result in subtle errors in LLVM emitting calls to non-existent system libc provided functions such as `_sincosf` which is a GNU extension and as such is not provided by macOS for example. This would result in linker errors where the linker would not be able to find the said symbol in `libSystem.tbd`. With this change, we now correctly identify macOS (and other Apple platforms) as having ABI `unknown` which translates to unspecified in LLVM under-the-hood: ``` // main.ll target triple = "aarch64-unknown-macos-unknown" ``` Note however that we never suffix the target OS with target version such as `macos11` or `macos12` which means we fail to instruct LLVM of potential optimisations provided by the OS such as the availability of function `___sincosf_stret`. I suggest we investigate that in a follow-up commit.
2022-05-04musl: update to 1.2.3Isaac Freund
This was a bit trickier than it should be due to symbol conflicts with zig's compiler-rt implementation. We attempt to use weak linkage in our compiler-rt, but this does not seem to be working in all cases. I manually disabled export of the problematic compiler-rt math functions in order to cross compile musl's libc.so for all targets as input to `tools/gen_stubs.zig`. Other than that, this update went fairly smoothly. Quite a few additional symbols were added to the blacklist in `tools/gen_stubs.zig` due to recent reorganization of zig's compiler-rt.
2022-01-28glibc: version-gate _DYNAMIC_STACK_SIZE_SOURCEAndrew Kelley
This is a patch to glibc features.h which makes _DYNAMIC_STACK_SIZE_SOURCE undefined unless the version is >= 2.34. This feature was introduced with glibc 2.34 and without this patch, code built against these headers but then run on an older glibc will end up making a call to sysconf() that returns -1 for the value of SIGSTKSZ and MINSIGSTKSZ. Closes #10713
2022-01-26[linux headers] rename arm64 to aarch64Motiejus Jakštys
Zig calls it aarch64. Linux calls it arm64. Currently lib/libc/include has both arm64 and aarch64, which is quite confusing. tools/update-linux-headers.zig was executed against the latest stable linux patch version, therefore some other minor header updates. I will update the wiki on how to do it once this PR is accepted.
2022-01-19glibc: fix passing of __GNU_MINOR__Daniel Saier
This was originally introduced in 4d48948b526337947ef59a83f7dbc81b70aa5723 but broken immediately afterwards in c8af00c66e8b6f62e4dd6ac4d86a3de03e9ea354.
2021-12-16glibc: fix inconsistency of powerpc ABI mappingAndrew Kelley
See the commit message of 5b6d26e97bb97d79782f3c77b02a997e361a1497 for an explanation. This is the same thing but for powerpc instead of mips.
2021-12-15glibc: fix inconsistency of mips ABI mappingAndrew Kelley
Before this commit, glibc headers did the following mapping: * (zig) mipsel-linux-gnu => (glibc) mipsel-linux-gnu * (zig) mipsel-linux-gnu-soft => (glibc) (none) * (zig) mips-linux-gnu => (glibc) mips-linux-gnu * (zig) mips-linux-gnu-soft => (glibc) (none) While the glibc ABI stubs used the (zig) gnueabi and gnueabihf ABIs, and the stage2 available_libcs array listed: * (zig) mipsel-linux-gnu * (zig) mips-linux-gnu The problem is the mismatch between the ABI component of the headers and the stubs. This commit makes the following clarifications: * (zig) mips-linux-gnueabi means soft-float * (zig) mipsel-linux-gnueabi means soft-float * (zig) mips-linux-gnueabihf means hard-float * (zig) mipsel-linux-gnueabihf means hard-float Consequently, the glibc headers now do this mapping: * (zig) mips-linux-gnueabihf => (glibc) mips-linux-gnu * (zig) mipsel-linux-gnueabihf => (glibc) mipsel-linux-gnu * (zig) mips-linux-gnueabi => (glibc) mips-linux-gnu-soft * (zig) mipsel-linux-gnueabi => (glibc) mipsel-linux-gnu-soft The glibc ABI stubs are unchanged, and the stage2 available_libcs array's 2 entries are modified and it gains 2 more: * (zig) mipsel-linux-gnueabi * (zig) mipsel-linux-gnueabihf * (zig) mips-linux-gnueabi * (zig) mips-linux-gnueabihf Now everything is consistent. Zig no longer recognizes a `mips-linux-gnu` triple; one must use `mips-linux-gnueabi` (soft float) or `mips-linux-gnueabihf` (hard float).
2021-12-15glibc: add missing riscv stubs headersAndrew Kelley
2021-12-15glibc: pass -D__GLIBC_MINOR__=XXAndrew Kelley
instead of hard-coding it. This means that C code has accurate glibc version information in the preprocessor.
2021-12-15update glibc headers to 2.34Andrew Kelley
closes #10308
2021-11-30remove linux header files that have case conflictsAndrew Kelley
similar commit from the past: c73cd05468fba4bba5762a654aacdd9d90ecd272 This also modifies tools/update-linux-headers.zig to remove these same files for next time to prevent a regression. closes #10249
2021-11-29update libc linux headers to v5.16-rc3Andrew Kelley
* Add missing Linux headers. Closes #9837 * Update existing headers to latest Linux. * Consolidate headers that are the same for multiple Zig target CPU architectures. For example, Linux has only an x86 directory for both x86_64 and x86 CPU architectures. Now Zig only ships an x86 directory for Linux headers, and will emit the proper corresponding -isystem flags. * tools/update-linux-headers.zig is now available for upgrading to newer Linux headers, and the update process is now documented on the wiki.
2021-11-27Add missing macOS libc headersJakub Konka
* mach/thread_state.h * mach/vm_param.h * objc/objc-runtime.h
2021-11-25add libc headers for all supported macOS versionsJakub Konka
`fetch-them-macos-headers` gitrev 7036517cc6a9aa154e7aef4c4593b5c4a5143ed4
2021-08-16add m68k glibc (2.33) headersAndrew Kelley
2021-08-16add m68k musl (1.2.2) headersAndrew Kelley
This commit also corrects a mistake from commit 6dc2236054dfcf911ce848f67a4078740a90783a which did not properly delete files when upgrading to the 1.2.2 musl headers.
2021-08-05Update x86_64-macos headersJakub Konka
2021-06-08libc,macos: update and add missing libc headersJakub Konka
2021-06-04update mingw-w64 headers to v9.0.0Andrew Kelley
2021-05-20wasi,cc: fix naming and add stubs for buildingJakub Konka
Rename include dir to match the convention: from `wasm32-wasi` to `wasm-wasi-musl` Add building stubs which will be used to build and cache WASI libc sysroot.
2021-05-20cc,wasi: add wasi libc headersJakub Konka
2021-04-04glibc: update headers to 2.33Andrew Kelley
This introduces csky support.
2021-03-12macos: add missing x86_64 libc headersJakub Konka
2021-03-09update to latest fetch-them-macos-headersLoris Cro
2021-03-09update to latest fetch-them-macos-headersLoris Cro
2021-02-10musl: update to 1.2.2Isaac Freund
2021-01-02Duplicate OSAtomic.h between aarch64 and x86_64Jakub Konka
The reason this is required is for two reasons: 1) the libc targeting `aarch64` macOS is slightly newer than that targeting `x86_64`, and 2) `OSAtomic.h` uses relative imports rather than system-wide imports for accompanying headers which clearly is an oversight on Apple's part. Until such time when `libkern` headers between `x86_64` and `aarch64` are identical, this will require a manual intervention to duplicate the relevant headers between the respective architectures.
2020-12-17macho: deduplicate libc headers between macos archJakub Konka
2020-12-17macos: add unfiltered aarch64 libc headersJakub Konka
2020-11-30update to latest fetch-them-macos-headersAndrew Kelley
commit 1efc3a7f584dd75a5783756e168af74cdf6bb727
2020-11-30restore -target wasm32-freestanding-musl for C headersAndrew Kelley
See #5854 Some tiny tweaks too: * Use `wasm-freestanding-musl` instead of `wasm32-freestanding-musl`, making it pointer-size-agnostic. * Fix trying to build non-existent wasm musl start files.
2020-11-30update to latest fetch-them-macos-headersAndrew Kelley
commit 09b70199e738bfa86c55cd3a848287229a207982 closes #7261
2020-11-29macOS headers: add memory.hAndrew Kelley
it's provided by macOS LibC and apparently there is code in the wild that depends on it. all it does is #include <string.h> closes #7249