diff --git a/lib/compiler/aro/aro/target.zig b/lib/compiler/aro/aro/target.zig index 62f9ffad1a57..e6dc776e3085 100644 --- a/lib/compiler/aro/aro/target.zig +++ b/lib/compiler/aro/aro/target.zig @@ -39,7 +39,6 @@ pub fn intMaxType(target: std.Target) Type { pub fn intPtrType(target: std.Target) Type { switch (target.os.tag) { .haiku => return .{ .specifier = .long }, - .nacl => return .{ .specifier = .int }, else => {}, } @@ -467,7 +466,6 @@ pub fn get32BitArchVariant(target: std.Target) ?std.Target { .csky, .hexagon, .m68k, - .le32, .mips, .mipsel, .powerpc, @@ -500,7 +498,6 @@ pub fn get32BitArchVariant(target: std.Target) ?std.Target { .aarch64 => copy.cpu.arch = .arm, .aarch64_be => copy.cpu.arch = .armeb, - .le64 => copy.cpu.arch = .le32, .amdil64 => copy.cpu.arch = .amdil, .nvptx64 => copy.cpu.arch = .nvptx, .wasm64 => copy.cpu.arch = .wasm32, @@ -547,7 +544,6 @@ pub fn get64BitArchVariant(target: std.Target) ?std.Target { .amdgcn, .bpfeb, .bpfel, - .le64, .amdil64, .nvptx64, .wasm64, @@ -572,7 +568,6 @@ pub fn get64BitArchVariant(target: std.Target) ?std.Target { .arm => copy.cpu.arch = .aarch64, .armeb => copy.cpu.arch = .aarch64_be, .hsail => copy.cpu.arch = .hsail64, - .le32 => copy.cpu.arch = .le64, .loongarch32 => copy.cpu.arch = .loongarch64, .mips => copy.cpu.arch = .mips64, .mipsel => copy.cpu.arch = .mips64el, @@ -643,8 +638,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 { .xtensa => "xtensa", .nvptx => "nvptx", .nvptx64 => "nvptx64", - .le32 => "le32", - .le64 => "le64", .amdil => "amdil", .amdil64 => "amdil64", .hsail => "hsail", @@ -674,7 +667,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 { .dragonfly => "dragonfly", .freebsd => "freebsd", .fuchsia => "fuchsia", - .kfreebsd => "kfreebsd", .linux => "linux", .lv2 => "lv2", .netbsd => "netbsd", @@ -686,7 +678,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 { .haiku => "haiku", .minix => "minix", .rtems => "rtems", - .nacl => "nacl", .aix => "aix", .cuda => "cuda", .nvcl => "nvcl", @@ -737,7 +728,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 { .gnueabi => "gnueabi", .gnueabihf => "gnueabihf", .gnuf32 => "gnuf32", - .gnuf64 => "gnuf64", .gnusf => "gnusf", .gnux32 => "gnux32", .gnuilp32 => "gnuilp32", @@ -752,7 +742,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 { .msvc => "msvc", .itanium => "itanium", .cygnus => "cygnus", - .coreclr => "coreclr", .simulator => "simulator", .macabi => "macabi", .pixel => "pixel", diff --git a/lib/std/Target.zig b/lib/std/Target.zig index 894b140f47da..d78ceb3f1208 100644 --- a/lib/std/Target.zig +++ b/lib/std/Target.zig @@ -23,7 +23,6 @@ pub const Os = struct { freebsd, fuchsia, ios, - kfreebsd, linux, lv2, macos, @@ -36,7 +35,6 @@ pub const Os = struct { haiku, minix, rtems, - nacl, aix, cuda, nvcl, @@ -74,7 +72,7 @@ pub const Os = struct { pub inline fn isBSD(tag: Tag) bool { return tag.isDarwin() or switch (tag) { - .kfreebsd, .freebsd, .openbsd, .netbsd, .dragonfly => true, + .freebsd, .openbsd, .netbsd, .dragonfly => true, else => false, }; } @@ -140,13 +138,11 @@ pub const Os = struct { .ananas, .cloudabi, .fuchsia, - .kfreebsd, .lv2, .zos, .haiku, .minix, .rtems, - .nacl, .aix, .cuda, .nvcl, @@ -374,13 +370,11 @@ pub const Os = struct { .ananas, .cloudabi, .fuchsia, - .kfreebsd, .lv2, .zos, .haiku, .minix, .rtems, - .nacl, .aix, .cuda, .nvcl, @@ -563,12 +557,10 @@ pub const Os = struct { .ananas, .cloudabi, .fuchsia, - .kfreebsd, .lv2, .zos, .minix, .rtems, - .nacl, .aix, .cuda, .nvcl, @@ -628,7 +620,6 @@ pub const Abi = enum { gnueabi, gnueabihf, gnuf32, - gnuf64, gnusf, gnux32, gnuilp32, @@ -643,7 +634,6 @@ pub const Abi = enum { msvc, itanium, cygnus, - coreclr, simulator, macabi, pixel, @@ -673,7 +663,6 @@ pub const Abi = enum { .zos, .minix, .rtems, - .nacl, .aix, .cuda, .nvcl, @@ -690,7 +679,6 @@ pub const Abi = enum { .openbsd, .freebsd, .fuchsia, - .kfreebsd, .netbsd, .hurd, .haiku, @@ -1024,8 +1012,6 @@ pub const Cpu = struct { xtensa, nvptx, nvptx64, - le32, - le64, amdil, amdil64, hsail, @@ -1159,7 +1145,6 @@ pub const Cpu = struct { .hexagon => .HEXAGON, .dxil => .NONE, .m68k => .@"68K", - .le32 => .NONE, .mips => .MIPS, .mipsel => .MIPS_RS3_LE, .powerpc, .powerpcle => .PPC, @@ -1193,7 +1178,6 @@ pub const Cpu = struct { .riscv64 => .RISCV, .x86_64 => .X86_64, .nvptx64 => .NONE, - .le64 => .NONE, .amdil64 => .NONE, .hsail64 => .NONE, .spir64 => .NONE, @@ -1225,7 +1209,6 @@ pub const Cpu = struct { .dxil => .Unknown, .hexagon => .Unknown, .m68k => .Unknown, - .le32 => .Unknown, .mips => .Unknown, .mipsel => .Unknown, .powerpc, .powerpcle => .POWERPC, @@ -1259,7 +1242,6 @@ pub const Cpu = struct { .riscv64 => .RISCV64, .x86_64 => .X64, .nvptx64 => .Unknown, - .le64 => .Unknown, .amdil64 => .Unknown, .hsail64 => .Unknown, .spir64 => .Unknown, @@ -1297,8 +1279,6 @@ pub const Cpu = struct { .hsail, .hsail64, .kalimba, - .le32, - .le64, .mipsel, .mips64el, .msp430, @@ -1805,8 +1785,6 @@ pub const DynamicLinker = struct { .tce, .tcele, .xcore, - .le32, - .le64, .amdil, .amdil64, .hsail, @@ -1856,12 +1834,10 @@ pub const DynamicLinker = struct { .ananas, .cloudabi, .fuchsia, - .kfreebsd, .lv2, .zos, .minix, .rtems, - .nacl, .aix, .cuda, .nvcl, @@ -1904,7 +1880,6 @@ pub fn ptrBitWidth_cpu_abi(cpu: Cpu, abi: Abi) u16 { .csky, .hexagon, .m68k, - .le32, .mips, .mipsel, .powerpc, @@ -1943,7 +1918,6 @@ pub fn ptrBitWidth_cpu_abi(cpu: Cpu, abi: Abi) u16 { .riscv64, .x86_64, .nvptx64, - .le64, .amdil64, .hsail64, .spir64, @@ -2376,11 +2350,9 @@ pub fn c_type_bit_size(target: Target, c_type: CType) u16 { }, .cloudabi, - .kfreebsd, .lv2, .zos, .rtems, - .nacl, .aix, .elfiamcu, .mesa3d, @@ -2447,7 +2419,6 @@ pub fn c_type_alignment(target: Target, c_type: CType) u16 { .loongarch32, .tce, .tcele, - .le32, .amdil, .hsail, .spir, @@ -2475,7 +2446,6 @@ pub fn c_type_alignment(target: Target, c_type: CType) u16 { .sparcel, .sparc64, .lanai, - .le64, .nvptx, .nvptx64, .r600, @@ -2568,7 +2538,6 @@ pub fn c_type_preferred_alignment(target: Target, c_type: CType) u16 { .loongarch32, .tce, .tcele, - .le32, .amdil, .hsail, .spir, @@ -2603,7 +2572,6 @@ pub fn c_type_preferred_alignment(target: Target, c_type: CType) u16 { .sparcel, .sparc64, .lanai, - .le64, .nvptx, .nvptx64, .r600, diff --git a/lib/std/c.zig b/lib/std/c.zig index cd743911f79a..d2501b735512 100644 --- a/lib/std/c.zig +++ b/lib/std/c.zig @@ -106,7 +106,7 @@ pub const timespec = switch (native_os) { sec: time_t, nsec: c_long, }, - .dragonfly, .freebsd, .kfreebsd, .macos, .ios, .tvos, .watchos, .visionos => extern struct { + .dragonfly, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => extern struct { sec: isize, nsec: isize, }, @@ -126,7 +126,7 @@ pub const dev_t = switch (native_os) { .emscripten => emscripten.dev_t, .wasi => wasi.device_t, .openbsd, .haiku, .solaris, .illumos, .macos, .ios, .tvos, .watchos, .visionos => i32, - .netbsd, .freebsd, .kfreebsd => u64, + .netbsd, .freebsd => u64, else => void, }; @@ -134,7 +134,7 @@ pub const mode_t = switch (native_os) { .linux => linux.mode_t, .emscripten => emscripten.mode_t, .openbsd, .haiku, .netbsd, .solaris, .illumos, .wasi => u32, - .freebsd, .kfreebsd, .macos, .ios, .tvos, .watchos, .visionos => u16, + .freebsd, .macos, .ios, .tvos, .watchos, .visionos => u16, else => u0, }; @@ -142,7 +142,7 @@ pub const nlink_t = switch (native_os) { .linux => linux.nlink_t, .emscripten => emscripten.nlink_t, .wasi => c_ulonglong, - .freebsd, .kfreebsd => u64, + .freebsd => u64, .openbsd, .netbsd, .solaris, .illumos => u32, .haiku => i32, else => void, @@ -235,7 +235,7 @@ pub const clockid_t = switch (native_os) { /// clock measuring the used CPU time of the current thread THREAD_CPUTIME_ID = -3, }, - .freebsd, .kfreebsd => enum(u32) { + .freebsd => enum(u32) { REALTIME = 0, VIRTUAL = 1, PROF = 2, @@ -389,7 +389,7 @@ pub const E = switch (native_os) { _, }, .macos, .ios, .tvos, .watchos, .visionos => darwin.E, - .freebsd, .kfreebsd => freebsd.E, + .freebsd => freebsd.E, .solaris, .illumos => enum(u16) { /// No error occurred. SUCCESS = 0, @@ -781,7 +781,7 @@ pub const F = switch (native_os) { /// exclusive or write lock pub const WRLCK = 3; }, - .freebsd, .kfreebsd => struct { + .freebsd => struct { /// Duplicate file descriptor. pub const DUPFD = 0; /// Get file descriptor flags. @@ -1075,7 +1075,7 @@ pub const Flock = switch (native_os) { type: i16, whence: i16, }, - .freebsd, .kfreebsd => extern struct { + .freebsd => extern struct { /// Starting offset. start: off_t, /// Number of consecutive bytes to be locked. @@ -1112,7 +1112,7 @@ pub const Flock = switch (native_os) { pub const HOST_NAME_MAX = switch (native_os) { .linux => linux.HOST_NAME_MAX, .macos, .ios, .tvos, .watchos, .visionos => 72, - .openbsd, .haiku, .dragonfly, .netbsd, .solaris, .illumos, .freebsd, .kfreebsd => 255, + .openbsd, .haiku, .dragonfly, .netbsd, .solaris, .illumos, .freebsd => 255, else => {}, }; pub const IOV_MAX = switch (native_os) { @@ -1120,11 +1120,11 @@ pub const IOV_MAX = switch (native_os) { .emscripten => emscripten.IOV_MAX, .openbsd, .haiku, .solaris, .illumos, .wasi => 1024, .macos, .ios, .tvos, .watchos, .visionos => 16, - .dragonfly, .netbsd, .freebsd, .kfreebsd => KERN.IOV_MAX, + .dragonfly, .netbsd, .freebsd => KERN.IOV_MAX, else => {}, }; pub const CTL = switch (native_os) { - .freebsd, .kfreebsd => struct { + .freebsd => struct { pub const KERN = 1; pub const DEBUG = 5; }, @@ -1162,7 +1162,7 @@ pub const CTL = switch (native_os) { else => void, }; pub const KERN = switch (native_os) { - .freebsd, .kfreebsd => struct { + .freebsd => struct { /// struct: process entries pub const PROC = 14; /// path to executable @@ -1338,7 +1338,7 @@ pub const KERN = switch (native_os) { pub const MADV = switch (native_os) { .linux => linux.MADV, .emscripten => emscripten.MADV, - .freebsd, .kfreebsd => struct { + .freebsd => struct { pub const NORMAL = 0; pub const RANDOM = 1; pub const SEQUENTIAL = 2; @@ -1403,7 +1403,7 @@ pub const MSF = switch (native_os) { pub const DEACTIVATE = 0x8; pub const SYNC = 0x10; }, - .openbsd, .haiku, .dragonfly, .netbsd, .solaris, .illumos, .freebsd, .kfreebsd => struct { + .openbsd, .haiku, .dragonfly, .netbsd, .solaris, .illumos, .freebsd => struct { pub const ASYNC = 1; pub const INVALIDATE = 2; pub const SYNC = 4; @@ -1420,7 +1420,7 @@ pub const NAME_MAX = switch (native_os) { // Haiku's headers make this 256, to contain room for the terminating null // character, but POSIX definition says that NAME_MAX does not include the // terminating null. - .haiku, .openbsd, .dragonfly, .netbsd, .solaris, .illumos, .freebsd, .kfreebsd, .macos, .ios, .tvos, .watchos, .visionos => 255, + .haiku, .openbsd, .dragonfly, .netbsd, .solaris, .illumos, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => 255, else => {}, }; pub const PATH_MAX = switch (native_os) { @@ -1428,7 +1428,7 @@ pub const PATH_MAX = switch (native_os) { .emscripten => emscripten.PATH_MAX, .wasi => 4096, .windows => 260, - .openbsd, .haiku, .dragonfly, .netbsd, .solaris, .illumos, .freebsd, .kfreebsd, .macos, .ios, .tvos, .watchos, .visionos => 1024, + .openbsd, .haiku, .dragonfly, .netbsd, .solaris, .illumos, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => 1024, else => {}, }; @@ -1465,7 +1465,7 @@ pub const POLL = switch (native_os) { pub const STANDARD = IN | PRI | OUT | RDNORM | RDBAND | WRBAND | ERR | HUP | NVAL; }, - .freebsd, .kfreebsd => struct { + .freebsd => struct { /// any readable data available. pub const IN = 0x0001; /// OOB/Urgent readable data. @@ -1568,7 +1568,7 @@ pub const POLL = switch (native_os) { pub const PROT = switch (native_os) { .linux => linux.PROT, .emscripten => emscripten.PROT, - .openbsd, .haiku, .dragonfly, .netbsd, .solaris, .illumos, .freebsd, .kfreebsd, .windows => struct { + .openbsd, .haiku, .dragonfly, .netbsd, .solaris, .illumos, .freebsd, .windows => struct { /// page can not be accessed pub const NONE = 0x0; /// page can be read @@ -1600,7 +1600,7 @@ pub const PROT = switch (native_os) { pub const REG = switch (native_os) { .linux => linux.REG, .emscripten => emscripten.REG, - .freebsd, .kfreebsd => switch (builtin.cpu.arch) { + .freebsd => switch (builtin.cpu.arch) { .aarch64 => struct { pub const FP = 29; pub const SP = 31; @@ -1683,7 +1683,7 @@ pub const REG = switch (native_os) { pub const RLIM = switch (native_os) { .linux => linux.RLIM, .emscripten => emscripten.RLIM, - .openbsd, .haiku, .dragonfly, .netbsd, .freebsd, .kfreebsd, .macos, .ios, .tvos, .watchos, .visionos => struct { + .openbsd, .haiku, .dragonfly, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => struct { /// No limit pub const INFINITY: rlim_t = (1 << 63) - 1; @@ -1774,7 +1774,7 @@ pub const S = switch (native_os) { return m & IFMT == IFWHT; } }, - .freebsd, .kfreebsd => struct { + .freebsd => struct { pub const IFMT = 0o170000; pub const IFIFO = 0o010000; @@ -2137,7 +2137,7 @@ pub const SA = switch (native_os) { /// signal handler with SIGINFO args with 64bit regs information pub const @"64REGSET" = 0x0200; }, - .freebsd, .kfreebsd => struct { + .freebsd => struct { pub const ONSTACK = 0x0001; pub const RESTART = 0x0002; pub const RESETHAND = 0x0004; @@ -2214,7 +2214,7 @@ pub const SEEK = switch (native_os) { pub const CUR: wasi.whence_t = .CUR; pub const END: wasi.whence_t = .END; }, - .openbsd, .haiku, .netbsd, .freebsd, .kfreebsd, .macos, .ios, .tvos, .watchos, .visionos, .windows => struct { + .openbsd, .haiku, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos, .windows => struct { pub const SET = 0; pub const CUR = 1; pub const END = 2; @@ -2353,7 +2353,7 @@ pub const SIG = switch (native_os) { /// user defined signal 2 pub const USR2 = 31; }, - .freebsd, .kfreebsd => struct { + .freebsd => struct { pub const HUP = 1; pub const INT = 2; pub const QUIT = 3; @@ -2735,7 +2735,7 @@ pub const Sigaction = switch (native_os) { mask: sigset_t, flags: c_uint, }, - .dragonfly, .freebsd, .kfreebsd => extern struct { + .dragonfly, .freebsd => extern struct { pub const handler_fn = *align(1) const fn (i32) callconv(.C) void; pub const sigaction_fn = *const fn (i32, *const siginfo_t, ?*anyopaque) callconv(.C) void; @@ -2807,7 +2807,7 @@ pub const T = switch (native_os) { return (inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num)); } }, - .freebsd, .kfreebsd => struct { + .freebsd => struct { pub const IOCEXCL = 0x2000740d; pub const IOCNXCL = 0x2000740e; pub const IOCSCTTY = 0x20007461; @@ -3154,7 +3154,7 @@ pub const W = switch (native_os) { } const stopped = 0o177; }, - .freebsd, .kfreebsd => struct { + .freebsd => struct { pub const NOHANG = 1; pub const UNTRACED = 2; pub const STOPPED = UNTRACED; @@ -3346,7 +3346,7 @@ pub const clock_t = switch (native_os) { .linux => linux.clock_t, .emscripten => emscripten.clock_t, .macos, .ios, .tvos, .watchos, .visionos => c_ulong, - .freebsd, .kfreebsd => isize, + .freebsd => isize, .openbsd, .solaris, .illumos => i64, .netbsd => u32, .haiku => i32, @@ -3360,7 +3360,7 @@ pub const cpu_set_t = switch (native_os) { pub const dl_phdr_info = switch (native_os) { .linux => linux.dl_phdr_info, .emscripten => emscripten.dl_phdr_info, - .freebsd, .kfreebsd => extern struct { + .freebsd => extern struct { /// Module relocation base. addr: if (builtin.target.ptrBitWidth() == 32) std.elf.Elf32_Addr else std.elf.Elf64_Addr, /// Module name. @@ -3414,7 +3414,7 @@ pub const itimerspec = switch (native_os) { }; pub const msghdr = switch (native_os) { .linux => linux.msghdr, - .openbsd, .emscripten, .dragonfly, .freebsd, .kfreebsd, .netbsd, .haiku, .solaris, .illumos => extern struct { + .openbsd, .emscripten, .dragonfly, .freebsd, .netbsd, .haiku, .solaris, .illumos => extern struct { /// optional address name: ?*sockaddr, /// size of address @@ -3434,7 +3434,7 @@ pub const msghdr = switch (native_os) { }; pub const msghdr_const = switch (native_os) { .linux => linux.msghdr_const, - .openbsd, .emscripten, .dragonfly, .freebsd, .kfreebsd, .netbsd, .haiku, .solaris, .illumos => extern struct { + .openbsd, .emscripten, .dragonfly, .freebsd, .netbsd, .haiku, .solaris, .illumos => extern struct { /// optional address name: ?*const sockaddr, /// size of address @@ -3457,7 +3457,7 @@ pub const nfds_t = switch (native_os) { .emscripten => emscripten.nfds_t, .haiku, .solaris, .illumos, .wasi => usize, .windows => c_ulong, - .openbsd, .dragonfly, .netbsd, .freebsd, .kfreebsd, .macos, .ios, .tvos, .watchos, .visionos => u32, + .openbsd, .dragonfly, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => u32, else => void, }; pub const perf_event_attr = switch (native_os) { @@ -3484,7 +3484,7 @@ pub const rlim_t = switch (native_os) { .linux => linux.rlim_t, .emscripten => emscripten.rlim_t, .openbsd, .netbsd, .solaris, .illumos, .macos, .ios, .tvos, .watchos, .visionos => u64, - .haiku, .dragonfly, .freebsd, .kfreebsd => i64, + .haiku, .dragonfly, .freebsd => i64, else => void, }; pub const rlimit = switch (native_os) { @@ -3514,7 +3514,7 @@ pub const rlimit_resource = switch (native_os) { pub const AS: rlimit_resource = .RSS; }, - .freebsd, .kfreebsd => enum(c_int) { + .freebsd => enum(c_int) { CPU = 0, FSIZE = 1, DATA = 2, @@ -3660,7 +3660,7 @@ pub const siginfo_t = switch (native_os) { si_band: c_long, _pad: [7]c_ulong, }, - .freebsd, .kfreebsd => extern struct { + .freebsd => extern struct { // Signal number. signo: c_int, // Errno association. @@ -3822,7 +3822,7 @@ pub const sigset_t = switch (native_os) { .linux => linux.sigset_t, .emscripten => emscripten.sigset_t, .openbsd, .macos, .ios, .tvos, .watchos, .visionos => u32, - .dragonfly, .netbsd, .solaris, .illumos, .freebsd, .kfreebsd => extern struct { + .dragonfly, .netbsd, .solaris, .illumos, .freebsd => extern struct { __bits: [SIG.WORDS]u32, }, .haiku => u64, @@ -3831,7 +3831,7 @@ pub const sigset_t = switch (native_os) { pub const empty_sigset: sigset_t = switch (native_os) { .linux => linux.empty_sigset, .emscripten => emscripten.empty_sigset, - .dragonfly, .netbsd, .solaris, .illumos, .freebsd, .kfreebsd => .{ .__bits = [_]u32{0} ** SIG.WORDS }, + .dragonfly, .netbsd, .solaris, .illumos, .freebsd => .{ .__bits = [_]u32{0} ** SIG.WORDS }, else => 0, }; pub const filled_sigset = switch (native_os) { @@ -3841,7 +3841,7 @@ pub const filled_sigset = switch (native_os) { }; pub const sigval = switch (native_os) { .linux => linux.sigval, - .openbsd, .dragonfly, .freebsd, .kfreebsd => extern union { + .openbsd, .dragonfly, .freebsd => extern union { int: c_int, ptr: ?*anyopaque, }, @@ -3851,7 +3851,7 @@ pub const sigval = switch (native_os) { pub const addrinfo = switch (native_os) { .linux, .emscripten => linux.addrinfo, .windows => ws2_32.addrinfo, - .freebsd, .kfreebsd, .macos, .ios, .tvos, .watchos, .visionos => extern struct { + .freebsd, .macos, .ios, .tvos, .watchos, .visionos => extern struct { flags: AI, family: i32, socktype: i32, @@ -3955,7 +3955,7 @@ pub const sockaddr = switch (native_os) { path: [104]u8, }; }, - .freebsd, .kfreebsd => extern struct { + .freebsd => extern struct { /// total length len: u8, /// address family @@ -4228,7 +4228,7 @@ pub const in_port_t = u16; pub const sa_family_t = switch (native_os) { .linux, .emscripten => linux.sa_family_t, .windows => ws2_32.ADDRESS_FAMILY, - .openbsd, .haiku, .dragonfly, .netbsd, .freebsd, .kfreebsd, .macos, .ios, .tvos, .watchos, .visionos => u8, + .openbsd, .haiku, .dragonfly, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => u8, .solaris, .illumos => u16, else => void, }; @@ -4275,7 +4275,7 @@ pub const AF = switch (native_os) { pub const PPP = 34; pub const MAX = 40; }, - .freebsd, .kfreebsd => struct { + .freebsd => struct { pub const UNSPEC = 0; pub const UNIX = 1; pub const LOCAL = UNIX; @@ -4505,7 +4505,7 @@ pub const PF = switch (native_os) { pub const PPP = AF.PPP; pub const MAX = AF.MAX; }, - .freebsd, .kfreebsd => struct { + .freebsd => struct { pub const UNSPEC = AF.UNSPEC; pub const LOCAL = AF.LOCAL; pub const UNIX = PF.LOCAL; @@ -4691,7 +4691,7 @@ pub const PF = switch (native_os) { }; pub const DT = switch (native_os) { .linux => linux.DT, - .netbsd, .freebsd, .kfreebsd, .macos, .ios, .tvos, .watchos, .visionos => struct { + .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => struct { pub const UNKNOWN = 0; pub const FIFO = 1; pub const CHR = 2; @@ -4768,7 +4768,7 @@ pub const SOCK = switch (native_os) { /// with any other `SOCK` bits. pub const NONBLOCK = 1 << 16; }, - .freebsd, .kfreebsd => struct { + .freebsd => struct { pub const STREAM = 1; pub const DGRAM = 2; pub const RAW = 3; @@ -4854,7 +4854,7 @@ pub const IPPROTO = switch (native_os) { pub const IP = 0; pub const IPV6 = 41; }, - .freebsd, .kfreebsd => struct { + .freebsd => struct { /// dummy for IP pub const IP = 0; /// control message protocol @@ -5431,7 +5431,7 @@ pub const SOL = switch (native_os) { .linux => linux.SOL, .emscripten => emscripten.SOL, .windows => ws2_32.SOL, - .openbsd, .haiku, .dragonfly, .netbsd, .freebsd, .kfreebsd, .macos, .ios, .tvos, .watchos, .visionos => struct { + .openbsd, .haiku, .dragonfly, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => struct { pub const SOCKET = 0xffff; }, .solaris, .illumos => struct { @@ -5474,7 +5474,7 @@ pub const SO = switch (native_os) { pub const NWRITE = 0x1024; pub const REUSESHAREUID = 0x1025; }, - .freebsd, .kfreebsd => struct { + .freebsd => struct { pub const DEBUG = 0x00000001; pub const ACCEPTCONN = 0x00000002; pub const REUSEADDR = 0x00000004; @@ -5670,7 +5670,7 @@ pub const IFNAMESIZE = switch (native_os) { .linux => linux.IFNAMESIZE, .emscripten => emscripten.IFNAMESIZE, .windows => 30, - .openbsd, .dragonfly, .netbsd, .freebsd, .kfreebsd, .macos, .ios, .tvos, .watchos, .visionos => 16, + .openbsd, .dragonfly, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => 16, .solaris, .illumos => 32, else => void, }; @@ -5678,7 +5678,7 @@ pub const IFNAMESIZE = switch (native_os) { pub const stack_t = switch (native_os) { .linux => linux.stack_t, .emscripten => emscripten.stack_t, - .freebsd, .kfreebsd => extern struct { + .freebsd => extern struct { /// Signal stack base. sp: *anyopaque, /// Signal stack length. @@ -5700,7 +5700,7 @@ pub const time_t = switch (native_os) { }; pub const suseconds_t = switch (native_os) { .solaris, .illumos => i64, - .freebsd, .kfreebsd, .dragonfly => c_long, + .freebsd, .dragonfly => c_long, .netbsd => c_int, .haiku => i32, else => void, @@ -5717,7 +5717,7 @@ pub const timeval = switch (native_os) { sec: c_long, usec: i32, }, - .dragonfly, .netbsd, .freebsd, .kfreebsd, .solaris, .illumos => extern struct { + .dragonfly, .netbsd, .freebsd, .solaris, .illumos => extern struct { /// seconds sec: time_t, /// microseconds @@ -5751,7 +5751,7 @@ pub const ucontext_t = switch (native_os) { mcontext: *mcontext_t, __mcontext_data: mcontext_t, }, - .freebsd, .kfreebsd => extern struct { + .freebsd => extern struct { sigmask: sigset_t, mcontext: mcontext_t, link: ?*ucontext_t, @@ -5806,7 +5806,7 @@ pub const mcontext_t = switch (native_os) { .linux => linux.mcontext_t, .emscripten => emscripten.mcontext_t, .macos, .ios, .tvos, .watchos, .visionos => darwin.mcontext_t, - .freebsd, .kfreebsd => switch (builtin.cpu.arch) { + .freebsd => switch (builtin.cpu.arch) { .x86_64 => extern struct { onstack: u64, rdi: u64, @@ -5920,7 +5920,7 @@ pub const _errno = switch (native_os) { .emscripten => private.__errno_location, .wasi, .dragonfly => private.errnoFromThreadLocal, .windows => private._errno, - .macos, .ios, .tvos, .watchos, .visionos, .freebsd, .kfreebsd => private.__error, + .macos, .ios, .tvos, .watchos, .visionos, .freebsd => private.__error, .solaris, .illumos => private.___errno, .openbsd, .netbsd => private.__errno, .haiku => haiku._errnop, @@ -5938,7 +5938,7 @@ pub const RTLD = switch (native_os) { NODELETE: bool = false, _: u19 = 0, }, - .dragonfly, .freebsd, .kfreebsd => packed struct(u32) { + .dragonfly, .freebsd => packed struct(u32) { LAZY: bool = false, NOW: bool = false, _2: u6 = 0, @@ -6018,7 +6018,7 @@ pub const dirent = switch (native_os) { type: u8, name: [1024]u8, }, - .freebsd, .kfreebsd => extern struct { + .freebsd => extern struct { /// File number of entry. fileno: ino_t, /// Directory offset of entry. @@ -6093,7 +6093,7 @@ pub const dirent64 = switch (native_os) { pub const AI = switch (native_os) { .linux, .emscripten => linux.AI, - .dragonfly, .haiku, .freebsd, .kfreebsd => packed struct(u32) { + .dragonfly, .haiku, .freebsd => packed struct(u32) { PASSIVE: bool = false, CANONNAME: bool = false, NUMERICHOST: bool = false, @@ -6194,7 +6194,7 @@ pub const EAI = switch (native_os) { _, }, - .haiku, .dragonfly, .netbsd, .freebsd, .kfreebsd, .macos, .ios, .tvos, .watchos, .visionos => enum(c_int) { + .haiku, .dragonfly, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => enum(c_int) { /// address family for hostname not supported ADDRFAMILY = 1, /// temporary failure in name resolution @@ -6455,7 +6455,7 @@ pub const Stat = switch (native_os) { return self.birthtimespec; } }, - .freebsd, .kfreebsd => freebsd.Stat, + .freebsd => freebsd.Stat, .solaris, .illumos => extern struct { dev: dev_t, ino: ino_t, @@ -6640,7 +6640,7 @@ pub const pthread_mutex_t = switch (native_os) { const data_len = if (@sizeOf(usize) == 8) 56 else 40; }, - .freebsd, .kfreebsd, .dragonfly, .openbsd => extern struct { + .freebsd, .dragonfly, .openbsd => extern struct { inner: ?*anyopaque = null, }, .hermit => extern struct { @@ -6689,7 +6689,7 @@ pub const pthread_cond_t = switch (native_os) { data: [data_len]u8 = [_]u8{0} ** data_len, const data_len = if (@sizeOf(usize) == 8) 40 else 24; }, - .freebsd, .kfreebsd, .dragonfly, .openbsd => extern struct { + .freebsd, .dragonfly, .openbsd => extern struct { inner: ?*anyopaque = null, }, .hermit => extern struct { @@ -6741,7 +6741,7 @@ pub const pthread_rwlock_t = switch (native_os) { sig: c_long = 0x2DA8B3B4, data: [192]u8 = [_]u8{0} ** 192, }, - .freebsd, .kfreebsd, .dragonfly, .openbsd => extern struct { + .freebsd, .dragonfly, .openbsd => extern struct { ptr: ?*anyopaque = null, }, .hermit => extern struct { @@ -6788,7 +6788,7 @@ pub const pthread_attr_t = switch (native_os) { __sig: c_long, __opaque: [56]u8, }, - .freebsd, .kfreebsd => extern struct { + .freebsd => extern struct { inner: ?*anyopaque = null, }, .solaris, .illumos => extern struct { @@ -6846,7 +6846,7 @@ pub const sem_t = switch (native_os) { __size: [4 * @sizeOf(usize)]u8 align(@alignOf(usize)), }, .macos, .ios, .tvos, .watchos, .visionos => c_int, - .freebsd, .kfreebsd => extern struct { + .freebsd => extern struct { _magic: u32, _kern: extern struct { _count: u32, @@ -6903,7 +6903,7 @@ pub const Kevent = switch (native_os) { assert(@offsetOf(@This(), "udata") == 24); } }, - .freebsd, .kfreebsd => extern struct { + .freebsd => extern struct { /// Identifier for this event. ident: usize, /// Filter for event. @@ -6974,7 +6974,7 @@ pub const AT = switch (native_os) { /// Path refers to directory pub const REMOVEDIR = 0x0080; }, - .freebsd, .kfreebsd => struct { + .freebsd => struct { /// Magic value that specify the use of the current working directory /// to determine the target of relative file paths in the openat() and /// similar syscalls. @@ -7260,7 +7260,7 @@ pub const O = switch (native_os) { DIRECTORY: bool = false, _: u4 = 0, }, - .freebsd, .kfreebsd => packed struct(u32) { + .freebsd => packed struct(u32) { ACCMODE: std.posix.ACCMODE = .RDONLY, NONBLOCK: bool = false, APPEND: bool = false, @@ -7405,7 +7405,7 @@ pub const MAP = switch (native_os) { SIZEALIGN: bool = false, _: u13 = 0, }, - .freebsd, .kfreebsd => packed struct(u32) { + .freebsd => packed struct(u32) { TYPE: enum(u4) { SHARED = 0x01, PRIVATE = 0x02, @@ -7455,7 +7455,7 @@ pub const V = switch (native_os) { TIME, STATUS, }, - .freebsd, .kfreebsd => enum { + .freebsd => enum { EOF, EOL, EOL2, @@ -7533,7 +7533,7 @@ pub const V = switch (native_os) { pub const NCCS = switch (native_os) { .linux => linux.NCCS, - .macos, .ios, .tvos, .watchos, .visionos, .freebsd, .kfreebsd, .netbsd, .openbsd, .dragonfly => 20, + .macos, .ios, .tvos, .watchos, .visionos, .freebsd, .netbsd, .openbsd, .dragonfly => 20, .haiku => 11, .solaris, .illumos => 19, .emscripten, .wasi => 32, @@ -7551,7 +7551,7 @@ pub const termios = switch (native_os) { ispeed: speed_t align(8), ospeed: speed_t, }, - .freebsd, .kfreebsd, .netbsd, .dragonfly, .openbsd => extern struct { + .freebsd, .netbsd, .dragonfly, .openbsd => extern struct { iflag: tc_iflag_t, oflag: tc_oflag_t, cflag: tc_cflag_t, @@ -7610,7 +7610,7 @@ pub const tc_iflag_t = switch (native_os) { IUTF8: bool = false, _: u49 = 0, }, - .netbsd, .freebsd, .kfreebsd, .dragonfly => packed struct(u32) { + .netbsd, .freebsd, .dragonfly => packed struct(u32) { IGNBRK: bool = false, BRKINT: bool = false, IGNPAR: bool = false, @@ -7742,7 +7742,7 @@ pub const tc_oflag_t = switch (native_os) { ONLRET: bool = false, _: u24 = 0, }, - .freebsd, .kfreebsd, .dragonfly => packed struct(u32) { + .freebsd, .dragonfly => packed struct(u32) { OPOST: bool = false, ONLCR: bool = false, _2: u1 = 0, @@ -7818,7 +7818,7 @@ pub const tc_cflag_t = switch (native_os) { CCAR_OFLOW: bool = false, _: u43 = 0, }, - .freebsd, .kfreebsd => packed struct(u32) { + .freebsd => packed struct(u32) { CIGNORE: bool = false, _1: u7 = 0, CSIZE: CSIZE = .CS5, @@ -7959,7 +7959,7 @@ pub const tc_lflag_t = switch (native_os) { NOFLSH: bool = false, _: u32 = 0, }, - .netbsd, .freebsd, .kfreebsd, .dragonfly => packed struct(u32) { + .netbsd, .freebsd, .dragonfly => packed struct(u32) { ECHOKE: bool = false, ECHOE: bool = false, ECHOK: bool = false, @@ -8086,7 +8086,7 @@ pub const speed_t = switch (native_os) { B115200 = 115200, B230400 = 230400, }, - .freebsd, .kfreebsd, .netbsd => enum(c_uint) { + .freebsd, .netbsd => enum(c_uint) { B0 = 0, B50 = 50, B75 = 75, @@ -8250,7 +8250,7 @@ pub const NSIG = switch (native_os) { .linux => linux.NSIG, .windows => 23, .haiku => 65, - .netbsd, .freebsd, .kfreebsd => 32, + .netbsd, .freebsd => 32, .solaris, .illumos => 75, .openbsd => 33, else => {}, @@ -8258,7 +8258,7 @@ pub const NSIG = switch (native_os) { pub const MINSIGSTKSZ = switch (native_os) { .macos, .ios, .tvos, .watchos, .visionos => 32768, - .freebsd, .kfreebsd => switch (builtin.cpu.arch) { + .freebsd => switch (builtin.cpu.arch) { .x86, .x86_64 => 2048, .arm, .aarch64 => 4096, else => @compileError("unsupported arch"), @@ -8270,7 +8270,7 @@ pub const MINSIGSTKSZ = switch (native_os) { }; pub const SIGSTKSZ = switch (native_os) { .macos, .ios, .tvos, .watchos, .visionos => 131072, - .netbsd, .freebsd, .kfreebsd => MINSIGSTKSZ + 32768, + .netbsd, .freebsd => MINSIGSTKSZ + 32768, .solaris, .illumos => 8192, .haiku => 16384, .openbsd => MINSIGSTKSZ + (1 << openbsd.MAX_PAGE_SHIFT) * 4, @@ -8278,7 +8278,7 @@ pub const SIGSTKSZ = switch (native_os) { }; pub const SS = switch (native_os) { .linux => linux.SS, - .openbsd, .macos, .ios, .tvos, .watchos, .visionos, .netbsd, .freebsd, .kfreebsd => struct { + .openbsd, .macos, .ios, .tvos, .watchos, .visionos, .netbsd, .freebsd => struct { pub const ONSTACK = 1; pub const DISABLE = 4; }, @@ -8882,7 +8882,7 @@ pub extern "c" fn fopen64(noalias filename: [*:0]const u8, noalias modes: [*:0]c pub extern "c" fn ftruncate64(fd: c_int, length: off_t) c_int; pub extern "c" fn fallocate(fd: fd_t, mode: c_int, offset: off_t, len: off_t) c_int; pub const sendfile = switch (native_os) { - .freebsd, .kfreebsd => freebsd.sendfile, + .freebsd => freebsd.sendfile, .macos, .ios, .tvos, .watchos, .visionos => darwin.sendfile, .linux => private.sendfile, else => {}, @@ -8899,12 +8899,12 @@ pub const sigaltstack = switch (native_os) { pub extern "c" fn memfd_create(name: [*:0]const u8, flags: c_uint) c_int; pub const pipe2 = switch (native_os) { - .dragonfly, .emscripten, .netbsd, .freebsd, .kfreebsd, .solaris, .illumos, .openbsd, .linux => private.pipe2, + .dragonfly, .emscripten, .netbsd, .freebsd, .solaris, .illumos, .openbsd, .linux => private.pipe2, else => {}, }; pub const copy_file_range = switch (native_os) { .linux => private.copy_file_range, - .freebsd, .kfreebsd => freebsd.copy_file_range, + .freebsd => freebsd.copy_file_range, else => {}, }; @@ -9071,7 +9071,6 @@ pub const fork = switch (native_os) { .dragonfly, .freebsd, .ios, - .kfreebsd, .linux, .macos, .netbsd, @@ -9683,7 +9682,7 @@ const private = struct { extern "c" fn fstatat(dirfd: fd_t, path: [*:0]const u8, buf: *Stat, flag: u32) c_int; extern "c" fn getdirentries(fd: fd_t, buf_ptr: [*]u8, nbytes: usize, basep: *i64) isize; extern "c" fn getdents(fd: c_int, buf_ptr: [*]u8, nbytes: usize) switch (native_os) { - .freebsd, .kfreebsd => isize, + .freebsd => isize, .solaris, .illumos => usize, else => c_int, }; diff --git a/lib/std/c/freebsd.zig b/lib/std/c/freebsd.zig index 0498aff4c711..6fd33c80b716 100644 --- a/lib/std/c/freebsd.zig +++ b/lib/std/c/freebsd.zig @@ -22,7 +22,7 @@ const sf_hdtr = std.c.sf_hdtr; const clockid_t = std.c.clockid_t; comptime { - assert(builtin.os.tag == .freebsd or builtin.os.tag == .kfreebsd); // Prevent access of std.c symbols on wrong OS. + assert(builtin.os.tag == .freebsd); // Prevent access of std.c symbols on wrong OS. } pub extern "c" fn kinfo_getfile(pid: pid_t, cntp: *c_int) ?[*]kinfo_file; diff --git a/lib/std/zig/LibCDirs.zig b/lib/std/zig/LibCDirs.zig index 4dc8586e3cff..b2e51dfd0fdd 100644 --- a/lib/std/zig/LibCDirs.zig +++ b/lib/std/zig/LibCDirs.zig @@ -232,7 +232,6 @@ fn libCGenericName(target: std.Target) [:0]const u8 { .gnueabi, .gnueabihf, .gnuf32, - .gnuf64, .gnusf, .gnux32, .gnuilp32, @@ -251,7 +250,6 @@ fn libCGenericName(target: std.Target) [:0]const u8 { .msvc, .itanium, .cygnus, - .coreclr, .simulator, .macabi, => unreachable, diff --git a/src/Type.zig b/src/Type.zig index 825cc2dc5bcb..6ccd2841a6c1 100644 --- a/src/Type.zig +++ b/src/Type.zig @@ -1651,7 +1651,6 @@ pub fn maxIntAlignment(target: std.Target, use_llvm: bool) u16 { .m68k, .tce, .tcele, - .le32, .amdil, .hsail, .spir, @@ -1660,7 +1659,6 @@ pub fn maxIntAlignment(target: std.Target, use_llvm: bool) u16 { .spirv, .spirv32, .shave, - .le64, .amdil64, .hsail64, .spir64, diff --git a/src/Zcu.zig b/src/Zcu.zig index 92baca90f2f1..0e43ba59ba05 100644 --- a/src/Zcu.zig +++ b/src/Zcu.zig @@ -3241,7 +3241,6 @@ pub fn atomicPtrAlignment( .armeb, .hexagon, .m68k, - .le32, .mips, .mipsel, .nvptx, @@ -3275,7 +3274,6 @@ pub fn atomicPtrAlignment( .amdgcn, .bpfel, .bpfeb, - .le64, .mips64, .mips64el, .nvptx64, diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index e4d90cf3f012..25d7d08f0867 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -83,8 +83,6 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 { .xtensa => "xtensa", .nvptx => "nvptx", .nvptx64 => "nvptx64", - .le32 => "le32", - .le64 => "le64", .amdil => "amdil", .amdil64 => "amdil64", .hsail => "hsail", @@ -112,7 +110,6 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 { .dragonfly => "dragonfly", .freebsd => "freebsd", .fuchsia => "fuchsia", - .kfreebsd => "kfreebsd", .linux => "linux", .lv2 => "lv2", .netbsd => "netbsd", @@ -122,7 +119,6 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 { .zos => "zos", .haiku => "haiku", .rtems => "rtems", - .nacl => "nacl", .aix => "aix", .cuda => "cuda", .nvcl => "nvcl", @@ -178,7 +174,6 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 { .gnueabi => "gnueabi", .gnueabihf => "gnueabihf", .gnuf32 => "gnuf32", - .gnuf64 => "gnuf64", .gnusf => "gnusf", .gnux32 => "gnux32", .gnuilp32 => "gnuilp32", @@ -193,7 +188,6 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 { .msvc => "msvc", .itanium => "itanium", .cygnus => "cygnus", - .coreclr => "coreclr", .simulator => "simulator", .macabi => "macabi", .pixel => "pixel", @@ -236,7 +230,6 @@ pub fn targetOs(os_tag: std.Target.Os.Tag) llvm.OSType { .freebsd => .FreeBSD, .fuchsia => .Fuchsia, .ios => .IOS, - .kfreebsd => .KFreeBSD, .linux => .Linux, .lv2 => .Lv2, .macos => .MacOSX, @@ -246,7 +239,6 @@ pub fn targetOs(os_tag: std.Target.Os.Tag) llvm.OSType { .zos => .ZOS, .haiku => .Haiku, .rtems => .RTEMS, - .nacl => .NaCl, .aix => .AIX, .cuda => .CUDA, .nvcl => .NVCL, @@ -315,8 +307,6 @@ pub fn targetArch(arch_tag: std.Target.Cpu.Arch) llvm.ArchType { .xtensa => .xtensa, .nvptx => .nvptx, .nvptx64 => .nvptx64, - .le32 => .le32, - .le64 => .le64, .amdil => .amdil, .amdil64 => .amdil64, .hsail => .hsail, @@ -12104,8 +12094,6 @@ pub fn initializeLLVMTarget(arch: std.Target.Cpu.Arch) void { .tce, .tcele, .r600, - .le32, - .le64, .amdil, .amdil64, .hsail, diff --git a/src/target.zig b/src/target.zig index b80a4977c30c..23f7b285de8d 100644 --- a/src/target.zig +++ b/src/target.zig @@ -153,8 +153,6 @@ pub fn hasLlvmSupport(target: std.Target, ofmt: std.Target.ObjectFormat) bool { .xtensa, .nvptx, .nvptx64, - .le32, - .le64, .amdil, .amdil64, .hsail,