[experiment] mbedtls force ARM64 Neon even when macros say otherwise (#2793)
more of the mbedtls trying to make macro magic even through they do runtime checks Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2793 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
@@ -1,3 +1,16 @@
|
||||
diff --git a/library/aesni.h b/library/aesni.h
|
||||
index 754c984c79..59e27afd3e 100644
|
||||
--- a/library/aesni.h
|
||||
+++ b/library/aesni.h
|
||||
@@ -35,7 +35,7 @@
|
||||
/* GCC-like compilers: currently, we only support intrinsics if the requisite
|
||||
* target flag is enabled when building the library (e.g. `gcc -mpclmul -msse2`
|
||||
* or `clang -maes -mpclmul`). */
|
||||
-#if (defined(__GNUC__) || defined(__clang__)) && defined(__AES__) && defined(__PCLMUL__)
|
||||
+#if defined(__GNUC__) || defined(__clang__)
|
||||
#define MBEDTLS_AESNI_HAVE_INTRINSICS
|
||||
#endif
|
||||
/* For 32-bit, we only support intrinsics */
|
||||
diff --git a/library/aesni.c b/library/aesni.c
|
||||
index 2857068..3e104ab 100644
|
||||
--- a/library/aesni.c
|
||||
@@ -1,10 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 1811c42..bac9098 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
-cmake_minimum_required(VERSION 2.6)
|
||||
+cmake_minimum_required(VERSION 3.5)
|
||||
if(TEST_CPP)
|
||||
project("mbed TLS" C CXX)
|
||||
else()
|
||||
@@ -1,13 +0,0 @@
|
||||
diff --git a/library/aesni.h b/library/aesni.h
|
||||
index 754c984c79..59e27afd3e 100644
|
||||
--- a/library/aesni.h
|
||||
+++ b/library/aesni.h
|
||||
@@ -35,7 +35,7 @@
|
||||
/* GCC-like compilers: currently, we only support intrinsics if the requisite
|
||||
* target flag is enabled when building the library (e.g. `gcc -mpclmul -msse2`
|
||||
* or `clang -maes -mpclmul`). */
|
||||
-#if (defined(__GNUC__) || defined(__clang__)) && defined(__AES__) && defined(__PCLMUL__)
|
||||
+#if defined(__GNUC__) || defined(__clang__)
|
||||
#define MBEDTLS_AESNI_HAVE_INTRINSICS
|
||||
#endif
|
||||
/* For 32-bit, we only support intrinsics */
|
||||
20
.patch/mbedtls/0002-arm64-aes-fix.patch
Normal file
20
.patch/mbedtls/0002-arm64-aes-fix.patch
Normal file
@@ -0,0 +1,20 @@
|
||||
diff --git a/library/common.h b/library/common.h
|
||||
index 50f2a29..c60d9dc 100644
|
||||
--- a/library/common.h
|
||||
+++ b/library/common.h
|
||||
@@ -19,11 +19,11 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
-#if defined(__ARM_NEON)
|
||||
-#include <arm_neon.h>
|
||||
+#if defined(MBEDTLS_PLATFORM_IS_WINDOWS_ON_ARM64)
|
||||
+#include <arm64_neon.h.h>
|
||||
#define MBEDTLS_HAVE_NEON_INTRINSICS
|
||||
-#elif defined(MBEDTLS_PLATFORM_IS_WINDOWS_ON_ARM64)
|
||||
-#include <arm64_neon.h>
|
||||
+#elif defined(__ANDROID__) || defined(__ARM_NEON)
|
||||
+#include <arm_neon.h>
|
||||
#define MBEDTLS_HAVE_NEON_INTRINSICS
|
||||
#endif
|
||||
|
||||
4
externals/cpmfile.json
vendored
4
externals/cpmfile.json
vendored
@@ -103,8 +103,8 @@
|
||||
"artifact": "%TAG%.tar.bz2",
|
||||
"skip_updates": true,
|
||||
"patches": [
|
||||
"0002-aesni-fix.patch",
|
||||
"0003-aesni-fix.patch"
|
||||
"0001-aesni-fix.patch",
|
||||
"0002-arm64-aes-fix.patch"
|
||||
]
|
||||
},
|
||||
"enet": {
|
||||
|
||||
Reference in New Issue
Block a user