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:
Andrew Kelley 2019-09-27 18:19:21 -04:00
parent 579301c2af
commit ce0e794092
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
3 changed files with 4 additions and 13 deletions

View File

@ -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 {

View File

@ -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";

View File

@ -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"));