zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit ce0e7940926ec4c4eeb95e2d5b67554de3863a56 (tree)
parent 579301c2afc28137e67d5e6c894fe7970519ed3d
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Fri, 27 Sep 2019 18:19:21 -0400

fix glibc builds on aarch64-linux-gnu

There was a missing include path in the compilation line, leading to
incorrect fstat ABI.

closes #3291

Diffstat:
Mlib/std/io/test.zig | 9---------
Mlib/std/os/test.zig | 4----
Msrc/link.cpp | 4++++
3 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/lib/std/io/test.zig b/lib/std/io/test.zig @@ -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 { diff --git a/lib/std/os/test.zig b/lib/std/os/test.zig @@ -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"; diff --git a/src/link.cpp b/src/link.cpp @@ -822,6 +822,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")); c_file->args.append("-I"); c_file->args.append(path_from_libc(parent, "glibc" OS_SEP "sysdeps" OS_SEP