From 193a92630170582c8c7b28432c8a65a80e6ef0b3 Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Fri, 14 May 2021 18:41:16 +0200 Subject: [PATCH] stage2: Force Clang to use LLVM's assembler for SPARC targets This change allows cross-compiling C code for SPARC, if you hit any error with the internal assembler please open a ticket. --- src/Compilation.zig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Compilation.zig b/src/Compilation.zig index 140e160b69..6a73bd9ca9 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -2695,6 +2695,12 @@ pub fn addCCArgs( try argv.appendSlice(&[_][]const u8{ "-MD", "-MV", "-MF", p }); } + if (target.cpu.arch.isSPARC()) { + // Clang defaults to using the system assembler over the internal one + // when targeting a non-BSD OS. + try argv.append("-integrated-as"); + } + if (target.os.tag == .freestanding) { try argv.append("-ffreestanding"); }