From d91fc0fdd8f42dc8c38347e1a0ec87fd583c1d3d Mon Sep 17 00:00:00 2001 From: Noam Preil Date: Sat, 26 Oct 2019 14:08:11 -0400 Subject: [PATCH] Don't use SSE on freestanding --- src/codegen.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/codegen.cpp b/src/codegen.cpp index c526c2bfd1..6ee36a72ea 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -8469,7 +8469,12 @@ static void init(CodeGen *g) { // uses as base cpu. // TODO https://github.com/ziglang/zig/issues/2883 target_specific_cpu_args = "pentium4"; - target_specific_features = ""; + if (g->zig_target->os == OsFreestanding) { + target_specific_features = "-sse"; + } + else { + target_specific_features = ""; + } } else { target_specific_cpu_args = ""; target_specific_features = "";