From 19eaf54bc9ea8229dd0ae9e8e99865aba6fe4398 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 29 Nov 2021 16:51:05 -0700 Subject: 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. --- src/Compilation.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Compilation.zig') diff --git a/src/Compilation.zig b/src/Compilation.zig index 80d0142996..2d33fe83b6 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -3886,10 +3886,11 @@ fn detectLibCIncludeDirs( "{s}" ++ s ++ "libc" ++ s ++ "include" ++ s ++ "generic-{s}", .{ zig_lib_dir, generic_name }, ); + const generic_arch_name = target_util.osArchName(target); const arch_os_include_dir = try std.fmt.allocPrint( arena, "{s}" ++ s ++ "libc" ++ s ++ "include" ++ s ++ "{s}-{s}-any", - .{ zig_lib_dir, @tagName(target.cpu.arch), os_name }, + .{ zig_lib_dir, generic_arch_name, os_name }, ); const generic_os_include_dir = try std.fmt.allocPrint( arena, -- cgit v1.2.3