summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2019-12-13 10:55:17 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2019-12-13 10:55:17 +0100
commitbbf139b9303dc6b712efb64157b947d1bfb48df2 (patch)
tree7955c6cc4e3b6ed7accf3314c3827d868accacc6
parent15e7409a6abae913bf58307c9db97c8d5846675a (diff)
downloadpackages-bbf139b9303dc6b712efb64157b947d1bfb48df2.tar.xz
community/z3: added trailing_zeroes32-intrinsic patch
-rw-r--r--community/z3/PKGBUILD12
-rw-r--r--community/z3/z3-z3-4.8.7-gnu-trailing_zeroes32-intrinsic.patch12
2 files changed, 24 insertions, 0 deletions
diff --git a/community/z3/PKGBUILD b/community/z3/PKGBUILD
new file mode 100644
index 00000000..d86a1c87
--- /dev/null
+++ b/community/z3/PKGBUILD
@@ -0,0 +1,12 @@
+# https://github.com/Z3Prover/z3/issues/2776
+# upstream fix for 32-bit intrinsics in GNU compiler
+source+=('z3-z3-4.8.7-gnu-trailing_zeroes32-intrinsic.patch')
+sha512sums+=('98495c9bd6aaa2c1f37fa7b3c0843b36a28148b711b44817ec375334e44690ff055d789d3e44fcdff7e58e0d9fdf8b547c194d401ce3b8aee17febbe584217ea')
+
+eval "$(
+ declare -f prepare | \
+ sed '
+ /cd/ a \
+ patch -Np1 -i "$srcdir/z3-z3-4.8.7-gnu-trailing_zeroes32-intrinsic.patch" \
+ '
+)"
diff --git a/community/z3/z3-z3-4.8.7-gnu-trailing_zeroes32-intrinsic.patch b/community/z3/z3-z3-4.8.7-gnu-trailing_zeroes32-intrinsic.patch
new file mode 100644
index 00000000..7cdb9ab9
--- /dev/null
+++ b/community/z3/z3-z3-4.8.7-gnu-trailing_zeroes32-intrinsic.patch
@@ -0,0 +1,12 @@
+diff -rauN z3-z3-4.8.7/src/util/mpz.cpp z3-z3-4.8.7-gnu-training_zeroes32-intrinsic-patch/src/util/mpz.cpp
+--- z3-z3-4.8.7/src/util/mpz.cpp 2019-11-19 21:58:44.000000000 +0100
++++ z3-z3-4.8.7-gnu-training_zeroes32-intrinsic-patch/src/util/mpz.cpp 2019-12-13 10:31:15.080120693 +0100
+@@ -72,6 +72,8 @@
+
+ #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;