From 78fec3719f73e75b5f8ba8e13de0a4f61499e557 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Sat, 6 Nov 2021 15:29:54 +0100 Subject: all: add target-features string to all targets This makes sure that the LLVM target features match the one generated by Clang: - This fixes a bug introduced when setting the target CPU for all targets: Cortex-M4 would now start using floating point operations while they were disabled in C. - This will make it possible in the future to inline C functions in Go and vice versa. This will need some more work though. There is a code size impact. Cortex-M4 targets are increased slightly in binary size while Cortex-M0 targets tend to be reduced a little bit. Other than that, there is little impact. --- targets/riscv.json | 1 + 1 file changed, 1 insertion(+) (limited to 'targets/riscv.json') diff --git a/targets/riscv.json b/targets/riscv.json index 4fe9af50b..8d9dbb265 100644 --- a/targets/riscv.json +++ b/targets/riscv.json @@ -8,6 +8,7 @@ "libc": "picolibc", "cflags": [ "-Werror", + "-mno-relax", "-fno-exceptions", "-fno-unwind-tables", "-ffunction-sections", "-fdata-sections" ], -- cgit v1.2.3