aboutsummaryrefslogtreecommitdiff
path: root/src/glibc.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-11-29 16:51:05 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-11-29 18:05:11 -0700
commit19eaf54bc9ea8229dd0ae9e8e99865aba6fe4398 (patch)
tree4c880f4cef886512213513b170024e51c145e866 /src/glibc.zig
parentec10e63f4945e81cfc5369a2c886ef0b7ae11c1b (diff)
downloadzig-19eaf54bc9ea8229dd0ae9e8e99865aba6fe4398.tar.gz
zig-19eaf54bc9ea8229dd0ae9e8e99865aba6fe4398.zip
update libc linux headers to v5.16-rc3
* 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.
Diffstat (limited to 'src/glibc.zig')
-rw-r--r--src/glibc.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glibc.zig b/src/glibc.zig
index 049db4f870..fd143bac7e 100644
--- a/src/glibc.zig
+++ b/src/glibc.zig
@@ -555,9 +555,10 @@ fn add_include_dirs(comp: *Compilation, arena: *Allocator, args: *std.ArrayList(
try args.append("-I");
try args.append(try lib_path(comp, arena, lib_libc ++ "include" ++ s ++ "generic-glibc"));
+ const arch_name = target_util.osArchName(target);
try args.append("-I");
try args.append(try std.fmt.allocPrint(arena, "{s}" ++ s ++ "libc" ++ s ++ "include" ++ s ++ "{s}-linux-any", .{
- comp.zig_lib_directory.path.?, @tagName(arch),
+ comp.zig_lib_directory.path.?, arch_name,
}));
try args.append("-I");