From 65ee7909b90fc593ffd1f89777ff019e824eafc9 Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Thu, 6 May 2021 19:01:46 +0200 Subject: stage2: Pass -mthumb when compiling C/C++ code Apparently the Clang driver requires this flag and ignores the target triple. --- src/Compilation.zig | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/Compilation.zig b/src/Compilation.zig index c779398b31..46fb5e575d 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -2608,6 +2608,10 @@ pub fn addCCArgs( } } + if (target.cpu.arch.isThumb()) { + try argv.append("-mthumb"); + } + if (comp.haveFramePointer()) { try argv.append("-fno-omit-frame-pointer"); } else { -- cgit v1.2.3