commit f9455511faba40ad719fa0e6897ea09ac5fb9d23 (tree)
parent 77c8f4b6713c5209f0cde62001b5995641f8bf60
Author: Alex Rønne Petersen <alex@alexrp.com>
Date: Sun, 25 Aug 2024 06:57:18 +0200
Compilation: Work around llvm/llvm-project#105972 by defining the macros.
https://github.com/llvm/llvm-project/issues/105972
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/Compilation.zig b/src/Compilation.zig
@@ -5765,6 +5765,13 @@ pub fn addCCArgs(
try argv.append("-mno-implicit-float");
}
+ // https://github.com/llvm/llvm-project/issues/105972
+ if (target.cpu.arch.isPowerPC() and target.floatAbi() == .soft) {
+ try argv.append("-D__NO_FPRS__");
+ try argv.append("-D_SOFT_FLOAT");
+ try argv.append("-D_SOFT_DOUBLE");
+ }
+
if (out_dep_path) |p| {
try argv.appendSlice(&[_][]const u8{ "-MD", "-MV", "-MF", p });
}