Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev-libs/leveldb: patch 1.20 for cross-compilation to ARM #12745

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions dev-libs/leveldb/files/leveldb-1.20-sse-detect.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Some non-x86 compilers accept -msse4.2 as a flag but ignore it (because it
doesn't make sense for non-x86 machines), then fail when encountering any of
the relevant intrinsics. Include an intrinsic in the probe for support.

--- a/build_detect_platform
+++ b/build_detect_platform
@@ -225,7 +225,7 @@ EOF

# Test if gcc SSE 4.2 is supported
$CXX $CXXFLAGS -x c++ - -o $CXXOUTPUT -msse4.2 2>/dev/null <<EOF
- int main() {}
+ int main() { __builtin_ia32_crc32qi(0, 0); }
EOF
if [ "$?" = 0 ]; then
PLATFORM_SSEFLAGS="-msse4.2"

2 changes: 1 addition & 1 deletion dev-libs/leveldb/leveldb-1.20.ebuild
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ REQUIRED_USE="snappy? ( !static-libs )"

# https://github.com/google/leveldb/issues/234
# https://github.com/google/leveldb/issues/236
PATCHES=( "${FILESDIR}"/{${PN}-1.18-configure.patch,${P}-memenv-so.patch} )
PATCHES=( "${FILESDIR}"/{${PN}-1.18-configure.patch,${P}-memenv-so.patch,${P}-sse-detect.patch} )

src_configure() {
# These vars all get picked up by build_detect_platform