package/glorytun: fix aarch64 build with uclibc
PATCH 1/1 package/glorytun: fix aarch64 build with uclibc
Fix the following aarch64 build failure with uclibc:
mud/aegis256/aegis256.c:51:10: fatal error: sys/auxv.h: No such file or directory
51 | #include <sys/auxv.h>
| ^~~~~~~~~~~~
Fixes:
- http://autobuild.buildroot.org/results/4e1bbd72b9b7e0f9963f6693c3d7bc9a1d24fab4
--- .../0001-Add-support-for-Apple-silicon.patch | 51 +++++++++++++++++++ ...s256.c-fix-aarch64-build-with-uclibc.patch | 43 ++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 package/glorytun/0001-Add-support-for-Apple-silicon.patch create mode 100644 package/glorytun/0002-aegis256.c-fix-aarch64-build-with-uclibc.patch
package/glorytun/0001-Add-support-for-Apple-silicon.patch new file +51 -0
@@ -0,0 +1,51 @@ +From 577ae0352d191fa604f861ea2f0847e7c5eda617 Mon Sep 17 00:00:00 2001 +From: Frank Denis <[email protected]> +Date: Wed, 1 Jul 2020 22:51:43 +0200 +Subject: [PATCH] Add support for Apple silicon + +[Retrieved from: +https://github.com/angt/aegis256/commit/577ae0352d191fa604f861ea2f0847e7c5eda617] +Signed-off-by: Fabrice Fontaine <[email protected]> +--- + aegis256.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/mud/aegis256/aegis256.c b/mud/aegis256/aegis256.c +index 9a580bf..75a772c 100644 +--- a/mud/aegis256/aegis256.c ++++ b/mud/aegis256/aegis256.c +@@ -36,7 +36,7 @@ typedef __m128i x128; + #define store128(X,Y) _mm_storeu_si128((x128 *)(X), (Y)) + #define set2x64(X,Y) _mm_set_epi64x((long long)(X), (long long)(Y)) + +-#elif defined(__linux__) && (defined(__ARM_NEON_FP) || defined(__aarch64__)) ++#elif (defined(__APPLE__) || defined(__linux__)) && (defined(__ARM_NEON_FP) || defined(__aarch64__)) + + #ifdef __clang__ + #pragma clang attribute push (__attribute__((target("crypto"))),apply_to=function) +@@ -48,7 +48,9 @@ typedef __m128i x128; + #endif + + #ifdef __ARM_FEATURE_CRYPTO ++#ifdef __linux__ + #include <sys/auxv.h> ++#endif + #include <arm_neon.h> + + typedef uint8x16_t x128; +@@ -62,11 +64,15 @@ typedef uint8x16_t x128; + int + aegis256_is_available(void) + { ++#ifdef __linux__ + return (getauxval(AT_HWCAP) & HWCAP_AES) + #ifdef HWCAP2_AES + || (getauxval(AT_HWCAP2) & HWCAP2_AES) + #endif + ; ++#else // __APPLE__ ++ return 1; ++#endif + } + + #endif // __ARM_FEATURE_CRYPTO
package/glorytun/0002-aegis256.c-fix-aarch64-build-with-uclibc.patch new file +43 -0
43 lines not on this page · raw message
Signature · 6 lines
2.35.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Arnout Vandecappelle
AppliedQuoted 10 lines · Fabrice Fontaine
Fix the following aarch64 build failure with uclibc:
mud/aegis256/aegis256.c:51:10: fatal error:sys/auxv.h: No such file or directory51 | #include <sys/auxv.h> | ^~~~~~~~~~~~Fixes:
- http://autobuild.buildroot.org/results/4e1bbd72b9b7e0f9963f6693c3d7bc9a1d24fab4Signed-off-by Fabrice Fontaine <[email protected]>
Applied to master, thanks.
Regards,
Arnout
Quoted 103 lines
--- .../0001-Add-support-for-Apple-silicon.patch | 51 +++++++++++++++++++ ...s256.c-fix-aarch64-build-with-uclibc.patch | 43 ++++++++++++++++ 2 files changed, 94 insertions(+)create mode 100644
package/glorytun/0001-Add-support-for-Apple-silicon.patchcreate mode 100644package/glorytun/0002-aegis256.c-fix-aarch64-build-with-uclibc.patchpackage/glorytun/0001-Add-support-for-Apple-silicon.patch new file +51
-0@@ -0,0 +1,51 @@ +From 577ae0352d191fa604f861ea2f0847e7c5eda617 Mon Sep 17 00:00:00 2001 +From: Frank Denis <[email protected]> +Date: Wed, 1 Jul 2020 22:51:43 +0200 +Subject: [PATCH] Add support for Apple silicon + +[Retrieved from: +https://github.com/angt/aegis256/commit/577ae0352d191fa604f861ea2f0847e7c5eda617] +Signed-off-by: Fabrice Fontaine <[email protected]> +--- + aegis256.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/mud/aegis256/aegis256.c b/mud/aegis256/aegis256.c +index 9a580bf..75a772c 100644 +--- a/mud/aegis256/aegis256.c ++++ b/mud/aegis256/aegis256.c +@@ -36,7 +36,7 @@ typedef __m128i x128; + #define store128(X,Y) _mm_storeu_si128((x128 *)(X), (Y)) + #define set2x64(X,Y) _mm_set_epi64x((long long)(X), (long long)(Y)) + +-#elif defined(__linux__) && (defined(__ARM_NEON_FP) || defined(__aarch64__)) ++#elif (defined(__APPLE__) || defined(__linux__)) && (defined(__ARM_NEON_FP) || defined(__aarch64__)) + + #ifdef __clang__ + #pragma clang attribute push (__attribute__((target("crypto"))),apply_to=function) +@@ -48,7 +48,9 @@ typedef __m128i x128; + #endif + + #ifdef __ARM_FEATURE_CRYPTO ++#ifdef __linux__ + #include <sys/auxv.h> ++#endif + #include <arm_neon.h> + + typedef uint8x16_t x128; +@@ -62,11 +64,15 @@ typedef uint8x16_t x128; + int + aegis256_is_available(void) + { ++#ifdef __linux__ + return (getauxval(AT_HWCAP) & HWCAP_AES) + #ifdef HWCAP2_AES + || (getauxval(AT_HWCAP2) & HWCAP2_AES) + #endif + ; ++#else // __APPLE__ ++ return 1; ++#endif + } + + #endif // __ARM_FEATURE_CRYPTOpackage/glorytun/0002-aegis256.c-fix-aarch64-build-with-uclibc.patch new file +33
-0@@ -0,0 +1,43 @@ +From eb22e270a962d4a2da1972304fd8b1216211c9d1 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +Date: Sat, 16 Apr 2022 23:32:55 +0200 +Subject: [PATCH] aegis256.c: fix aarch64 build with uclibc + +Fix the following aarch64 build failure with uclibc: + +mud/aegis256/aegis256.c:51:10: fatal error: sys/auxv.h: No such file or directory + 51 | #include <sys/auxv.h> + | ^~~~~~~~~~~~ + +Fixes: + - http://autobuild.buildroot.org/results/4e1bbd72b9b7e0f9963f6693c3d7bc9a1d24fab4 + +Signed-off-by: Fabrice Fontaine <[email protected]> +[Retrieved from: +https://github.com/angt/aegis256/commit/eb22e270a962d4a2da1972304fd8b1216211c9d1] +--- + aegis256.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/mud/aegis256/aegis256.c b/mud/aegis256/aegis256.c +index 75a772c..4e73fab 100644 +--- a/mud/aegis256/aegis256.c ++++ b/mud/aegis256/aegis256.c +@@ -48,7 +48,7 @@ typedef __m128i x128; + #endif + + #ifdef __ARM_FEATURE_CRYPTO +-#ifdef __linux__ ++#if defined(__linux__) && __has_include("sys/auxv.h") + #include <sys/auxv.h> + #endif
package/glorytun/0002-aegis256.c-fix-aarch64-build-with-uclibc.patch line 43
Quoted 10 lines
package/glorytun/0002-aegis256.c-fix-aarch64-build-with-uclibc.patch new file +10
-0+ #include <arm_neon.h> +@@ -64,7 +64,7 @@ typedef uint8x16_t x128; + int + aegis256_is_available(void) + { +-#ifdef __linux__ ++#if defined(__linux__) && __has_include("sys/auxv.h") + return (getauxval(AT_HWCAP) & HWCAP_AES) + #ifdef HWCAP2_AES + || (getauxval(AT_HWCAP2) & HWCAP2_AES)
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Fabrice" == Fabrice Fontaine <[email protected]> writes:
Fix the following aarch64 build failure with uclibc:
mud/aegis256/aegis256.c:51:10: fatal error:sys/auxv.h: No such file or directory
51 | #include <sys/auxv.h>| ^~~~~~~~~~~~Fixes:
- http://autobuild.buildroot.org/results/4e1bbd72b9b7e0f9963f6693c3d7bc9a1d24fab4Signed-off-by Fabrice Fontaine <[email protected]>
Committed to 2022.02.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot