From 62a01851d9c433ea3f2e98cc986e75d32aece443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Tue, 30 Jul 2024 04:36:43 +0200 Subject: [PATCH] glibc: Add a temporary hack in abilists loading due to sparcel removal. Revert this commit on the next glibc abilists update. --- src/glibc.zig | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/glibc.zig b/src/glibc.zig index 5214d0a977..85f1828ad4 100644 --- a/src/glibc.zig +++ b/src/glibc.zig @@ -122,6 +122,17 @@ pub fn loadMetaData(gpa: Allocator, contents: []const u8) LoadMetaDataError!*ABI return error.ZigInstallationCorrupt; }; const arch_tag = std.meta.stringToEnum(std.Target.Cpu.Arch, arch_name) orelse { + // TODO: Remove this on the next glibc abilists update. + if (mem.eql(u8, arch_name, "sparcel")) { + targets[i] = .{ + .arch = .sparc, + .os = .linux, + .abi = .gnu, + }; + + continue; + } + log.err("abilists: unrecognized arch: '{s}'", .{arch_name}); return error.ZigInstallationCorrupt; };