mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-23 18:38:08 -07:00
* Backport fix for arm64 CPUs without crypto extensions
(needed for a keywording bug).
* Add information in patch / background on the problem
(including mentioning the need for an ebuild change,
in case e.g. another distro tries to pick it up,
and to remind us to try upstream it.)
* Add explicit flag-o-matic inherits accordingly.
See: 619cfe3dae
Bug: https://bugs.gentoo.org/778926
Bug: https://bugs.gentoo.org/766411
Signed-off-by: Sam James <sam@gentoo.org>
24 lines
1.0 KiB
Diff
24 lines
1.0 KiB
Diff
Don't assume all ARM CPUs have crypto extensions.
|
|
|
|
Requires an accompanying change in the ebuild to disable crypto
|
|
extensions (by passing -DABSL_ARCH_ARM_NO_CRYPTO). This could
|
|
be done by the build system instead in future.
|
|
|
|
https://bugs.gentoo.org/778926
|
|
--- /absl/random/internal/randen_hwaes.cc
|
|
+++ /absl/random/internal/randen_hwaes.cc
|
|
@@ -50,8 +50,11 @@
|
|
(defined(__ARM_NEON) && defined(__ARM_FEATURE_CRYPTO))
|
|
#define ABSL_RANDEN_HWAES_IMPL 1
|
|
|
|
-#elif ABSL_RANDOM_INTERNAL_AES_DISPATCH && !defined(__APPLE__) && \
|
|
- (defined(__GNUC__) && __GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ > 9)
|
|
+// When ABSL_ARCH_ARM_NO_CRYPTO is defined, then ARM CPU without
|
|
+// crypto extension is assumed.
|
|
+#elif !defined(ABSL_ARCH_ARM_NO_CRYPTO) && \
|
|
+ (ABSL_RANDOM_INTERNAL_AES_DISPATCH && !defined(__APPLE__) && \
|
|
+ (defined(__GNUC__) && __GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ > 9))
|
|
// ...or, on GCC, we can use an ASM directive to
|
|
// instruct the assember to allow crypto instructions.
|
|
#define ABSL_RANDEN_HWAES_IMPL 1
|