From dd9cf0c2491a4288ef1c57bb9e8eeb4def6da7f4 Mon Sep 17 00:00:00 2001 From: Sebastian Poeplau Date: Fri, 15 Mar 2024 12:54:18 +0100 Subject: [PATCH] Use -mno-implicit-float for GNAT-LLVM instead of -mgeneral-regs-only GNAT-LLVM doesn't support the latter, which is a GCC-specific option. The behavior of "-mno-implicit-float" is slightly different with respect to explicit use of floating-point operations, but this isn't a concern in our runtimes. Issue: eng/toolchain/bb-runtimes#31 --- aarch64/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/aarch64/__init__.py b/aarch64/__init__.py index 35f8797b..4fae757b 100644 --- a/aarch64/__init__.py +++ b/aarch64/__init__.py @@ -84,7 +84,11 @@ def amend_rts(self, rts_profile, conf): # switch and does so by doing lazy context switches: this restores # the registers only when they are used by apps. This means that if # a FPU register is used out of context, then we're doomed. - conf.build_flags["common_gnarl_flags"] += ["-mgeneral-regs-only"] + conf.build_flags["common_gnarl_flags"] += [ + "-mgeneral-regs-only" + if not using_llvm_compiler() + else "-mno-implicit-float" + ] def dump_runtime_xml(self, rts_name, rts): cnt = super(Aarch64Target, self).dump_runtime_xml(rts_name, rts)