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;...@@ -11,10 +11,6 @@ const fs = std.fs;
11const File = std.fs.File;11const File = std.fs.File;
1212
13test "write a file, read it, then delete it" {13test "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 }
18 var raw_bytes: [200 * 1024]u8 = undefined;14 var raw_bytes: [200 * 1024]u8 = undefined;
19 var allocator = &std.heap.FixedBufferAllocator.init(raw_bytes[0..]).allocator;15 var allocator = &std.heap.FixedBufferAllocator.init(raw_bytes[0..]).allocator;
2016
...@@ -611,11 +607,6 @@ test "c out stream" {...@@ -611,11 +607,6 @@ test "c out stream" {
611}607}
612608
613test "File seek ops" {609test "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
619 const tmp_file_name = "temp_test_file.txt";610 const tmp_file_name = "temp_test_file.txt";
620 var file = try File.openWrite(tmp_file_name);611 var file = try File.openWrite(tmp_file_name);
621 defer {612 defer {
lib/std/os/test.zig-4
...@@ -95,10 +95,6 @@ test "cpu count" {...@@ -95,10 +95,6 @@ test "cpu count" {
95}95}
9696
97test "AtomicFile" {97test "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 }
102 var buffer: [1024]u8 = undefined;98 var buffer: [1024]u8 = undefined;
103 const allocator = &std.heap.FixedBufferAllocator.init(buffer[0..]).allocator;99 const allocator = &std.heap.FixedBufferAllocator.init(buffer[0..]).allocator;
104 const test_out_file = "tmp_atomic_file_test_dest.txt";100 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) {...@@ -820,6 +820,10 @@ static void glibc_add_include_dirs(CodeGen *parent, CFile *c_file) {
820 }820 }
821821
822 if (parent->zig_target->os == OsLinux) {822 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
823 c_file->args.append("-I");827 c_file->args.append("-I");
824 c_file->args.append(path_from_libc(parent, "glibc" OS_SEP "sysdeps" OS_SEP828 c_file->args.append(path_from_libc(parent, "glibc" OS_SEP "sysdeps" OS_SEP
825 "unix" OS_SEP "sysv" OS_SEP "linux" OS_SEP "include"));829 "unix" OS_SEP "sysv" OS_SEP "linux" OS_SEP "include"));