-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When no SIMD is found, configure must deactivate SIMD support #5631
Comments
So what's the output of |
I think this is basically a bug in [configuration of] the build tools (although we could add some logic to mitigate the problem). The natural workaround is to just pass --disable-simd to configure. |
Actually if they configured a default |
Apparently for some ARM archs you can disable simd with an march such as It doesn't appear to work on my armv8.3-a macbook M1:
|
Full log (config.log and Makefile included) when arm32le.h is selected: Full log (idem) when arm64le.h is selected (error at line 1179): I can't see what's causing it: |
This is bad: Lines 45 to 52 in 2d585e0
And wrong. [EDITED] In my example probably |
Everything looks correct: Neither |
See my post above. It is being defined by [EDITED] The diff --git a/src/arm64le.h b/src/arm64le.h
index a916cc053..258c9a720 100644
--- a/src/arm64le.h
+++ b/src/arm64le.h
@@ -47,9 +47,11 @@
* Tell our originally 32-bit ARM code that we sort of have NEON.
* Newer gcc does the same for us on its own, but older gcc needs help here.
*/
+#if __GNUC__ < 6
#ifndef __ARM_NEON
#define __ARM_NEON 1
#endif
+#endif
/*
* Give native vsel() a try with DES_BS=3, even though the timings are often
* such that it might be better to avoid its use, and DES_BS=1 might be better. |
See 142544a |
Oh, that explains it. But what exact CPU do you have a problem with? I would have thought any 64-bit ARM would support SIMD. Anyway I see no problem with applying that |
This piece is already within
I am not sure this is what we should do. Maybe the gcc version check is a better way. But we shouldn't need both. |
We “need” to use Android Studio (Android NDK) to some extent. So “in the beginning”, at least, it's x86 hardware. Without SIMD, the tests work just fine after a successful build. |
My comment on that hack included:
which reminds me of the reason why I added this - my other code in core (I think in So as an option we may completely drop this old hack and instead patch one line in #if defined(MBEDTLS_AESCE_HAVE_CODE)
/* Compiler version checks. */
#if defined(__clang__)
# if defined(MBEDTLS_ARCH_IS_ARM32) && (__clang_major__ < 11)
# error "Minimum version of Clang for MBEDTLS_AESCE_C on 32-bit Arm or Thumb is 11.0."
# elif defined(MBEDTLS_ARCH_IS_ARM64) && (__clang_major__ < 4)
# error "Minimum version of Clang for MBEDTLS_AESCE_C on aarch64 is 4.0."
# endif
#elif defined(__GNUC__)
# if __GNUC__ < 6
# error "Minimum version of GCC for MBEDTLS_AESCE_C is 6.0." In fact, I wonder whether we expose the above problem on older gcc by our exposure of NEON there, because a condition for having So maybe just drop our hack, and don't patch anything in Mbed-TLS, but do retest that AES-CE is still enabled where we previously tested that it was. Or alternatively we need to patch Mbed-TLS some more, also adding |
Not sure I understood all you said but FWIW my M1's native gcc defines both, plus
Using homebrew's gcc instead, I don't get
I tried building 32-bit but then the arch drops to 4T (?) and I can't link
Using homebrew's gcc-14, I don't even get that far
|
When no SIMD is found, configure should behave as if the user had set
--disable-simd
:That's not what's happening on Android.
The lines below will include the header even when SIMD is not supported (in my example).
john/src/pseudo_intrinsics.h
Lines 47 to 48 in f351721
The text was updated successfully, but these errors were encountered: