fix build on arm64

This commit is contained in:
Shawn Landden
2019-03-27 01:10:45 +00:00
parent 85575704a4
commit 65e234adfd
5 changed files with 41 additions and 13 deletions

View File

@@ -26,11 +26,12 @@ Buf *get_stage1_cache_path(void) {
}
static void detect_dynamic_linker(Buf *lib_path) {
#if defined(ZIG_OS_LINUX) && defined(ZIG_ARCH_X86_64)
if (buf_ends_with_str(lib_path, "ld-linux-x86-64.so.2")) {
buf_init_from_buf(&saved_dynamic_linker_path, lib_path);
} else if (buf_ends_with_str(lib_path, "ld-musl-x86-64.so.1")) {
buf_init_from_buf(&saved_dynamic_linker_path, lib_path);
#if defined(ZIG_OS_LINUX)
for (size_t i = 0; possible_ld_names[i] != NULL; i += 1) {
if (buf_ends_with_str(lib_path, possible_ld_names[i])) {
buf_init_from_buf(&saved_dynamic_linker_path, lib_path);
break;
}
}
#endif
}