Skip to content

Commit 2116f2e

Browse files
committed
Compilation: Don't pass -mabi to Clang on powerpc64(le)-freebsd.
The driver doesn't support it, and FreeBSD 13+ on PPC64 uses ELFv2 anyway.
1 parent d3a6236 commit 2116f2e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Compilation.zig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5775,7 +5775,10 @@ pub fn addCCArgs(
57755775

57765776
if (target_util.llvmMachineAbi(target)) |mabi| {
57775777
// Clang's integrated Arm assembler doesn't support `-mabi` yet...
5778-
if (!(target.cpu.arch.isArm() and (ext == .assembly or ext == .assembly_with_cpp))) {
5778+
// Clang's FreeBSD driver doesn't support `-mabi` on PPC64 (ELFv2 is used anyway).
5779+
if (!(target.cpu.arch.isArm() and (ext == .assembly or ext == .assembly_with_cpp)) and
5780+
!(target.cpu.arch.isPowerPC64() and target.os.tag == .freebsd))
5781+
{
57795782
try argv.append(try std.fmt.allocPrint(arena, "-mabi={s}", .{mabi}));
57805783
}
57815784
}

0 commit comments

Comments
 (0)