authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-09-27 18:19:21-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-09-27 18:19:21-04:00
logce0e7940926ec4c4eeb95e2d5b67554de3863a56
tree7d53a374b7bd3266d33f175b9736d5665a566901
parent579301c2afc28137e67d5e6c894fe7970519ed3d
signaturelock-open Commit is signed but in an unrecognized format.

fix glibc builds on aarch64-linux-gnu

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

3 files changed, 4 insertions(+), 13 deletions(-)

lib/std/io/test.zig-9
......@@ -11,10 +11,6 @@ const fs = std.fs;
1111const File = std.fs.File;
1212
1313test "write a file, read it, then delete it" {
14 if (builtin.arch == .aarch64 and builtin.glibc_version != null) {
15 // TODO https://github.com/ziglang/zig/issues/3288
16 return error.SkipZigTest;
17 }
1814 var raw_bytes: [200 * 1024]u8 = undefined;
1915 var allocator = &std.heap.FixedBufferAllocator.init(raw_bytes[0..]).allocator;
2016
......@@ -611,11 +607,6 @@ test "c out stream" {
611607}
612608
613609test "File seek ops" {
614 if (builtin.arch == .aarch64 and builtin.glibc_version != null) {
615 // TODO https://github.com/ziglang/zig/issues/3288
616 return error.SkipZigTest;
617 }
618
619610 const tmp_file_name = "temp_test_file.txt";
620611 var file = try File.openWrite(tmp_file_name);
621612 defer {
lib/std/os/test.zig-4
......@@ -95,10 +95,6 @@ test "cpu count" {
9595}
9696
9797test "AtomicFile" {
98 if (builtin.arch == .aarch64 and builtin.glibc_version != null) {
99 // TODO https://github.com/ziglang/zig/issues/3288
100 return error.SkipZigTest;
101 }
10298 var buffer: [1024]u8 = undefined;
10399 const allocator = &std.heap.FixedBufferAllocator.init(buffer[0..]).allocator;
104100 const test_out_file = "tmp_atomic_file_test_dest.txt";
src/link.cpp+4
......@@ -820,6 +820,10 @@ static void glibc_add_include_dirs(CodeGen *parent, CFile *c_file) {
820820 }
821821
822822 if (parent->zig_target->os == OsLinux) {
823 c_file->args.append("-I");
824 c_file->args.append(path_from_libc(parent, "glibc" OS_SEP "sysdeps" OS_SEP
825 "unix" OS_SEP "sysv" OS_SEP "linux" OS_SEP "generic"));
826
823827 c_file->args.append("-I");
824828 c_file->args.append(path_from_libc(parent, "glibc" OS_SEP "sysdeps" OS_SEP
825829 "unix" OS_SEP "sysv" OS_SEP "linux" OS_SEP "include"));