authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-03-13 04:25:58+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-03-13 14:58:12+01:00
log05c059e563d88e277cbfb723449778c73ad94f8b
treeec30ab6ce71017956366ed5272cf7457f80c6848
parentbc67a49c5c6c1a9b9eca8597b7dccc7b4b5ed49d
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

link.Lld: pass --be8 to ld.lld for armeb/thumbeb v6+

BE32 is deprecated and only supported by older cores and some v6 cores. All cores v6 or newer support BE8, so default to that for v6+. closes https://codeberg.org/ziglang/zig/issues/31404

1 files changed, 5 insertions(+), 0 deletions(-)

src/link/Lld.zig+5
...@@ -871,6 +871,11 @@ fn elfLink(lld: *Lld, arena: Allocator) !void {...@@ -871,6 +871,11 @@ fn elfLink(lld: *Lld, arena: Allocator) !void {
871 try std.fmt.allocPrint(arena, "-float-abi={s}", .{if (target.abi.float() == .hard) "hard" else "soft"}),871 try std.fmt.allocPrint(arena, "-float-abi={s}", .{if (target.abi.float() == .hard) "hard" else "soft"}),
872 });872 });
873873
874 switch (target.cpu.arch) {
875 .armeb, .thumbeb => if (is_exe_or_dyn_lib and target.cpu.has(.arm, .has_v6)) try argv.append("--be8"),
876 else => {},
877 }
878
874 if (comp.config.lto != .none) {879 if (comp.config.lto != .none) {
875 switch (comp.root_mod.optimize_mode) {880 switch (comp.root_mod.optimize_mode) {
876 .Debug => {},881 .Debug => {},