From ebab5288c3240fc3298e2d94954a7117e3a8d557 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 17 Jun 2022 18:22:11 -0700 Subject: [PATCH] compiler-rt: fix aeabi logic Before, compiler-rt would have the wrong symbols for ARM targets. --- lib/compiler_rt/common.zig | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/compiler_rt/common.zig b/lib/compiler_rt/common.zig index 2b7ef84764..6dc6ced926 100644 --- a/lib/compiler_rt/common.zig +++ b/lib/compiler_rt/common.zig @@ -4,7 +4,19 @@ const math = std.math; const is_test = builtin.is_test; pub const linkage: std.builtin.GlobalLinkage = if (builtin.is_test) .Internal else .Weak; -pub const want_aeabi = builtin.cpu.arch.isARM() or builtin.cpu.arch.isThumb(); +pub const want_aeabi = switch (builtin.abi) { + .eabi, + .eabihf, + .musleabi, + .musleabihf, + .gnueabi, + .gnueabihf, + => switch (builtin.cpu.arch) { + .arm, .armeb, .thumb, .thumbeb => true, + else => false, + }, + else => false, +}; pub const want_ppc_abi = builtin.cpu.arch.isPPC() or builtin.cpu.arch.isPPC64(); pub const want_msvc_abi = builtin.abi == .msvc; /// Example symbols: