diff options
author | Khem Raj <raj.khem@gmail.com> | 2024-03-26 21:04:28 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-03-27 07:57:29 -0700 |
commit | 79fb44fa43a22e96fc53dec377bfe7ccd67bf7a7 (patch) | |
tree | b2e5c25801b442d59904a19959c77dedbbda6af5 | |
parent | b0ca28a7e01020b29b6c979ca128006009d8d04d (diff) | |
download | meta-openembedded-79fb44fa43a22e96fc53dec377bfe7ccd67bf7a7.tar.gz |
minifi-cpp: Fix libsodium build on aarch64/clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-extended/minifi-cpp/files/0008-libsodium-aarch64_crypto.patch | 38 | ||||
-rw-r--r-- | meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.15.0.bb | 1 |
2 files changed, 39 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/minifi-cpp/files/0008-libsodium-aarch64_crypto.patch b/meta-oe/recipes-extended/minifi-cpp/files/0008-libsodium-aarch64_crypto.patch new file mode 100644 index 000000000..c2c51148f --- /dev/null +++ b/meta-oe/recipes-extended/minifi-cpp/files/0008-libsodium-aarch64_crypto.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | Move target #pragma after arm_neon.h include | ||
2 | |||
3 | Fix per android/ndk#1945 | ||
4 | |||
5 | If the pragma is done before the header include, | ||
6 | when using clang compiler attribute may apply to the functions in arm_neon.h | ||
7 | |||
8 | Upstream-Status: Submitted [https://github.com/jedisct1/libsodium/pull/1321] | ||
9 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- a/thirdparty/libsodium-stable/src/libsodium/crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c | ||
12 | +++ b/thirdparty/libsodium-stable/src/libsodium/crypto_aead/aes256gcm/armcrypto/aead_aes256gcm_armcrypto.c | ||
13 | @@ -19,12 +19,6 @@ | ||
14 | #define __vectorcall | ||
15 | #endif | ||
16 | |||
17 | -#ifdef __clang__ | ||
18 | -#pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), apply_to = function) | ||
19 | -#elif defined(__GNUC__) | ||
20 | -#pragma GCC target("+simd+crypto") | ||
21 | -#endif | ||
22 | - | ||
23 | #ifndef __ARM_FEATURE_CRYPTO | ||
24 | #define __ARM_FEATURE_CRYPTO 1 | ||
25 | #endif | ||
26 | @@ -34,6 +28,12 @@ | ||
27 | |||
28 | #include <arm_neon.h> | ||
29 | |||
30 | +#ifdef __clang__ | ||
31 | +#pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), apply_to = function) | ||
32 | +#elif defined(__GNUC__) | ||
33 | +#pragma GCC target("+simd+crypto") | ||
34 | +#endif | ||
35 | + | ||
36 | #define ABYTES crypto_aead_aes256gcm_ABYTES | ||
37 | #define NPUBBYTES crypto_aead_aes256gcm_NPUBBYTES | ||
38 | #define KEYBYTES crypto_aead_aes256gcm_KEYBYTES | ||
diff --git a/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.15.0.bb b/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.15.0.bb index 0667fdaec..beb247c25 100644 --- a/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.15.0.bb +++ b/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.15.0.bb | |||
@@ -26,6 +26,7 @@ SRC_URI = "git://github.com/apache/nifi-minifi-cpp.git;protocol=https;branch=mai | |||
26 | file://0005-Pass-noline-flag-to-flex.patch \ | 26 | file://0005-Pass-noline-flag-to-flex.patch \ |
27 | file://0006-OsUtils.h-add-missing-header-cstdint-for-int64_t.patch \ | 27 | file://0006-OsUtils.h-add-missing-header-cstdint-for-int64_t.patch \ |
28 | file://0007-CMakeLists.txt-do-not-use-ccache.patch \ | 28 | file://0007-CMakeLists.txt-do-not-use-ccache.patch \ |
29 | file://0008-libsodium-aarch64_crypto.patch \ | ||
29 | file://systemd-volatile.conf \ | 30 | file://systemd-volatile.conf \ |
30 | file://sysvinit-volatile.conf \ | 31 | file://sysvinit-volatile.conf \ |
31 | " | 32 | " |