[packages/mpich] - add x32 fix from debian-x32.org - rel 3

baggins baggins at pld-linux.org
Thu Jun 11 21:28:32 CEST 2015


commit 9af82eb269b63f58ca40c30de26736dd385bd06b
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Thu Jun 11 21:28:13 2015 +0200

    - add x32 fix from debian-x32.org
    - rel 3

 mpich.spec                    |  4 +++-
 x32-misdetected-as-i386.patch | 29 +++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)
---
diff --git a/mpich.spec b/mpich.spec
index 745ad6e..3c9ac83 100644
--- a/mpich.spec
+++ b/mpich.spec
@@ -2,13 +2,14 @@ Summary:	Portable MPI Model Implementation
 Summary(pl.UTF-8):	Przenośna implementacja standardu MPI
 Name:		mpich
 Version:	3.1.3
-Release:	2
+Release:	3
 License:	BSD-like
 Group:		Development/Libraries
 Source0:	http://www.mpich.org/static/downloads/%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	93cb17f91ac758cbf9174ecb03563778
 Patch0:		%{name}-sh.patch
 Patch1:		%{name}-opalink.patch
+Patch2:		x32-misdetected-as-i386.patch
 URL:		http://www.mpich.org/
 BuildRequires:	autoconf >= 2.63
 BuildRequires:	automake >= 1:1.12.3
@@ -72,6 +73,7 @@ Biblioteki statyczne MPICH.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 %{__libtoolize}
diff --git a/x32-misdetected-as-i386.patch b/x32-misdetected-as-i386.patch
new file mode 100644
index 0000000..8bf023d
--- /dev/null
+++ b/x32-misdetected-as-i386.patch
@@ -0,0 +1,29 @@
+--- mpich-3.1.orig/configure.ac
++++ mpich-3.1/configure.ac
+@@ -4434,7 +4434,7 @@ long int oldval = 10;
+ long int newval = 20;
+ char ret;
+ long int readval;
+-__asm__ __volatile__ ("lock; cmpxchgl %3, %1; sete %0"
++__asm__ __volatile__ ("push %%ecx; pop %%ecx; lock; cmpxchgl %3, %1; sete %0"
+ 	: "=q" (ret), "=m" (*p), "=a" (readval)
+ 	: "r" (newval), "m" (*p), "a" (oldval) : "memory");
+ return (compval == 20) ? 0 : -1;
+@@ -4454,12 +4454,12 @@ AC_MSG_CHECKING([for gcc __asm__ and AMD
+ AC_TRY_RUN([
+ int main(int argc, char *argv[])
+ {
+-long int compval = 10;
+-volatile long int *p = &compval;
+-long int oldval = 10;
+-long int newval = 20;
++long long int compval = 10;
++volatile long long int *p = &compval;
++long long int oldval = 10;
++long long int newval = 20;
+ char ret;
+-long int readval;
++long long int readval;
+ __asm__ __volatile__ ("lock; cmpxchgq %3, %1; sete %0"
+ 	: "=q" (ret), "=m" (*p), "=a" (readval)
+ 	: "r" (newval), "m" (*p), "a" (oldval) : "memory");
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mpich.git/commitdiff/9af82eb269b63f58ca40c30de26736dd385bd06b



More information about the pld-cvs-commit mailing list