mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
Merge pull request 'link.Lld: pass --be8 to ld.lld for armeb/thumbeb for v6+' (#31489) from alexrp/zig:arm-be8 into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31489
This commit is contained in:
@@ -21,8 +21,8 @@ pub const available_libcs = [_]ArchOsAbi{
|
||||
.{ .arch = .arm, .os = .netbsd, .abi = .eabi, .os_ver = .{ .major = 1, .minor = 2, .patch = 0 } },
|
||||
.{ .arch = .arm, .os = .netbsd, .abi = .eabihf, .os_ver = .{ .major = 1, .minor = 2, .patch = 0 } },
|
||||
.{ .arch = .arm, .os = .openbsd, .abi = .eabi, .os_ver = .{ .major = 6, .minor = 1, .patch = 0 } },
|
||||
.{ .arch = .armeb, .os = .linux, .abi = .gnueabi, .os_ver = .{ .major = 2, .minor = 6, .patch = 0 } },
|
||||
.{ .arch = .armeb, .os = .linux, .abi = .gnueabihf, .os_ver = .{ .major = 2, .minor = 6, .patch = 0 } },
|
||||
.{ .arch = .armeb, .os = .linux, .abi = .gnueabi, .os_ver = .{ .major = 2, .minor = 6, .patch = 0 }, .glibc_triple = "armeb-linux-gnueabi-be8" },
|
||||
.{ .arch = .armeb, .os = .linux, .abi = .gnueabihf, .os_ver = .{ .major = 2, .minor = 6, .patch = 0 }, .glibc_triple = "armeb-linux-gnueabihf-be8" },
|
||||
.{ .arch = .armeb, .os = .linux, .abi = .musleabi, .os_ver = .{ .major = 2, .minor = 6, .patch = 0 } },
|
||||
.{ .arch = .armeb, .os = .linux, .abi = .musleabihf, .os_ver = .{ .major = 2, .minor = 6, .patch = 0 } },
|
||||
.{ .arch = .armeb, .os = .netbsd, .abi = .eabi, .os_ver = .{ .major = 1, .minor = 2, .patch = 0 } },
|
||||
|
||||
@@ -871,6 +871,11 @@ fn elfLink(lld: *Lld, arena: Allocator) !void {
|
||||
try std.fmt.allocPrint(arena, "-float-abi={s}", .{if (target.abi.float() == .hard) "hard" else "soft"}),
|
||||
});
|
||||
|
||||
switch (target.cpu.arch) {
|
||||
.armeb, .thumbeb => if (is_exe_or_dyn_lib and target.cpu.has(.arm, .has_v6)) try argv.append("--be8"),
|
||||
else => {},
|
||||
}
|
||||
|
||||
if (comp.config.lto != .none) {
|
||||
switch (comp.root_mod.optimize_mode) {
|
||||
.Debug => {},
|
||||
|
||||
Reference in New Issue
Block a user