From b02995eb36e9e7ab5c749392a6a1e6ae3844b5a9 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 18d758ca5e71..947b0e70001b 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -8465,7 +8465,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 = "";