Commit Graph

37 Commits

Author SHA1 Message Date
Jakub Konka
763d807377 Duplicate OSAtomic.h between aarch64 and x86_64
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.
2021-01-02 15:30:14 +01:00
Jakub Konka
3e9e79378d macho: deduplicate libc headers between macos arch 2020-12-17 10:04:53 +01:00
Jakub Konka
3971522fee macos: add unfiltered aarch64 libc headers 2020-12-17 10:04:53 +01:00
Andrew Kelley
02e12ede46 update to latest fetch-them-macos-headers
commit 1efc3a7f584dd75a5783756e168af74cdf6bb727
2020-11-30 20:20:31 -08:00
Andrew Kelley
21565ca991 restore -target wasm32-freestanding-musl for C headers
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-30 20:44:36 -07:00
Andrew Kelley
51d7c14ce1 update to latest fetch-them-macos-headers
commit 09b70199e738bfa86c55cd3a848287229a207982

closes #7261
2020-11-30 13:18:34 -08:00
Andrew Kelley
4808a0261f macOS headers: add memory.h
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
2020-11-29 17:41:16 -08:00
Andrew Kelley
2eee0582f8 macOS libc headers: downgrade to 10.15.7 (Catalina)
See ziglang/fetch-them-macos-headers#2 for more details. The path
forward looks like one of the following:

 * Ony provide headers for the oldest supported macOS (currently 10.13
   but soon to be bumped to 10.14).
 * Provide headers for multiple versions, and select based on the Zig
   target OS version range minimum.
 * Don't try to provide macOS headers.

If we don't tackle the version problem, we would have to re-introduce
the ability to detect and depend on native system headers if we wanted
to support C/C++ code that used newer OS definitions.

This patch also adds support for `#include <mach/mach_time.h>`.

Also related: #5236
2020-11-17 11:40:24 -08:00
Jakub Konka
db2ac8ae49 macOS libc headers: add objc/message.h and runtime.h 2020-11-09 19:57:07 +01:00
Jakub Konka
09cc61bfe4 Add more missing libc headers used by frameworks
See
76f22c3905.
2020-11-09 18:47:09 +01:00
Jakub Konka
267116d626 macOS libc headers: add mach/clock.h
LLVM depends on it.
2020-11-09 15:02:03 +01:00
Andrew Kelley
b0cbd0ad2d macos libc headers: add more
these new files are generated by recursively including:

sysexits.h
mach/mach.h
sys/attr.h
sys/mount.h
crt_externs.h
execinfo.h

all of which are depended on by LLVM libraries.
2020-11-08 21:12:18 -08:00
Andrew Kelley
cd221b9df9 macOS libc headers: add sys/sysctl.h
libcxx depends on it
2020-11-08 20:26:33 -08:00
Andrew Kelley
16b7be34a1 macOS libc headers: add sys/param.h
libcxx depends on it
2020-11-08 20:21:29 -08:00
Andrew Kelley
1213e26ba8 macOS libc headers: add mach-o/dyld.h
libcxx depends on it
2020-11-08 20:21:29 -08:00
Andrew Kelley
25e78bd007 add copyfile.h
libcxx depends on it
2020-11-08 20:21:29 -08:00
Andrew Kelley
fdd775b3bf macOS libc headers: add xlocale.h and Block.h
These are both included by libcxx.
2020-11-08 20:21:29 -08:00
Andrew Kelley
eed5814d75 macOS libc headers: add POSIX headers 2020-11-08 20:21:29 -08:00
Andrew Kelley
dba94f453a update musl headers to 1.2.1 2020-11-06 13:53:47 -07:00
Alexandros Naskos
3e1639c53b
Fixed mingw-w64 8.0.0 compilation
Reaplied mingw-w64 header patch
2020-11-05 20:04:25 +02:00
Alexandros Naskos
708962d51e
Updated mingw-w64 to version 8.0.0 2020-11-05 18:59:36 +02:00
Andrew Kelley
11a9eff36e add another copyright notice to macos stdint.h 2020-10-21 19:58:47 -07:00
Jakub Konka
7d0acacfc3 Add minimal set of macOS libc headers
Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>
2020-10-21 19:45:21 -07:00
Andrew Kelley
dd8cc6b0f1 update glibc headers to 2.32 2020-08-30 21:27:30 -07:00
Andrew Kelley
fd9f509d6d Revert "Merge pull request #6137 from Jan200101/update/glibc-2.32"
This reverts commit bb9c3118ed, reversing
changes made to 7015d84e0c.

This is missing quite a few headers
2020-08-24 15:19:34 -07:00
Jan200101
c61ea4cdb7
update glibc headers to 2.32 2020-08-22 22:42:58 +02:00
Andrew Kelley
205c413962
update musl headers to v1.2.0 2020-03-12 16:26:14 -04:00
Andrew Kelley
20ac253859
reapply mingw-w64 header patches
Fix compilation w/ clang
f83bb3dd9e
2020-03-05 15:41:28 -05:00
Andrew Kelley
8e5913cfee
update mingw-w64 headers to v7.0.0 2020-03-05 15:41:28 -05:00
Andrew Kelley
67480cd515
update glibc headers to 2.31 2020-03-03 22:46:57 -05:00
Andrew Kelley
1135c9523b
update musl headers to v1.1.24 2019-10-17 11:47:57 -04:00
LemonBoy
f83bb3dd9e Fix compilation w/ clang
Clang pretends to be gcc 4.4 and that causes some re-definition errors.
The problem has been reported to the upstream some time ago but nothing
was done about it.
2019-10-09 22:44:35 +02:00
Andrew Kelley
c161ce3f7c
mingw-w64 libc: fix incorrect detection of _xgetbv
It was using __GNUC__ < 8 to check if _xgetbv intrinsic is available.
Since we always use zig cc with this header, we know we have clang 9,
which does have this intrinsic.
2019-09-22 19:10:27 -04:00
Andrew Kelley
45ab9d5fd6
update glibc headers to 2.30 2019-09-07 14:59:38 -04:00
Andrew Kelley
fed5c12d9a
musl: fix alltypes.h and syscall.h not being correct
The previous
[instructions](https://github.com/ziglang/zig/wiki/Updating-libc) for
updating musl libc headers had this (repeated for each architecture):

make DESTDIR=build-all/arm install-headers ARCH=arm

However musl's build system does not properly rebuild alltypes.h and
syscall.h from source, instead using whatever is cached from the
previous build. In the case of the previous time that I updated to musl
1.1.23, this happened to be the aarch64 architecture.

As a workaround, one can remove the obj/ directory to force rebuilding
this file. Now the instructions say this (repeated for each architecture):

rm -rf obj/ && make DESTDIR=build-all/arm install-headers ARCH=arm

This commit updates the resulting headers after this workaround is
applied and the process headers tool is run again.
2019-08-30 15:02:23 -04:00
Andrew Kelley
f70ce707e2
update musl headers to musl v1.1.23 2019-07-16 19:02:51 -04:00
Andrew Kelley
49d1a4c562 move lib dirs to lib subdir
also start prefering NtDll API. so far:
 * NtQueryInformationFile
 * NtClose

adds a performance workaround for windows unicode conversion. but that
should probably be removed before merging
2019-07-15 17:54:50 -04:00