-
-
Notifications
You must be signed in to change notification settings - Fork 97
arm-linux-musleabihf #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The linker args are ziglang/zig#4784 but I don't think are required to be fixed for this particular issue. Next steps:
|
With the following diff (which I will test and apply upstream): diff --git a/zig/src/link.cpp b/zig/src/link.cpp
index 693aaca0e..ed6275ec3 100644
--- a/zig/src/link.cpp
+++ b/zig/src/link.cpp
@@ -1947,15 +1947,11 @@ static void construct_linker_job_elf(LinkJob *lj) {
lj->args.append("-lpthread");
}
} else if (target_is_glibc(g->zig_target)) {
- if (target_supports_libunwind(g->zig_target)) {
- lj->args.append(build_libunwind(g, lj->build_dep_prog_node));
- }
+ lj->args.append(build_libunwind(g, lj->build_dep_prog_node));
add_glibc_libs(lj);
lj->args.append(get_libc_crt_file(g, "libc_nonshared.a", lj->build_dep_prog_node));
} else if (target_is_musl(g->zig_target)) {
- if (target_supports_libunwind(g->zig_target)) {
- lj->args.append(build_libunwind(g, lj->build_dep_prog_node));
- }
+ lj->args.append(build_libunwind(g, lj->build_dep_prog_node));
lj->args.append(build_musl(g, lj->build_dep_prog_node));
} else if (g->libcpp_link_lib != nullptr) {
lj->args.append(build_libunwind(g, lj->build_dep_prog_node));
diff --git a/zig/src/target.cpp b/zig/src/target.cpp
index 030721683..4430adfe5 100644
--- a/zig/src/target.cpp
+++ b/zig/src/target.cpp
@@ -1295,19 +1295,6 @@ const char *target_arch_musl_name(ZigLLVM_ArchType arch) {
}
}
-bool target_supports_libunwind(const ZigTarget *target) {
- switch (target->arch) {
- case ZigLLVM_arm:
- case ZigLLVM_armeb:
- case ZigLLVM_riscv32:
- case ZigLLVM_riscv64:
- return false;
- default:
- return true;
- }
- return true;
-}
-
bool target_libc_needs_crti_crtn(const ZigTarget *target) {
if (target->arch == ZigLLVM_riscv32 || target->arch == ZigLLVM_riscv64 || target_is_android(target)) {
return false;
diff --git a/zig/src/target.hpp b/zig/src/target.hpp
index c3f8530e0..898fa9020 100644
--- a/zig/src/target.hpp
+++ b/zig/src/target.hpp
@@ -119,7 +119,6 @@ bool target_supports_stack_probing(const ZigTarget *target);
bool target_supports_sanitize_c(const ZigTarget *target);
bool target_has_debug_info(const ZigTarget *target);
const char *target_arch_musl_name(ZigLLVM_ArchType arch);
-bool target_supports_libunwind(const ZigTarget *target);
uint32_t target_arch_pointer_bit_width(ZigLLVM_ArchType arch);
uint32_t target_arch_largest_atomic_bits(ZigLLVM_ArchType arch); The new problem is:
|
This diff gets past the problem (since we have tbl-gen from the host llvm we don't need to build tools or utilities): --- a/build
+++ b/build
@@ -53,6 +53,8 @@ cmake "$ROOTDIR/llvm" \
-DLLVM_TABLEGEN="$ROOTDIR/out/host/bin/llvm-tblgen" \
-DCLANG_TABLEGEN="$ROOTDIR/out/build-llvm-host/bin/clang-tblgen" \
-DLLVM_BUILD_TOOLS=OFF \
+ -DLLVM_INCLUDE_TOOLS=OFF \
+ -DLLVM_INCLUDE_UTILS=OFF \
-DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_INCLUDE_GO_TESTS=OFF \
-DLLVM_INCLUDE_EXAMPLES=OFF \ Now it gets to here, when configuring Zig:
|
Oops, that was a red herring. That actually caused Clang and LLD to not be built. So the only improvement is Next we apply ziglang/zig#4867 And next we get to actually a flaw in zig's self hosted code!
|
With ziglang/zig#4870 this is solved! |
The text was updated successfully, but these errors were encountered: