From c4470cfce965c6efaa24926c7040025694a9a63e Mon Sep 17 00:00:00 2001 From: Andrea Pappacoda Date: Thu, 13 Jan 2022 11:13:42 +0100 Subject: [PATCH] fix: do not force HARDFLOAT when using soft fp (#8) Fixes compilation on Debian armel, see https://buildd.debian.org/status/fetch.php?pkg=vixl&arch=armel&ver=5.1.0-1&stamp=1637517716&raw=0 Previously, Vixl would force hard float on all arm CPUs, by checking only for __arm__. This would cause GCC to throw an internal error when compiling with -mfloat-abi=soft. See also this example on Compiler Explorer: https://compiler-explorer.com/z/zsn5vaMna --- src/aarch32/instructions-aarch32.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aarch32/instructions-aarch32.h b/src/aarch32/instructions-aarch32.h index ff97d55e..e2c95d19 100644 --- a/src/aarch32/instructions-aarch32.h +++ b/src/aarch32/instructions-aarch32.h @@ -38,7 +38,7 @@ extern "C" { #include "utils-vixl.h" #include "aarch32/constants-aarch32.h" -#ifdef __arm__ +#if defined(__arm__) && !defined(__SOFTFP__) #define HARDFLOAT __attribute__((noinline, pcs("aapcs-vfp"))) #else #define HARDFLOAT __attribute__((noinline))