[packages/android-tools] - handle sse2 not enabled in mainline i686
qboosh
qboosh at pld-linux.org
Sun Sep 22 16:58:20 CEST 2024
commit 2ee1b6b40597012af6f0c4da814b3167f2365558
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Sep 22 17:01:21 2024 +0200
- handle sse2 not enabled in mainline i686
android-tools.spec | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
---
diff --git a/android-tools.spec b/android-tools.spec
index 346a21f..13243fa 100644
--- a/android-tools.spec
+++ b/android-tools.spec
@@ -1,7 +1,11 @@
#
# Conditional build:
%bcond_with system_libusb # system libusb library (ssplus support required)
+%bcond_with sse2 # SSE2 instructions
+%ifarch %{x8664} x32 pentium4
+%define with_sse2 1
+%endif
Summary: Android platform tools
Summary(pl.UTF-8): Narzędzia dla platformy Android
Name: android-tools
@@ -34,6 +38,9 @@ BuildRequires: udev-devel
BuildRequires: xz
BuildRequires: zlib-devel
BuildRequires: zstd-devel
+%ifarch %{ix86}
+Requires: cpuinfo(sse2)
+%endif
Requires: systemd-units >= 38
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -100,10 +107,17 @@ rmdir vendor/adb/docs/dev/adb_wifi_assets
export GO111MODULE=off
install -d build
cd build
+%ifarch %{ix86}
+%if %{with sse2}
+CFLAGS="%{rpmcflags} -msse2"
+CXXFLAGS="%{rpmcxxflags} -msse2"
+%endif
+%endif
%cmake .. \
%{!?with_system_libusb:-DANDROID_TOOLS_USE_BUNDLED_LIBUSB:BOOL=ON} \
-DANDROID_TOOLS_LIBUSB_ENABLE_UDEV:BOOL=ON \
- -DBUILD_SHARED_LIBS:BOOL=OFF
+ -DBUILD_SHARED_LIBS:BOOL=OFF \
+ %{!?with_sse2:-DOPENSSL_NO_ASM:BOOL=ON}
%{__make}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/android-tools.git/commitdiff/2ee1b6b40597012af6f0c4da814b3167f2365558
More information about the pld-cvs-commit
mailing list