aboutsummaryrefslogtreecommitdiff
path: root/lib/compiler_rt/log2.zig
diff options
context:
space:
mode:
authorCody Tapscott <topolarity@tapscott.me>2022-10-22 13:31:09 -0700
committerCody Tapscott <topolarity@tapscott.me>2022-10-22 17:19:33 -0700
commitc50f33b1118f2e81597bd9ef5976fcb3eb961dee (patch)
treebddc809af52345f073502e9d8a7acf43ffd14d6c /lib/compiler_rt/log2.zig
parent94945864b9d8ffa7b707432fb877ae42e383db68 (diff)
downloadzig-c50f33b1118f2e81597bd9ef5976fcb3eb961dee.tar.gz
zig-c50f33b1118f2e81597bd9ef5976fcb3eb961dee.zip
compiler_rt: Always export "standard" symbol names
The Zig LLVM backend emits calls to softfloat methods with the "standard compiler-rt" names. Rather than add complexity to the backend and have to synchronize the naming scheme across all targets, the simplest fix is just to export these symbols under both the "standard" and the platform-specific naming convention.
Diffstat (limited to 'lib/compiler_rt/log2.zig')
-rw-r--r--lib/compiler_rt/log2.zig6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/compiler_rt/log2.zig b/lib/compiler_rt/log2.zig
index 6f6c07212a..8298c3dbe3 100644
--- a/lib/compiler_rt/log2.zig
+++ b/lib/compiler_rt/log2.zig
@@ -19,8 +19,10 @@ comptime {
@export(log2f, .{ .name = "log2f", .linkage = common.linkage });
@export(log2, .{ .name = "log2", .linkage = common.linkage });
@export(__log2x, .{ .name = "__log2x", .linkage = common.linkage });
- const log2q_sym_name = if (common.want_ppc_abi) "log2f128" else "log2q";
- @export(log2q, .{ .name = log2q_sym_name, .linkage = common.linkage });
+ if (common.want_ppc_abi) {
+ @export(log2q, .{ .name = "log2f128", .linkage = common.linkage });
+ }
+ @export(log2q, .{ .name = "log2q", .linkage = common.linkage });
@export(log2l, .{ .name = "log2l", .linkage = common.linkage });
}