[cryptominisat] FPU handling is x86 specific set library path so the test is run
Dan Horák
sharkcz at fedoraproject.org
Mon Dec 19 10:53:59 UTC 2011
commit 12bb101e73aacba99648ba3ffb695273a83fb2e4
Author: Dan Horák <dan at danny.cz>
Date: Mon Dec 19 11:53:58 2011 +0100
FPU handling is x86 specific
set library path so the test is run
cryptominisat-x86.patch | 12 ++++++++++++
cryptominisat.spec | 11 +++++++++--
2 files changed, 21 insertions(+), 2 deletions(-)
---
diff --git a/cryptominisat-x86.patch b/cryptominisat-x86.patch
new file mode 100644
index 0000000..df0b237
--- /dev/null
+++ b/cryptominisat-x86.patch
@@ -0,0 +1,12 @@
+diff -up cryptominisat-2.9.1/Solver/Main.cpp.x86 cryptominisat-2.9.1/Solver/Main.cpp
+--- cryptominisat-2.9.1/Solver/Main.cpp.x86 2011-12-19 11:38:13.000000000 +0100
++++ cryptominisat-2.9.1/Solver/Main.cpp 2011-12-19 11:38:40.000000000 +0100
+@@ -645,7 +645,7 @@ FILE* Main::openOutputFile()
+
+ void Main::setDoublePrecision(const uint32_t verbosity)
+ {
+- #if defined(__linux__)
++ #if defined(__linux__) && (defined(__i386__) || defined(__x86_64__))
+ fpu_control_t oldcw, newcw;
+ _FPU_GETCW(oldcw);
+ newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE;
diff --git a/cryptominisat.spec b/cryptominisat.spec
index f364a82..aa44ce4 100644
--- a/cryptominisat.spec
+++ b/cryptominisat.spec
@@ -1,6 +1,6 @@
Name: cryptominisat
Version: 2.9.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: SAT solver
# Some source files were borrowed from minisat2, which is MIT-licensed.
@@ -15,6 +15,8 @@ Source1: %{name}.1
# This patch was sent upstream 7 Dec 2011. It converts calls to exit() inside
# the library into either boolean return codes or exceptions.
Patch0: %{name}-exit.patch
+# FPU handling is x86 specific
+Patch1: %{name}-x86.patch
BuildRequires: zlib-devel
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
@@ -46,6 +48,7 @@ The %{name} library.
%prep
%setup -q
%patch0
+%patch1 -p1
%build
%configure --disable-static
@@ -66,7 +69,7 @@ sed "s/@VERSION@/%{version}/" %{SOURCE1} > $RPM_BUILD_ROOT%{_mandir}/man1/%{name
%check
cd tests
set +e
-../cryptominisat --nosolprint --verbosity=1 AProVE09-12.cnf.gz
+LD_LIBRARY_PATH=../Solver/.libs ../cryptominisat --nosolprint --verbosity=1 AProVE09-12.cnf.gz
[ $? = 10 ]
%post -p /sbin/ldconfig
@@ -86,5 +89,9 @@ set +e
%{_libdir}/lib%{name}-%{version}.so
%changelog
+* Mon Dec 19 2011 Dan Horák <dan[at]danny.cz> - 2.9.1-2
+- FPU handling is x86 specific
+- set library path so the test is run
+
* Wed Dec 7 2011 Jerry James <loganjerry at gmail.com> - 2.9.1-1
- Initial RPM
More information about the scm-commits
mailing list