authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-04-26 14:09:16+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-04-26 22:12:31+02:00
log23440fbb99a501fac9cfb6af85c6303732cf0b06
treeb40e74c5ae8790d423af27c526a2768665b8e75c
parent99a79f98ecfe79fc3d043662448f1a6b44d52c5c

std.Target: Remove Abi.gnuilp32.

* This has not seen meaningful development for about a decade. * The Linux kernel port was never upstreamed. * The glibc port was never upstreamed. * GCC 15.1 recently deprecated support it. It may still make sense to support an ILP32 ABI on AArch64 more broadly (which we already have the Abi.ilp32 tag for), but, to the extent that it even existed in any "official" sense, the *GNU* ILP32 ABI is certainly dead.

4 files changed, 7 insertions(+), 26 deletions(-)

lib/compiler/aro/aro/target.zig-1
...@@ -687,7 +687,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {...@@ -687,7 +687,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
687 .gnuf32 => "gnuf32",687 .gnuf32 => "gnuf32",
688 .gnusf => "gnusf",688 .gnusf => "gnusf",
689 .gnux32 => "gnux32",689 .gnux32 => "gnux32",
690 .gnuilp32 => "gnu_ilp32",
691 .code16 => "code16",690 .code16 => "code16",
692 .eabi => "eabi",691 .eabi => "eabi",
693 .eabihf => "eabihf",692 .eabihf => "eabihf",
lib/std/Target.zig+7-23
...@@ -763,7 +763,6 @@ pub const Abi = enum {...@@ -763,7 +763,6 @@ pub const Abi = enum {
763 gnuf32,763 gnuf32,
764 gnusf,764 gnusf,
765 gnux32,765 gnux32,
766 gnuilp32,
767 code16,766 code16,
768 eabi,767 eabi,
769 eabihf,768 eabihf,
...@@ -938,7 +937,6 @@ pub const Abi = enum {...@@ -938,7 +937,6 @@ pub const Abi = enum {
938 .gnuf32,937 .gnuf32,
939 .gnusf,938 .gnusf,
940 .gnux32,939 .gnux32,
941 .gnuilp32,
942 => true,940 => true,
943 else => false,941 else => false,
944 };942 };
...@@ -2205,14 +2203,7 @@ pub const DynamicLinker = struct {...@@ -2205,14 +2203,7 @@ pub const DynamicLinker = struct {
2205 .hurd => switch (cpu.arch) {2203 .hurd => switch (cpu.arch) {
2206 .aarch64,2204 .aarch64,
2207 .aarch64_be,2205 .aarch64_be,
2208 => |arch| initFmt("/lib/ld-{s}{s}.so.1", .{2206 => |arch| if (abi == .gnu) initFmt("/lib/ld-{s}.so.1", .{@tagName(arch)}) else none,
2209 @tagName(arch),
2210 switch (abi) {
2211 .gnu => "",
2212 .gnuilp32 => "_ilp32",
2213 else => return none,
2214 },
2215 }),
22162207
2217 .x86 => if (abi == .gnu) init("/lib/ld.so.1") else none,2208 .x86 => if (abi == .gnu) init("/lib/ld.so.1") else none,
2218 .x86_64 => initFmt("/lib/ld-{s}.so.1", .{switch (abi) {2209 .x86_64 => initFmt("/lib/ld-{s}.so.1", .{switch (abi) {
...@@ -2344,14 +2335,7 @@ pub const DynamicLinker = struct {...@@ -2344,14 +2335,7 @@ pub const DynamicLinker = struct {
23442335
2345 .aarch64,2336 .aarch64,
2346 .aarch64_be,2337 .aarch64_be,
2347 => |arch| initFmt("/lib/ld-linux-{s}{s}.so.1", .{2338 => |arch| if (abi == .gnu) initFmt("/lib/ld-linux-{s}.so.1", .{@tagName(arch)}) else none,
2348 @tagName(arch),
2349 switch (abi) {
2350 .gnu => "",
2351 .gnuilp32 => "_ilp32",
2352 else => return none,
2353 },
2354 }),
23552339
2356 // TODO: `-be` architecture support.2340 // TODO: `-be` architecture support.
2357 .csky => initFmt("/lib/ld-linux-cskyv2{s}.so.1", .{switch (abi) {2341 .csky => initFmt("/lib/ld-linux-cskyv2{s}.so.1", .{switch (abi) {
...@@ -2585,7 +2569,7 @@ pub fn standardDynamicLinkerPath(target: Target) DynamicLinker {...@@ -2585,7 +2569,7 @@ pub fn standardDynamicLinkerPath(target: Target) DynamicLinker {
25852569
2586pub fn ptrBitWidth_cpu_abi(cpu: Cpu, abi: Abi) u16 {2570pub fn ptrBitWidth_cpu_abi(cpu: Cpu, abi: Abi) u16 {
2587 switch (abi) {2571 switch (abi) {
2588 .gnux32, .muslx32, .gnuabin32, .muslabin32, .gnuilp32, .ilp32 => return 32,2572 .gnux32, .muslx32, .gnuabin32, .muslabin32, .ilp32 => return 32,
2589 .gnuabi64, .muslabi64 => return 64,2573 .gnuabi64, .muslabi64 => return 64,
2590 else => {},2574 else => {},
2591 }2575 }
...@@ -2979,7 +2963,7 @@ pub fn cTypeBitSize(target: Target, c_type: CType) u16 {...@@ -2979,7 +2963,7 @@ pub fn cTypeBitSize(target: Target, c_type: CType) u16 {
2979 .long, .ulong => return 32,2963 .long, .ulong => return 32,
2980 .longlong, .ulonglong, .double => return 64,2964 .longlong, .ulonglong, .double => return 64,
2981 .longdouble => switch (target.abi) {2965 .longdouble => switch (target.abi) {
2982 .gnu, .gnuilp32, .ilp32, .cygnus => return 80,2966 .gnu, .ilp32, .cygnus => return 80,
2983 else => return 64,2967 else => return 64,
2984 },2968 },
2985 },2969 },
...@@ -2993,7 +2977,7 @@ pub fn cTypeBitSize(target: Target, c_type: CType) u16 {...@@ -2993,7 +2977,7 @@ pub fn cTypeBitSize(target: Target, c_type: CType) u16 {
2993 },2977 },
2994 .longlong, .ulonglong, .double => return 64,2978 .longlong, .ulonglong, .double => return 64,
2995 .longdouble => switch (target.abi) {2979 .longdouble => switch (target.abi) {
2996 .gnu, .gnuilp32, .ilp32, .cygnus => return 80,2980 .gnu, .ilp32, .cygnus => return 80,
2997 else => return 64,2981 else => return 64,
2998 },2982 },
2999 },2983 },
...@@ -3091,7 +3075,7 @@ pub fn cTypeAlignment(target: Target, c_type: CType) u16 {...@@ -3091,7 +3075,7 @@ pub fn cTypeAlignment(target: Target, c_type: CType) u16 {
3091 .windows, .uefi => switch (c_type) {3075 .windows, .uefi => switch (c_type) {
3092 .longlong, .ulonglong, .double => return 8,3076 .longlong, .ulonglong, .double => return 8,
3093 .longdouble => switch (target.abi) {3077 .longdouble => switch (target.abi) {
3094 .gnu, .gnuilp32, .ilp32, .cygnus => return 4,3078 .gnu, .ilp32, .cygnus => return 4,
3095 else => return 8,3079 else => return 8,
3096 },3080 },
3097 else => {},3081 else => {},
...@@ -3192,7 +3176,7 @@ pub fn cTypePreferredAlignment(target: Target, c_type: CType) u16 {...@@ -3192,7 +3176,7 @@ pub fn cTypePreferredAlignment(target: Target, c_type: CType) u16 {
3192 },3176 },
3193 .windows, .uefi => switch (c_type) {3177 .windows, .uefi => switch (c_type) {
3194 .longdouble => switch (target.abi) {3178 .longdouble => switch (target.abi) {
3195 .gnu, .gnuilp32, .ilp32, .cygnus => return 4,3179 .gnu, .ilp32, .cygnus => return 4,
3196 else => return 8,3180 else => return 8,
3197 },3181 },
3198 else => {},3182 else => {},
lib/std/zig/LibCDirs.zig-1
...@@ -229,7 +229,6 @@ fn libCGenericName(target: std.Target) [:0]const u8 {...@@ -229,7 +229,6 @@ fn libCGenericName(target: std.Target) [:0]const u8 {
229 .gnuf32,229 .gnuf32,
230 .gnusf,230 .gnusf,
231 .gnux32,231 .gnux32,
232 .gnuilp32,
233 => return "glibc",232 => return "glibc",
234 .musl,233 .musl,
235 .muslabin32,234 .muslabin32,
src/codegen/llvm.zig-1
...@@ -259,7 +259,6 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 {...@@ -259,7 +259,6 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 {
259 .gnuf32 => "gnuf32",259 .gnuf32 => "gnuf32",
260 .gnusf => "gnusf",260 .gnusf => "gnusf",
261 .gnux32 => "gnux32",261 .gnux32 => "gnux32",
262 .gnuilp32 => "gnu_ilp32",
263 .code16 => "code16",262 .code16 => "code16",
264 .eabi => "eabi",263 .eabi => "eabi",
265 .eabihf => "eabihf",264 .eabihf => "eabihf",