diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2018-11-27 21:06:35 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2018-11-27 21:06:35 -0500 |
| commit | 57f44eb2bd17fc0c4e9d09b8c8621867f784d2f0 (patch) | |
| tree | 51f46cdc8f8ea0f4e642d62b3bf8fce58034362e /src/analyze.cpp | |
| parent | 1fb15be05f1037aad53d2db32d13123363365d10 (diff) | |
| parent | dd2450b1b21809c3fe62920498c318fbe519f579 (diff) | |
| download | zig-57f44eb2bd17fc0c4e9d09b8c8621867f784d2f0.tar.gz zig-57f44eb2bd17fc0c4e9d09b8c8621867f784d2f0.zip | |
Merge branch 'freebsd2'
Tier 2 support for FreeBSD
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index e5679a21d5..2f4b173c5f 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -4591,7 +4591,10 @@ void find_libc_include_path(CodeGen *g) { fprintf(stderr, "Unable to determine libc include path. --libc-include-dir"); exit(1); } - } else if (g->zig_target.os == OsLinux || g->zig_target.os == OsMacOSX) { + } else if (g->zig_target.os == OsLinux || + g->zig_target.os == OsMacOSX || + g->zig_target.os == OsFreeBSD) + { g->libc_include_dir = get_posix_libc_include_path(); } else { fprintf(stderr, "Unable to determine libc include path.\n" @@ -4639,6 +4642,8 @@ void find_libc_lib_path(CodeGen *g) { } else if (g->zig_target.os == OsLinux) { g->libc_lib_dir = get_linux_libc_lib_path("crt1.o"); + } else if (g->zig_target.os == OsFreeBSD) { + g->libc_lib_dir = buf_create_from_str("/usr/lib"); } else { zig_panic("Unable to determine libc lib path."); } @@ -4651,6 +4656,8 @@ void find_libc_lib_path(CodeGen *g) { return; } else if (g->zig_target.os == OsLinux) { g->libc_static_lib_dir = get_linux_libc_lib_path("crtbegin.o"); + } else if (g->zig_target.os == OsFreeBSD) { + g->libc_static_lib_dir = buf_create_from_str("/usr/lib"); } else { zig_panic("Unable to determine libc static lib path."); } |
