mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 14:25:16 +00:00
fix glibc builds on aarch64-linux-gnu
There was a missing include path in the compilation line, leading to incorrect fstat ABI. closes #3291
This commit is contained in:
parent
579301c2af
commit
ce0e794092
@ -11,10 +11,6 @@ const fs = std.fs;
|
||||
const File = std.fs.File;
|
||||
|
||||
test "write a file, read it, then delete it" {
|
||||
if (builtin.arch == .aarch64 and builtin.glibc_version != null) {
|
||||
// TODO https://github.com/ziglang/zig/issues/3288
|
||||
return error.SkipZigTest;
|
||||
}
|
||||
var raw_bytes: [200 * 1024]u8 = undefined;
|
||||
var allocator = &std.heap.FixedBufferAllocator.init(raw_bytes[0..]).allocator;
|
||||
|
||||
@ -611,11 +607,6 @@ test "c out stream" {
|
||||
}
|
||||
|
||||
test "File seek ops" {
|
||||
if (builtin.arch == .aarch64 and builtin.glibc_version != null) {
|
||||
// TODO https://github.com/ziglang/zig/issues/3288
|
||||
return error.SkipZigTest;
|
||||
}
|
||||
|
||||
const tmp_file_name = "temp_test_file.txt";
|
||||
var file = try File.openWrite(tmp_file_name);
|
||||
defer {
|
||||
|
||||
@ -95,10 +95,6 @@ test "cpu count" {
|
||||
}
|
||||
|
||||
test "AtomicFile" {
|
||||
if (builtin.arch == .aarch64 and builtin.glibc_version != null) {
|
||||
// TODO https://github.com/ziglang/zig/issues/3288
|
||||
return error.SkipZigTest;
|
||||
}
|
||||
var buffer: [1024]u8 = undefined;
|
||||
const allocator = &std.heap.FixedBufferAllocator.init(buffer[0..]).allocator;
|
||||
const test_out_file = "tmp_atomic_file_test_dest.txt";
|
||||
|
||||
@ -820,6 +820,10 @@ static void glibc_add_include_dirs(CodeGen *parent, CFile *c_file) {
|
||||
}
|
||||
|
||||
if (parent->zig_target->os == OsLinux) {
|
||||
c_file->args.append("-I");
|
||||
c_file->args.append(path_from_libc(parent, "glibc" OS_SEP "sysdeps" OS_SEP
|
||||
"unix" OS_SEP "sysv" OS_SEP "linux" OS_SEP "generic"));
|
||||
|
||||
c_file->args.append("-I");
|
||||
c_file->args.append(path_from_libc(parent, "glibc" OS_SEP "sysdeps" OS_SEP
|
||||
"unix" OS_SEP "sysv" OS_SEP "linux" OS_SEP "include"));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user