authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-06-17 18:22:11-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-06-17 18:22:35-07:00
logebab5288c3240fc3298e2d94954a7117e3a8d557
treecfa167df3f982dcae59732114492a2a545bf3b2f
parent0556a2ba53b8bbb1a60ff31d8dcdde78a8b16727

compiler-rt: fix aeabi logic

Before, compiler-rt would have the wrong symbols for ARM targets.

1 files changed, 13 insertions(+), 1 deletions(-)

lib/compiler_rt/common.zig+13-1
...@@ -4,7 +4,19 @@ const math = std.math;...@@ -4,7 +4,19 @@ const math = std.math;
4const is_test = builtin.is_test;4const is_test = builtin.is_test;
55
6pub const linkage: std.builtin.GlobalLinkage = if (builtin.is_test) .Internal else .Weak;6pub const linkage: std.builtin.GlobalLinkage = if (builtin.is_test) .Internal else .Weak;
7pub const want_aeabi = builtin.cpu.arch.isARM() or builtin.cpu.arch.isThumb();7pub const want_aeabi = switch (builtin.abi) {
8 .eabi,
9 .eabihf,
10 .musleabi,
11 .musleabihf,
12 .gnueabi,
13 .gnueabihf,
14 => switch (builtin.cpu.arch) {
15 .arm, .armeb, .thumb, .thumbeb => true,
16 else => false,
17 },
18 else => false,
19};
8pub const want_ppc_abi = builtin.cpu.arch.isPPC() or builtin.cpu.arch.isPPC64();20pub const want_ppc_abi = builtin.cpu.arch.isPPC() or builtin.cpu.arch.isPPC64();
9pub const want_msvc_abi = builtin.abi == .msvc;21pub const want_msvc_abi = builtin.abi == .msvc;
10/// Example symbols:22/// Example symbols: