update musl headers to musl v1.1.23

This commit is contained in:
Andrew Kelley
2019-07-16 19:02:51 -04:00
parent b1f8b53d20
commit f70ce707e2
353 changed files with 1106 additions and 140426 deletions

View File

@@ -8267,10 +8267,39 @@ static void detect_libc(CodeGen *g) {
if (target_can_build_libc(g->zig_target)) {
const char *generic_name = target_libc_generic_name(g->zig_target);
const char *arch_name = target_arch_name(g->zig_target->arch);
const char *abi_name = target_abi_name(g->zig_target->abi);
if (target_is_musl(g->zig_target)) {
// musl has some overrides. its headers are ABI-agnostic and so they all have the "musl" ABI name.
abi_name = "musl";
// some architectures are handled by the same set of headers
switch (g->zig_target->arch) {
case ZigLLVM_aarch64:
case ZigLLVM_aarch64_be:
arch_name = "aarch64";
break;
case ZigLLVM_arm:
case ZigLLVM_armeb:
arch_name = "arm";
break;
case ZigLLVM_mips:
case ZigLLVM_mipsel:
arch_name = "mips";
break;
case ZigLLVM_mips64:
case ZigLLVM_mips64el:
arch_name = "mips64";
break;
case ZigLLVM_ppc64:
case ZigLLVM_ppc64le:
arch_name = "powerpc64";
break;
default:
break;
}
}
Buf *arch_include_dir = buf_sprintf("%s" OS_SEP "libc" OS_SEP "include" OS_SEP "%s-%s-%s",
buf_ptr(g->zig_lib_dir), target_arch_name(g->zig_target->arch),
target_os_name(g->zig_target->os), target_abi_name(g->zig_target->abi));
buf_ptr(g->zig_lib_dir), arch_name, target_os_name(g->zig_target->os), abi_name);
Buf *generic_include_dir = buf_sprintf("%s" OS_SEP "libc" OS_SEP "include" OS_SEP "generic-%s",
buf_ptr(g->zig_lib_dir), generic_name);
Buf *arch_os_include_dir = buf_sprintf("%s" OS_SEP "libc" OS_SEP "include" OS_SEP "%s-%s-any",