diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-07-09 04:23:59 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-07-09 04:23:59 +0100 |
commit | 49307b439ea0ae14beb0772de83e70297ae8356c (patch) | |
tree | 02f22afc29810c4558bf87d13c56f288d43fecc3 /dev-lang | |
parent | 99b2c44c1425c7b2925846d4c44b2bf2f78dc786 (diff) |
gentoo auto-resync : 09:07:2023 - 04:23:59
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/Manifest.gz | bin | 19491 -> 19492 bytes | |||
-rw-r--r-- | dev-lang/zig-bin/Manifest | 3 | ||||
-rw-r--r-- | dev-lang/zig-bin/files/zig-0.10.1-musl-1.2.4-lfs64.patch | 220 | ||||
-rw-r--r-- | dev-lang/zig-bin/zig-bin-0.10.1-r3.ebuild (renamed from dev-lang/zig-bin/zig-bin-0.10.1-r2.ebuild) | 4 | ||||
-rw-r--r-- | dev-lang/zig/Manifest | 3 | ||||
-rw-r--r-- | dev-lang/zig/files/zig-0.10.1-musl-1.2.4-lfs64.patch | 220 | ||||
-rw-r--r-- | dev-lang/zig/zig-0.10.1-r3.ebuild (renamed from dev-lang/zig/zig-0.10.1-r2.ebuild) | 1 |
7 files changed, 448 insertions, 3 deletions
diff --git a/dev-lang/Manifest.gz b/dev-lang/Manifest.gz Binary files differindex 9a20b988a5d7..32ba0b60402f 100644 --- a/dev-lang/Manifest.gz +++ b/dev-lang/Manifest.gz diff --git a/dev-lang/zig-bin/Manifest b/dev-lang/zig-bin/Manifest index 133c99febb54..857c7a9a9253 100644 --- a/dev-lang/zig-bin/Manifest +++ b/dev-lang/zig-bin/Manifest @@ -1,7 +1,8 @@ +AUX zig-0.10.1-musl-1.2.4-lfs64.patch 8866 BLAKE2B 5faf4a70f2f388f24105948c56940123b51bb5da389f5008b565008a96df1f4033ebe6fbd764b1105870d2f2e7b018e0f8bb09947937bc53d542ef359fe94b70 SHA512 169f0b6412e8ebe11a20d23c0e639f98778ae077dd36ea44b423fd565b54adb70bcdcf1af085521e8a0ca9a08e095d6f82e40347d315ae1ec5566c8c205cfddb DIST zig-linux-aarch64-0.10.1.tar.xz 40321280 BLAKE2B 39abefb80d540d52333ec76203893630ac5df2a784684397033e9ac766f67c4512be71513ebb80faac6c5ebaa2a737859b7bc27b82797232cf97d87d91e8492e SHA512 44dd15b1b2d7bc85a4f8e8171ae5c51122be352249273091b499de5a392c72e262585f981908afd1718a41fa7e67b36f1b65c6cacbf8e9f226a687bd85b7edc6 DIST zig-linux-armv7a-0.10.1.tar.xz 50718132 BLAKE2B 76ef431ef8957272b992f6b861913a961d348120106a7f4b77d1f6b2a042dd8904a1ac744ab6b02b78681eef68af4143372e5315cd113d40711bd26fc78e6632 SHA512 4ec3ccd7ac980bfd9fc7a2f6b2301051d3df43b00143914d869389fc44b48916820d996e27cb922dac152228c4b04a0cce51f7b125317de85440a5479fe8ff7d DIST zig-linux-i386-0.10.1.tar.xz 48367388 BLAKE2B 482ec9e42d9036177f41c459faf82c79ba525f35ed14150d97af9110efab3e9894b8c64f92f9257b224893179134e43306c985ad6a04ae6a7d427d14ef4e7a3f SHA512 97345a8f7f15a83e51635ec667e869833a597511a1b004fa4ab19d78ad234e05e8344823e0c623510c7c5dbeef447d13636223e8d339f6d53f2eca053852a8d3 DIST zig-linux-riscv64-0.10.1.tar.xz 42196008 BLAKE2B a7ae37b1d1db1281b09bbd7e35ecaf390bbe28774bd1a4fa76b4468255be19b07fb514326d48576946f3c4eb04dcef34d6ab14f550407aa33803754fabbd848c SHA512 1a1da96924fa4a16a53721017eadc3363859a4f53671e27b11588200d0302d9065de9ba517ad40940aad98725e617cf853f2e83f732a4e23c33deacb99487ad0 DIST zig-linux-x86_64-0.10.1.tar.xz 44085596 BLAKE2B d689a469dbbe790593a561dd4df01c506212754c48be7de03773c7e690cbab197af10d639e80148f3343204ddf9ecfe09a88a62fb6ef63a262bcc2dd79fecd34 SHA512 1cf88a492b1a47800e213b8801477f4ffabf269f960d27d1849c5aec805b5db3768c83d4daa4a738532b1b7367e8c6812e3eea47c205ea732d7a6269a47e16dc -EBUILD zig-bin-0.10.1-r2.ebuild 3001 BLAKE2B 4496d25a015e69d858fc0d086740b233de45d8ad6cbd1dc324101d0ed8227e44b2e8b4bd2ba4205ff7750b112a004a0ff83ad3a27b90e5b4f2758e61fb5987eb SHA512 b572c7ea851ca635b5b91f87e74c3fd4b3a37376b39f9714df87e1625d9669ad8c3061f324a7628a40371c6a4941df631dc3d50a58d1eb3fe5e525f37afc7b0f +EBUILD zig-bin-0.10.1-r3.ebuild 3049 BLAKE2B f00c12c02cade6f0af32239b268b7c7f41fa8ebef0d385e8502ab9b56e0394e9e9214ecf164c9a0c039d0a6d4cf51d83f8fe095c7f008b018a41168c09cd10c3 SHA512 4ae061b9601fbd04adb9ca577230e9f292f94629d4dc781cfbe35bca9fb3d67daa08f55951ce31be1452e28bfef6804ff8fcc62566e0de24fd70cf7488cebc12 MISC metadata.xml 541 BLAKE2B 6f5c7fbf759f0430f69073a17a0dae4b8bebf335b54c3b43da6b24104dc3de05a3b686cddbbd31e4dae1fc31695a2f08d000d22437ed6f1847de8fa95e3b1952 SHA512 d49cf0a8ad76ac9a6f6fb091effddbbcd812b56f91df6d3c782e15197cb4ff4423fb1076671a232aabcb9833af19ef8c820ad6df312a1e4d72e665680314c083 diff --git a/dev-lang/zig-bin/files/zig-0.10.1-musl-1.2.4-lfs64.patch b/dev-lang/zig-bin/files/zig-0.10.1-musl-1.2.4-lfs64.patch new file mode 100644 index 000000000000..05a550a7920e --- /dev/null +++ b/dev-lang/zig-bin/files/zig-0.10.1-musl-1.2.4-lfs64.patch @@ -0,0 +1,220 @@ +From https://github.com/ziglang/zig/commit/b20ccff515364cdb8f3e733cc950e53ab77656db Mon Sep 17 00:00:00 2001 +From: Andrew Kelley <andrew@ziglang.org> +Date: Mon, 19 Jun 2023 15:17:01 -0700 +Subject: [PATCH] std.os: update logic for 64-bit symbol choice + +musl v1.2.4 dropped the "64"-suffixed aliases for legacy "LFS64" ("large +file support") interfaces, so this commit changes the corresponding Zig +logic to call the correct names. +--- a/lib/std/os.zig ++++ b/lib/std/os.zig +@@ -890,10 +890,7 @@ pub fn pread(fd: fd_t, buf: []u8, offset: u64) PReadError!usize { + }; + const adjusted_len = @min(max_count, buf.len); + +- const pread_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.pread64 +- else +- system.pread; ++ const pread_sym = if (lfs64_abi) system.pread64 else system.pread; + + const ioffset = @bitCast(i64, offset); // the OS treats this as unsigned + while (true) { +@@ -966,10 +963,7 @@ pub fn ftruncate(fd: fd_t, length: u64) TruncateError!void { + } + + while (true) { +- const ftruncate_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.ftruncate64 +- else +- system.ftruncate; ++ const ftruncate_sym = if (lfs64_abi) system.ftruncate64 else system.ftruncate; + + const ilen = @bitCast(i64, length); // the OS treats this as unsigned + switch (errno(ftruncate_sym(fd, ilen))) { +@@ -1034,10 +1028,7 @@ pub fn preadv(fd: fd_t, iov: []const iovec, offset: u64) PReadError!usize { + + const iov_count = math.cast(u31, iov.len) orelse math.maxInt(u31); + +- const preadv_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.preadv64 +- else +- system.preadv; ++ const preadv_sym = if (lfs64_abi) system.preadv64 else system.preadv; + + const ioffset = @bitCast(i64, offset); // the OS treats this as unsigned + while (true) { +@@ -1311,10 +1302,7 @@ pub fn pwrite(fd: fd_t, bytes: []const u8, offset: u64) PWriteError!usize { + }; + const adjusted_len = @min(max_count, bytes.len); + +- const pwrite_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.pwrite64 +- else +- system.pwrite; ++ const pwrite_sym = if (lfs64_abi) system.pwrite64 else system.pwrite; + + const ioffset = @bitCast(i64, offset); // the OS treats this as unsigned + while (true) { +@@ -1400,10 +1388,7 @@ pub fn pwritev(fd: fd_t, iov: []const iovec_const, offset: u64) PWriteError!usiz + } + } + +- const pwritev_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.pwritev64 +- else +- system.pwritev; ++ const pwritev_sym = if (lfs64_abi) system.pwritev64 else system.pwritev; + + const iov_count = if (iov.len > IOV_MAX) IOV_MAX else @intCast(u31, iov.len); + const ioffset = @bitCast(i64, offset); // the OS treats this as unsigned +@@ -1514,10 +1499,7 @@ pub fn openZ(file_path: [*:0]const u8, flags: u32, perm: mode_t) OpenError!fd_t + return open(mem.sliceTo(file_path, 0), flags, perm); + } + +- const open_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.open64 +- else +- system.open; ++ const open_sym = if (lfs64_abi) system.open64 else system.open; + + while (true) { + const rc = open_sym(file_path, flags, perm); +@@ -1730,10 +1712,7 @@ pub fn openatZ(dir_fd: fd_t, file_path: [*:0]const u8, flags: u32, mode: mode_t) + return openat(dir_fd, mem.sliceTo(file_path, 0), flags, mode); + } + +- const openat_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.openat64 +- else +- system.openat; ++ const openat_sym = if (lfs64_abi) system.openat64 else system.openat; + + while (true) { + const rc = openat_sym(dir_fd, file_path, flags, mode); +@@ -4117,10 +4096,7 @@ pub fn fstat(fd: fd_t) FStatError!Stat { + @compileError("fstat is not yet implemented on Windows"); + } + +- const fstat_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.fstat64 +- else +- system.fstat; ++ const fstat_sym = if (lfs64_abi) system.fstat64 else system.fstat; + + var stat = mem.zeroes(Stat); + switch (errno(fstat_sym(fd, &stat))) { +@@ -4176,10 +4152,7 @@ pub fn fstatatZ(dirfd: fd_t, pathname: [*:0]const u8, flags: u32) FStatAtError!S + return fstatatWasi(dirfd, mem.sliceTo(pathname), flags); + } + +- const fstatat_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.fstatat64 +- else +- system.fstatat; ++ const fstatat_sym = if (lfs64_abi) system.fstatat64 else system.fstatat; + + var stat = mem.zeroes(Stat); + switch (errno(fstatat_sym(dirfd, pathname, &stat, flags))) { +@@ -4416,10 +4389,7 @@ pub fn mmap( + fd: fd_t, + offset: u64, + ) MMapError![]align(mem.page_size) u8 { +- const mmap_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.mmap64 +- else +- system.mmap; ++ const mmap_sym = if (lfs64_abi) system.mmap64 else system.mmap; + + const ioffset = @bitCast(i64, offset); // the OS treats this as unsigned + const rc = mmap_sym(ptr, length, prot, flags, fd, ioffset); +@@ -4823,10 +4793,7 @@ pub fn lseek_SET(fd: fd_t, offset: u64) SeekError!void { + } + } + +- const lseek_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.lseek64 +- else +- system.lseek; ++ const lseek_sym = if (lfs64_abi) system.lseek64 else system.lseek; + + const ioffset = @bitCast(i64, offset); // the OS treats this as unsigned + switch (errno(lseek_sym(fd, ioffset, SEEK.SET))) { +@@ -4870,10 +4837,7 @@ pub fn lseek_CUR(fd: fd_t, offset: i64) SeekError!void { + else => |err| return unexpectedErrno(err), + } + } +- const lseek_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.lseek64 +- else +- system.lseek; ++ const lseek_sym = if (lfs64_abi) system.lseek64 else system.lseek; + + const ioffset = @bitCast(i64, offset); // the OS treats this as unsigned + switch (errno(lseek_sym(fd, ioffset, SEEK.CUR))) { +@@ -4917,10 +4881,7 @@ pub fn lseek_END(fd: fd_t, offset: i64) SeekError!void { + else => |err| return unexpectedErrno(err), + } + } +- const lseek_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.lseek64 +- else +- system.lseek; ++ const lseek_sym = if (lfs64_abi) system.lseek64 else system.lseek; + + const ioffset = @bitCast(i64, offset); // the OS treats this as unsigned + switch (errno(lseek_sym(fd, ioffset, SEEK.END))) { +@@ -4964,10 +4925,7 @@ pub fn lseek_CUR_get(fd: fd_t) SeekError!u64 { + else => |err| return unexpectedErrno(err), + } + } +- const lseek_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.lseek64 +- else +- system.lseek; ++ const lseek_sym = if (lfs64_abi) system.lseek64 else system.lseek; + + const rc = lseek_sym(fd, 0, SEEK.CUR); + switch (errno(rc)) { +@@ -6169,10 +6127,7 @@ pub fn sendfile( + // TODO we should not need this cast; improve return type of @min + const adjusted_count = @intCast(usize, adjusted_count_tmp); + +- const sendfile_sym = if (builtin.link_libc) +- system.sendfile64 +- else +- system.sendfile; ++ const sendfile_sym = if (lfs64_abi) system.sendfile64 else system.sendfile; + + while (true) { + var offset: off_t = @bitCast(off_t, in_offset); +@@ -7050,10 +7005,7 @@ pub fn prctl(option: PR, args: anytype) PrctlError!u31 { + pub const GetrlimitError = UnexpectedError; + + pub fn getrlimit(resource: rlimit_resource) GetrlimitError!rlimit { +- const getrlimit_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.getrlimit64 +- else +- system.getrlimit; ++ const getrlimit_sym = if (lfs64_abi) system.getrlimit64 else system.getrlimit; + + var limits: rlimit = undefined; + switch (errno(getrlimit_sym(resource, &limits))) { +@@ -7067,10 +7019,7 @@ pub fn getrlimit(resource: rlimit_resource) GetrlimitError!rlimit { + pub const SetrlimitError = error{ PermissionDenied, LimitTooBig } || UnexpectedError; + + pub fn setrlimit(resource: rlimit_resource, limits: rlimit) SetrlimitError!void { +- const setrlimit_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.setrlimit64 +- else +- system.setrlimit; ++ const setrlimit_sym = if (lfs64_abi) system.setrlimit64 else system.setrlimit; + + switch (errno(setrlimit_sym(resource, &limits))) { + .SUCCESS => return, +@@ -7339,3 +7288,5 @@ pub fn ptrace(request: u32, pid: pid_t, addr: usize, signal: usize) PtraceError! + }, + }; + } ++ ++const lfs64_abi = builtin.os.tag == .linux and builtin.link_libc and builtin.abi.isGnu(); diff --git a/dev-lang/zig-bin/zig-bin-0.10.1-r2.ebuild b/dev-lang/zig-bin/zig-bin-0.10.1-r3.ebuild index 4674b943f38f..b5dcb9e26682 100644 --- a/dev-lang/zig-bin/zig-bin-0.10.1-r2.ebuild +++ b/dev-lang/zig-bin/zig-bin-0.10.1-r3.ebuild @@ -34,7 +34,9 @@ IDEPEND="app-eselect/eselect-zig" # because they can use compile-time mechanics (and it is easier for distributions to patch them) # Here we use this feature for fixing programs that use standard library # Note: Zig build system is also part of standard library, so we can fix it too -#PATCHES=( ) +PATCHES=( + "${FILESDIR}/zig-0.10.1-musl-1.2.4-lfs64.patch" +) QA_PREBUILT="opt/${P}/zig" diff --git a/dev-lang/zig/Manifest b/dev-lang/zig/Manifest index 89501a0b4d0b..5da9f25b83db 100644 --- a/dev-lang/zig/Manifest +++ b/dev-lang/zig/Manifest @@ -1,5 +1,6 @@ AUX zig-0.10.0-build-dir-install-stage3.patch 1430 BLAKE2B cca909207cadfe1c9b31b9481a705882506363aaf41db7672f42cc66937f85f7b2f2b53346d29a4d748d1aef05e77efcc6e668ac498a7d172a6d8654034d5c4a SHA512 6704adb1f146ed78c8030aad2c739e30d0ec7ffda40273b5520914b16cc67d497afd9b1b59a1acfbb0097d7f5b0a5517973c45ef43ccbc35d8af051500577117 +AUX zig-0.10.1-musl-1.2.4-lfs64.patch 8866 BLAKE2B 5faf4a70f2f388f24105948c56940123b51bb5da389f5008b565008a96df1f4033ebe6fbd764b1105870d2f2e7b018e0f8bb09947937bc53d542ef359fe94b70 SHA512 169f0b6412e8ebe11a20d23c0e639f98778ae077dd36ea44b423fd565b54adb70bcdcf1af085521e8a0ca9a08e095d6f82e40347d315ae1ec5566c8c205cfddb DIST zig-0.10.1.tar.xz 15143112 BLAKE2B 4954d95ad763000eedf73a78e62bc0e99d65bba91c7127cdf1ea4503eb67817265daf572f645b7efbe9e24087e690b2768f0b2bc6c43b5fd76eab33143e964fe SHA512 d443adf61556bc95470537c6b0371a0ac99d19a06b15635cf1e5055ae7849039680c9006105e06e1bd6ba0fc12da14c54c1d28ac597c7dee17ee3a5cd9cf79f8 -EBUILD zig-0.10.1-r2.ebuild 5865 BLAKE2B e8cff6a84cf4003f573e16d3db91c3f32d535adef9209cb2e2831a2fb7a0a1f9937291c3133999feb4f9dc36bb63b2e7e90951ca650e6b9e7c7551cfd743a7d5 SHA512 b1e009bc0771142d9d26d1f66cfbb38a5e4f70d414a5224c2c21965c0a4ed6d95abb8a59bd234c623b25f6ad985cdc0c4efe6974c84c92f0aa19136864a7d003 +EBUILD zig-0.10.1-r3.ebuild 5914 BLAKE2B 7281e035750656c1eb9e01e3b0f44eaf895b7376cccb56dc76e47e728ec39e906d4bbd7b5f02c65c95275c566dd0fd65bc5110c2f73cdbb14da45f38f29ccc3f SHA512 4b3b1f96304c3ac117680cadb752c0d1ff35c10a25459bbd746bfc7fc2409d138a6a100d6ae0351ca380fac824d8063f22a7c307d1021cc98f155730ee132693 EBUILD zig-9999.ebuild 4818 BLAKE2B 168b99d3652501b7f1c53237f802cba10ca8bac1cf7ddd92f441e96e3f6e5b3cad3b3e3e57cb25345edb465f9b9174c1d0a01505ba415db345c868d727af552c SHA512 030d78dc79772d8ca1f89c997fc7d0d8fcc1799d49bb42482bbfe82fbda219d1d61a2a116bd0a1524c9f7453ba521d39ae65a6ec7ece5494f1d02df10584d95a MISC metadata.xml 541 BLAKE2B 6f5c7fbf759f0430f69073a17a0dae4b8bebf335b54c3b43da6b24104dc3de05a3b686cddbbd31e4dae1fc31695a2f08d000d22437ed6f1847de8fa95e3b1952 SHA512 d49cf0a8ad76ac9a6f6fb091effddbbcd812b56f91df6d3c782e15197cb4ff4423fb1076671a232aabcb9833af19ef8c820ad6df312a1e4d72e665680314c083 diff --git a/dev-lang/zig/files/zig-0.10.1-musl-1.2.4-lfs64.patch b/dev-lang/zig/files/zig-0.10.1-musl-1.2.4-lfs64.patch new file mode 100644 index 000000000000..05a550a7920e --- /dev/null +++ b/dev-lang/zig/files/zig-0.10.1-musl-1.2.4-lfs64.patch @@ -0,0 +1,220 @@ +From https://github.com/ziglang/zig/commit/b20ccff515364cdb8f3e733cc950e53ab77656db Mon Sep 17 00:00:00 2001 +From: Andrew Kelley <andrew@ziglang.org> +Date: Mon, 19 Jun 2023 15:17:01 -0700 +Subject: [PATCH] std.os: update logic for 64-bit symbol choice + +musl v1.2.4 dropped the "64"-suffixed aliases for legacy "LFS64" ("large +file support") interfaces, so this commit changes the corresponding Zig +logic to call the correct names. +--- a/lib/std/os.zig ++++ b/lib/std/os.zig +@@ -890,10 +890,7 @@ pub fn pread(fd: fd_t, buf: []u8, offset: u64) PReadError!usize { + }; + const adjusted_len = @min(max_count, buf.len); + +- const pread_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.pread64 +- else +- system.pread; ++ const pread_sym = if (lfs64_abi) system.pread64 else system.pread; + + const ioffset = @bitCast(i64, offset); // the OS treats this as unsigned + while (true) { +@@ -966,10 +963,7 @@ pub fn ftruncate(fd: fd_t, length: u64) TruncateError!void { + } + + while (true) { +- const ftruncate_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.ftruncate64 +- else +- system.ftruncate; ++ const ftruncate_sym = if (lfs64_abi) system.ftruncate64 else system.ftruncate; + + const ilen = @bitCast(i64, length); // the OS treats this as unsigned + switch (errno(ftruncate_sym(fd, ilen))) { +@@ -1034,10 +1028,7 @@ pub fn preadv(fd: fd_t, iov: []const iovec, offset: u64) PReadError!usize { + + const iov_count = math.cast(u31, iov.len) orelse math.maxInt(u31); + +- const preadv_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.preadv64 +- else +- system.preadv; ++ const preadv_sym = if (lfs64_abi) system.preadv64 else system.preadv; + + const ioffset = @bitCast(i64, offset); // the OS treats this as unsigned + while (true) { +@@ -1311,10 +1302,7 @@ pub fn pwrite(fd: fd_t, bytes: []const u8, offset: u64) PWriteError!usize { + }; + const adjusted_len = @min(max_count, bytes.len); + +- const pwrite_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.pwrite64 +- else +- system.pwrite; ++ const pwrite_sym = if (lfs64_abi) system.pwrite64 else system.pwrite; + + const ioffset = @bitCast(i64, offset); // the OS treats this as unsigned + while (true) { +@@ -1400,10 +1388,7 @@ pub fn pwritev(fd: fd_t, iov: []const iovec_const, offset: u64) PWriteError!usiz + } + } + +- const pwritev_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.pwritev64 +- else +- system.pwritev; ++ const pwritev_sym = if (lfs64_abi) system.pwritev64 else system.pwritev; + + const iov_count = if (iov.len > IOV_MAX) IOV_MAX else @intCast(u31, iov.len); + const ioffset = @bitCast(i64, offset); // the OS treats this as unsigned +@@ -1514,10 +1499,7 @@ pub fn openZ(file_path: [*:0]const u8, flags: u32, perm: mode_t) OpenError!fd_t + return open(mem.sliceTo(file_path, 0), flags, perm); + } + +- const open_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.open64 +- else +- system.open; ++ const open_sym = if (lfs64_abi) system.open64 else system.open; + + while (true) { + const rc = open_sym(file_path, flags, perm); +@@ -1730,10 +1712,7 @@ pub fn openatZ(dir_fd: fd_t, file_path: [*:0]const u8, flags: u32, mode: mode_t) + return openat(dir_fd, mem.sliceTo(file_path, 0), flags, mode); + } + +- const openat_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.openat64 +- else +- system.openat; ++ const openat_sym = if (lfs64_abi) system.openat64 else system.openat; + + while (true) { + const rc = openat_sym(dir_fd, file_path, flags, mode); +@@ -4117,10 +4096,7 @@ pub fn fstat(fd: fd_t) FStatError!Stat { + @compileError("fstat is not yet implemented on Windows"); + } + +- const fstat_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.fstat64 +- else +- system.fstat; ++ const fstat_sym = if (lfs64_abi) system.fstat64 else system.fstat; + + var stat = mem.zeroes(Stat); + switch (errno(fstat_sym(fd, &stat))) { +@@ -4176,10 +4152,7 @@ pub fn fstatatZ(dirfd: fd_t, pathname: [*:0]const u8, flags: u32) FStatAtError!S + return fstatatWasi(dirfd, mem.sliceTo(pathname), flags); + } + +- const fstatat_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.fstatat64 +- else +- system.fstatat; ++ const fstatat_sym = if (lfs64_abi) system.fstatat64 else system.fstatat; + + var stat = mem.zeroes(Stat); + switch (errno(fstatat_sym(dirfd, pathname, &stat, flags))) { +@@ -4416,10 +4389,7 @@ pub fn mmap( + fd: fd_t, + offset: u64, + ) MMapError![]align(mem.page_size) u8 { +- const mmap_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.mmap64 +- else +- system.mmap; ++ const mmap_sym = if (lfs64_abi) system.mmap64 else system.mmap; + + const ioffset = @bitCast(i64, offset); // the OS treats this as unsigned + const rc = mmap_sym(ptr, length, prot, flags, fd, ioffset); +@@ -4823,10 +4793,7 @@ pub fn lseek_SET(fd: fd_t, offset: u64) SeekError!void { + } + } + +- const lseek_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.lseek64 +- else +- system.lseek; ++ const lseek_sym = if (lfs64_abi) system.lseek64 else system.lseek; + + const ioffset = @bitCast(i64, offset); // the OS treats this as unsigned + switch (errno(lseek_sym(fd, ioffset, SEEK.SET))) { +@@ -4870,10 +4837,7 @@ pub fn lseek_CUR(fd: fd_t, offset: i64) SeekError!void { + else => |err| return unexpectedErrno(err), + } + } +- const lseek_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.lseek64 +- else +- system.lseek; ++ const lseek_sym = if (lfs64_abi) system.lseek64 else system.lseek; + + const ioffset = @bitCast(i64, offset); // the OS treats this as unsigned + switch (errno(lseek_sym(fd, ioffset, SEEK.CUR))) { +@@ -4917,10 +4881,7 @@ pub fn lseek_END(fd: fd_t, offset: i64) SeekError!void { + else => |err| return unexpectedErrno(err), + } + } +- const lseek_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.lseek64 +- else +- system.lseek; ++ const lseek_sym = if (lfs64_abi) system.lseek64 else system.lseek; + + const ioffset = @bitCast(i64, offset); // the OS treats this as unsigned + switch (errno(lseek_sym(fd, ioffset, SEEK.END))) { +@@ -4964,10 +4925,7 @@ pub fn lseek_CUR_get(fd: fd_t) SeekError!u64 { + else => |err| return unexpectedErrno(err), + } + } +- const lseek_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.lseek64 +- else +- system.lseek; ++ const lseek_sym = if (lfs64_abi) system.lseek64 else system.lseek; + + const rc = lseek_sym(fd, 0, SEEK.CUR); + switch (errno(rc)) { +@@ -6169,10 +6127,7 @@ pub fn sendfile( + // TODO we should not need this cast; improve return type of @min + const adjusted_count = @intCast(usize, adjusted_count_tmp); + +- const sendfile_sym = if (builtin.link_libc) +- system.sendfile64 +- else +- system.sendfile; ++ const sendfile_sym = if (lfs64_abi) system.sendfile64 else system.sendfile; + + while (true) { + var offset: off_t = @bitCast(off_t, in_offset); +@@ -7050,10 +7005,7 @@ pub fn prctl(option: PR, args: anytype) PrctlError!u31 { + pub const GetrlimitError = UnexpectedError; + + pub fn getrlimit(resource: rlimit_resource) GetrlimitError!rlimit { +- const getrlimit_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.getrlimit64 +- else +- system.getrlimit; ++ const getrlimit_sym = if (lfs64_abi) system.getrlimit64 else system.getrlimit; + + var limits: rlimit = undefined; + switch (errno(getrlimit_sym(resource, &limits))) { +@@ -7067,10 +7019,7 @@ pub fn getrlimit(resource: rlimit_resource) GetrlimitError!rlimit { + pub const SetrlimitError = error{ PermissionDenied, LimitTooBig } || UnexpectedError; + + pub fn setrlimit(resource: rlimit_resource, limits: rlimit) SetrlimitError!void { +- const setrlimit_sym = if (builtin.os.tag == .linux and builtin.link_libc) +- system.setrlimit64 +- else +- system.setrlimit; ++ const setrlimit_sym = if (lfs64_abi) system.setrlimit64 else system.setrlimit; + + switch (errno(setrlimit_sym(resource, &limits))) { + .SUCCESS => return, +@@ -7339,3 +7288,5 @@ pub fn ptrace(request: u32, pid: pid_t, addr: usize, signal: usize) PtraceError! + }, + }; + } ++ ++const lfs64_abi = builtin.os.tag == .linux and builtin.link_libc and builtin.abi.isGnu(); diff --git a/dev-lang/zig/zig-0.10.1-r2.ebuild b/dev-lang/zig/zig-0.10.1-r3.ebuild index 6200470dec94..b85fc3c95232 100644 --- a/dev-lang/zig/zig-0.10.1-r2.ebuild +++ b/dev-lang/zig/zig-0.10.1-r3.ebuild @@ -61,6 +61,7 @@ CHECKREQS_MEMORY="10G" PATCHES=( "${FILESDIR}/zig-0.10.0-build-dir-install-stage3.patch" + "${FILESDIR}/zig-0.10.1-musl-1.2.4-lfs64.patch" ) llvm_check_deps() { |