mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-05 12:38:09 -07:00
dev-cpp/abseil-cpp: backport fix for arm64 CPUs without crypto extensions
* 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>
This commit is contained in:
@@ -5,7 +5,7 @@ EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{7,8,9} )
|
||||
|
||||
inherit cmake python-any-r1
|
||||
inherit cmake flag-o-matic python-any-r1
|
||||
|
||||
DESCRIPTION="Abseil Common Libraries (C++), LTS Branch"
|
||||
HOMEPAGE="https://abseil.io"
|
||||
@@ -23,6 +23,10 @@ BDEPEND="${PYTHON_DEPS}"
|
||||
# requires source of gtest and other libs
|
||||
RESTRICT=test
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-20200923-arm_no_crypto.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
cmake_src_prepare
|
||||
|
||||
@@ -40,6 +44,13 @@ src_prepare() {
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
if use arm || use arm64; then
|
||||
# bug #778926
|
||||
if [[ $($(tc-getCXX) ${CXXFLAGS} -E -P - <<<$'#if defined(__ARM_FEATURE_CRYPTO)\nHAVE_ARM_FEATURE_CRYPTO\n#endif') != *HAVE_ARM_FEATURE_CRYPTO* ]]; then
|
||||
append-cxxflags -DABSL_ARCH_ARM_NO_CRYPTO
|
||||
fi
|
||||
fi
|
||||
|
||||
local mycmakeargs=(
|
||||
-DABSL_ENABLE_INSTALL=TRUE
|
||||
)
|
||||
|
||||
@@ -5,7 +5,7 @@ EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{7,8,9} )
|
||||
|
||||
inherit cmake python-any-r1 toolchain-funcs
|
||||
inherit cmake flag-o-matic python-any-r1 toolchain-funcs
|
||||
|
||||
# yes, it needs SOURCE, not just installed one
|
||||
GTEST_COMMIT="aee0f9d9b5b87796ee8a0ab26b7587ec30e8858e"
|
||||
@@ -59,6 +59,7 @@ src_prepare() {
|
||||
|
||||
src_configure() {
|
||||
if use arm || use arm64; then
|
||||
# bug #778926
|
||||
if [[ $($(tc-getCXX) ${CXXFLAGS} -E -P - <<<$'#if defined(__ARM_FEATURE_CRYPTO)\nHAVE_ARM_FEATURE_CRYPTO\n#endif') != *HAVE_ARM_FEATURE_CRYPTO* ]]; then
|
||||
append-cxxflags -DABSL_ARCH_ARM_NO_CRYPTO
|
||||
fi
|
||||
|
||||
@@ -5,7 +5,7 @@ EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{7,8,9} )
|
||||
|
||||
inherit cmake python-any-r1 toolchain-funcs
|
||||
inherit cmake flag-o-matic python-any-r1 toolchain-funcs
|
||||
|
||||
# yes, it needs SOURCE, not just installed one
|
||||
GTEST_COMMIT="aee0f9d9b5b87796ee8a0ab26b7587ec30e8858e"
|
||||
@@ -61,6 +61,7 @@ src_prepare() {
|
||||
|
||||
src_configure() {
|
||||
if use arm || use arm64; then
|
||||
# bug #778926
|
||||
if [[ $($(tc-getCXX) ${CXXFLAGS} -E -P - <<<$'#if defined(__ARM_FEATURE_CRYPTO)\nHAVE_ARM_FEATURE_CRYPTO\n#endif') != *HAVE_ARM_FEATURE_CRYPTO* ]]; then
|
||||
append-cxxflags -DABSL_ARCH_ARM_NO_CRYPTO
|
||||
fi
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
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 @@
|
||||
|
||||
Reference in New Issue
Block a user