[PATCH v2] arm: Don't require a runtime check function for targets with unconditional NEON

Martin Storsjö <[email protected]> Tue, 11 Oct 2022 18:46:57 +0300
Newsgroups gmane.comp.graphics.png.devel
Message-ID <[email protected]>
If the compiler is set up to unconditionally use NEON instructions
anywhere, we don't need any function for runtime detection.

This fixes building for non-Linux OSes with unconditionally
available NEON, such as iOS and Windows.
---
This is the minimal first step that fixes the issues I've seen.
---
 pngpriv.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pngpriv.h b/pngpriv.h
index 2e426cf47..b07726d4b 100644
--- a/pngpriv.h
+++ b/pngpriv.h
@@ -130,6 +130,7 @@
 #  if (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \
    defined(PNG_ALIGNED_MEMORY_SUPPORTED)
 #     define PNG_ARM_NEON_OPT 2
+#     undef PNG_ARM_NEON_CHECK_SUPPORTED
 #  else
 #     define PNG_ARM_NEON_OPT 0
 #  endif
-- 
2.37.0 (Apple Git-136)