summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <awilcox@wilcox-tech.com>2020-06-19 22:54:45 +0000
committerA. Wilcox <awilcox@wilcox-tech.com>2020-06-19 22:54:45 +0000
commitdc3b4f9e3104dc06e72229f36726f6c8cbb5b8da (patch)
treeae07ed256bef48692e90a02c709214f6117a34db
parent1cacafa78c61834f07abdf5de9fbb7ab6d63a620 (diff)
parentbf59364ccef65000e448eaae4791efc630e10a09 (diff)
downloadpackages-dc3b4f9e3104dc06e72229f36726f6c8cbb5b8da.tar.gz
packages-dc3b4f9e3104dc06e72229f36726f6c8cbb5b8da.tar.bz2
packages-dc3b4f9e3104dc06e72229f36726f6c8cbb5b8da.tar.xz
packages-dc3b4f9e3104dc06e72229f36726f6c8cbb5b8da.zip
Merge branch 'fix/z3-pmmx' into 'master'
user/z3: fix build on pmmx See merge request adelie/packages!472
-rw-r--r--user/z3/APKBUILD13
-rw-r--r--user/z3/_trailing_zeros32.patch23
2 files changed, 33 insertions, 3 deletions
diff --git a/user/z3/APKBUILD b/user/z3/APKBUILD
index adac93a71..262a7f530 100644
--- a/user/z3/APKBUILD
+++ b/user/z3/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=z3
pkgver=4.8.7
-pkgrel=0
+pkgrel=1
pkgdesc="Mathematical theorem prover"
url=" "
arch="all"
@@ -10,9 +10,15 @@ license="MIT"
depends=""
makedepends="gmp-dev python3-dev cmd:which"
subpackages="$pkgname-dev py3-$pkgname:py3:noarch"
-source="https://github.com/Z3Prover/z3/archive/z3-$pkgver.tar.gz"
+source="https://github.com/Z3Prover/z3/archive/z3-$pkgver.tar.gz
+ _trailing_zeros32.patch
+ "
builddir="$srcdir/z3-z3-$pkgver"
+case "$CARCH" in
+pmmx) options="$options textrels";;
+esac
+
build() {
PYTHON=python3 ./configure \
--prefix=/usr \
@@ -37,4 +43,5 @@ py3() {
mv "$pkgdir"/usr/lib/python3* "$subpkgdir"/usr/lib/
}
-sha512sums="145e2b2f1fa4edd0917107c7e1d54d779c7ed85c48af2ce6def4c90d1c4db05f74c9657e173cedf48770589fbe484c97fa1923295271cd3792523ffc4f67ed0c z3-4.8.7.tar.gz"
+sha512sums="145e2b2f1fa4edd0917107c7e1d54d779c7ed85c48af2ce6def4c90d1c4db05f74c9657e173cedf48770589fbe484c97fa1923295271cd3792523ffc4f67ed0c z3-4.8.7.tar.gz
+6cf6ee35b23f9ef9fe879369a1900c82d38836f245e927f0f80eb6361e3340c32c8b94f00b1cb69eb8cad1626675b8f7b9bdaecffa5072cd5e8b12ecf1e7e3c0 _trailing_zeros32.patch"
diff --git a/user/z3/_trailing_zeros32.patch b/user/z3/_trailing_zeros32.patch
new file mode 100644
index 000000000..05b977f51
--- /dev/null
+++ b/user/z3/_trailing_zeros32.patch
@@ -0,0 +1,23 @@
+From e212159f4e941c78fc03239e0884f2f0454f581f Mon Sep 17 00:00:00 2001
+From: Nikolaj Bjorner <nbjorner@microsoft.com>
+Date: Wed, 20 Nov 2019 15:01:04 -0800
+Subject: [PATCH] fix #2727
+
+Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
+---
+ src/util/mpz.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/util/mpz.cpp b/src/util/mpz.cpp
+index a8190df1b0..9c2d3d5ffb 100644
+--- a/src/util/mpz.cpp
++++ b/src/util/mpz.cpp
+@@ -72,6 +72,8 @@ inline uint64_t _trailing_zeros64(uint64_t x) {
+
+ #if defined(_WINDOWS) && !defined(_M_ARM) && !defined(_M_ARM64)
+ // _trailing_zeros32 already defined using intrinsics
++#elif defined(__GNUC__)
++// _trailing_zeros32 already defined using intrinsics
+ #else
+ inline uint32_t _trailing_zeros32(uint32_t x) {
+ uint32_t r = 0;