zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit f02b93002c253e5f1e77d2f6c060b648d2dbbe26 (tree)
parent 31069984126ebd98b13aa3ef583871c5bd66d03f
Author: Alex Rønne Petersen <alex@alexrp.com>
Date:   Wed, 21 Aug 2024 14:21:29 +0200

compiler_rt: Export arm div helpers with correct names for thumb-linux-gnu.

Diffstat:
Mlib/compiler_rt/arm.zig | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lib/compiler_rt/arm.zig b/lib/compiler_rt/arm.zig @@ -2,6 +2,7 @@ //! This file includes all ARM-only functions. const std = @import("std"); const builtin = @import("builtin"); +const target = builtin.target; const arch = builtin.cpu.arch; const common = @import("common.zig"); @@ -14,11 +15,11 @@ comptime { @export(&__aeabi_unwind_cpp_pr1, .{ .name = "__aeabi_unwind_cpp_pr1", .linkage = common.linkage, .visibility = common.visibility }); @export(&__aeabi_unwind_cpp_pr2, .{ .name = "__aeabi_unwind_cpp_pr2", .linkage = common.linkage, .visibility = common.visibility }); - @export(&__aeabi_ldivmod, .{ .name = "__aeabi_ldivmod", .linkage = common.linkage, .visibility = common.visibility }); - @export(&__aeabi_uldivmod, .{ .name = "__aeabi_uldivmod", .linkage = common.linkage, .visibility = common.visibility }); + @export(&__aeabi_ldivmod, .{ .name = if (target.isMinGW()) "__rt_sdiv64" else "__aeabi_ldivmod", .linkage = common.linkage, .visibility = common.visibility }); + @export(&__aeabi_uldivmod, .{ .name = if (target.isMinGW()) "__rt_udiv64" else "__aeabi_uldivmod", .linkage = common.linkage, .visibility = common.visibility }); - @export(&__aeabi_idivmod, .{ .name = "__aeabi_idivmod", .linkage = common.linkage, .visibility = common.visibility }); - @export(&__aeabi_uidivmod, .{ .name = "__aeabi_uidivmod", .linkage = common.linkage, .visibility = common.visibility }); + @export(&__aeabi_idivmod, .{ .name = if (target.isMinGW()) "__rt_sdiv" else "__aeabi_idivmod", .linkage = common.linkage, .visibility = common.visibility }); + @export(&__aeabi_uidivmod, .{ .name = if (target.isMinGW()) "__rt_udiv" else "__aeabi_uidivmod", .linkage = common.linkage, .visibility = common.visibility }); @export(&__aeabi_memcpy, .{ .name = "__aeabi_memcpy", .linkage = common.linkage, .visibility = common.visibility }); @export(&__aeabi_memcpy4, .{ .name = "__aeabi_memcpy4", .linkage = common.linkage, .visibility = common.visibility });