From 0afa3f06a1b68ac6b7072f99a1253bc3dd0f8319 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Sun, 25 Apr 2021 23:18:02 -0400 Subject: [PATCH] COMP: Make floating point exceptions a no-op with MUSL, Linux, ARMv8 MUSL does not have floating point exceptions like GLIBC, discussed: https://wiki.musl-libc.org/functional-differences-from-glibc.html#Floating-point-exceptions --- .../Core/Common/src/itkFloatingPointExceptions_unix.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Modules/Core/Common/src/itkFloatingPointExceptions_unix.cxx b/Modules/Core/Common/src/itkFloatingPointExceptions_unix.cxx index 4304f444b0e..cbf3556625b 100644 --- a/Modules/Core/Common/src/itkFloatingPointExceptions_unix.cxx +++ b/Modules/Core/Common/src/itkFloatingPointExceptions_unix.cxx @@ -59,6 +59,13 @@ # define ITK_FEENABLEEXCEPT_NOOP #endif +// We do not have ITK_HAS_FEENABLEEXCEPT, and we do not have a workaround +// implemented, e.g. ARMv8 with MUSL +#if !defined(ITK_HAS_FEENABLEEXCEPT) && !defined(__ppc__) && !defined(__ppc64__) && !defined(__i386__) && \ + !defined(__x86_64__) +# define ITK_FEENABLEEXCEPT_NOOP +#endif + #if defined(__APPLE__) # include "TargetConditionals.h" # if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR || TARGET_CPU_ARM64