Skip to content

Commit 4972c98

Browse files
committed
compiler-rt: export __aeabi_read_tp for arm-freebsd
FreeBSD normally provides this symbol in libc, but it's in the FBSDprivate_1.0 namespace, so it doesn't get included in our abilists file. Fortunately, the implementation is identical for Linux and FreeBSD, so we can just provide it in compiler-rt. It's interesting to note that the same is not true for NetBSD where the implementation is more complex to support older Arm versions. But we do include the symbol in our abilists file for NetBSD libc, so that's fine. closes ziglang#25215
1 parent 6b8cef8 commit 4972c98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/compiler_rt/arm.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ comptime {
3737
@export(&__aeabi_memclr4, .{ .name = "__aeabi_memclr4", .linkage = common.linkage, .visibility = common.visibility });
3838
@export(&__aeabi_memclr8, .{ .name = "__aeabi_memclr8", .linkage = common.linkage, .visibility = common.visibility });
3939

40-
if (builtin.os.tag == .linux) {
40+
if (builtin.os.tag == .linux or builtin.os.tag == .freebsd) {
4141
@export(&__aeabi_read_tp, .{ .name = "__aeabi_read_tp", .linkage = common.linkage, .visibility = common.visibility });
4242
}
4343

0 commit comments

Comments
 (0)