For functions like sqrt, fabs, and others, use the builtin functions,
which provide single-instruction implementations, rather than using
musl's portable implementations.
My understanding is that these dummy libs represent libraries who's
contents, under musl, live in libc itself rather than being split out
into separate libs.
libc++/libc++abi are not provided my musl so doesn't make sense to
pretend that we provide them.
These functions aren't specific to the underlying system call interface,
so they don't need to be in the "bottom half".
This also fixes src/functional/inet_pton.c and
src/regression/inet_pton-empty-last-field.c in musl's libc-test.
Remove build rules for $(SYSROOT) and $(SYSROOT_INC). The latter
becomes `include_dirs`. The former is not needed, instead just add
startup_files to the finish rule.
Most of the changes are in threads, TLS, dynamic linking, and other
features wasi doesn't yet use, but there are some bug fixes in code
wasi does use.
atanl.c - local changes no longer needed as they've now landed upstream.
include/alltypes.h.in - Upstream now makes FILE a complete type in
pre-C11 mode. For WASI, this level of pre-C11 strictness isn't as
important, and having multiple incompatible definitions of _IO_FILE
that are kept separate only by clever use of translation unit
boundaries can confuse some tools, so stick with the incomplete type.
And clean up various stale declarations and macros that this turned up.
In particular:
- Don't install pthread.h or aio.h in THREAD_MODEL=single mode.
- Don't define mkstemp and friends, since WASI currently has no support for
temporary directories.
Whether these are defined or not depends on the version of clang in use,
and they're not that important at this time, so for now just ignore them
for the purposes of this testing output.
This populates the repo with a very minimal set of files. This is just
enough to set out a basic outline. Hopefully as we move forward we'll
be replacing many of these parts, but this is just something basic to
get things started.
This tree isn't really usable yet, as it doesn't yet have an easy way
to obtain a compiler-rt/libgcc build.