[gmp] temporary build wild old compatibility library version
pschiffe
pschiffe at fedoraproject.org
Mon Sep 26 10:21:41 UTC 2011
commit b5ddff42ca27051d5e1f190006d2f5dc9da900b5
Author: Peter Schiffer <pschiffe at redhat.com>
Date: Mon Sep 26 12:18:06 2011 +0200
temporary build wild old compatibility library version
gmp-4.0.1-s390-old.patch | 59 ++++++++++++++++++++++++++++++++++
gmp-4.3.2.tar.bz2 | Bin 0 -> 1897483 bytes
gmp.spec | 79 +++++++++++++++++++++++++++++++++++++++++++++-
3 files changed, 137 insertions(+), 1 deletions(-)
---
diff --git a/gmp-4.0.1-s390-old.patch b/gmp-4.0.1-s390-old.patch
new file mode 100644
index 0000000..c7afefc
--- /dev/null
+++ b/gmp-4.0.1-s390-old.patch
@@ -0,0 +1,59 @@
+diff -up gmp-4.3.1/configure.in.s390 gmp-4.3.1/configure.in
+--- gmp-4.3.1/configure.in.s390 2009-05-12 08:12:12.000000000 +0200
++++ gmp-4.3.1/configure.in 2009-05-28 14:59:54.000000000 +0200
+@@ -1066,6 +1066,11 @@ case $host in
+ ;;
+
+
++ s390x-*-*)
++ gcc_cflags="-g -O2 $fomit_frame_pointer"
++ path="s390x"
++ #extra_functions="udiv_w_sdiv"
++ ;;
+ # IBM s/370 and similar
+ [s3[6-9]0*-*-*])
+ gcc_cflags="$gcc_cflags $fomit_frame_pointer"
+diff -up gmp-4.3.1/mpn/s390/gmp-mparam.h.s390 gmp-4.3.1/mpn/s390/gmp-mparam.h
+--- gmp-4.3.1/mpn/s390/gmp-mparam.h.s390 2009-05-12 08:12:12.000000000 +0200
++++ gmp-4.3.1/mpn/s390/gmp-mparam.h 2009-05-28 14:59:54.000000000 +0200
+@@ -18,7 +18,8 @@ You should have received a copy of the G
+ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
+
+
+-/* BITS_PER_MP_LIMB etc generated by configure */
++#define BITS_PER_MP_LIMB 32
++#define BYTES_PER_MP_LIMB 4
+
+
+ /* Generated by tuneup.c, 2001-12-03, gcc 2.95 */
+diff -up /dev/null gmp-4.3.1/mpn/s390x/gmp-mparam.h
+--- /dev/null 2009-05-25 10:38:12.683001420 +0200
++++ gmp-4.3.1/mpn/s390x/gmp-mparam.h 2009-05-28 14:59:54.000000000 +0200
+@@ -0,0 +1,27 @@
++/* gmp-mparam.h -- Compiler/machine parameter header file.
++
++Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc.
++
++This file is part of the GNU MP Library.
++
++The GNU MP Library is free software; you can redistribute it and/or modify
++it under the terms of the GNU Library General Public License as published by
++the Free Software Foundation; either version 2 of the License, or (at your
++option) any later version.
++
++The GNU MP Library is distributed in the hope that it will be useful, but
++WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
++or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
++License for more details.
++
++You should have received a copy of the GNU Library General Public License
++along with the GNU MP Library; see the file COPYING.LIB. If not, write to
++the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
++MA 02111-1307, USA. */
++
++#define BITS_PER_MP_LIMB 64
++#define BYTES_PER_MP_LIMB 8
++#define BITS_PER_LONGINT 64
++#define BITS_PER_INT 32
++#define BITS_PER_SHORTINT 16
++#define BITS_PER_CHAR 8
diff --git a/gmp-4.3.2.tar.bz2 b/gmp-4.3.2.tar.bz2
new file mode 100644
index 0000000..5892471
Binary files /dev/null and b/gmp-4.3.2.tar.bz2 differ
diff --git a/gmp.spec b/gmp.spec
index 4e01f3f..27e209b 100644
--- a/gmp.spec
+++ b/gmp.spec
@@ -6,13 +6,15 @@
Summary: A GNU arbitrary precision library
Name: gmp
Version: 5.0.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Epoch: 1
URL: http://gmplib.org/
Source0: ftp://ftp.gnu.org/pub/gnu/gmp/gmp-%{version}.tar.bz2
Source2: gmp.h
Source3: gmp-mparam.h
+Source4: gmp-4.3.2.tar.bz2
Patch0: gmp-4.0.1-s390.patch
+Patch1: gmp-4.0.1-s390-old.patch
License: LGPLv3+
Group: System Environment/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -57,6 +59,12 @@ in applications.
%prep
%setup -q
%patch0 -p1 -b .s390
+cd ..
+rm -rf gmp-4.3.2
+tar xjf %SOURCE4
+cd gmp-4.3.2
+/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+%patch1 -p1 -b .s390
%build
autoreconf -if
@@ -120,6 +128,70 @@ make CFLAGS="$RPM_OPT_FLAGS -march=pentium4" %{?_smp_mflags}
unset CFLAGS
cd ..
%endif
+###################
+cd ..
+cd gmp-4.3.2
+autoreconf -if
+if as --help | grep -q execstack; then
+ # the object files do not require an executable stack
+ export CCAS="gcc -c -Wa,--noexecstack"
+fi
+mkdir base
+cd base
+ln -s ../configure .
+./configure --build=%{_build} --host=%{_host} \
+ --program-prefix=%{?_program_prefix} \
+ --prefix=%{_prefix} \
+ --exec-prefix=%{_exec_prefix} \
+ --bindir=%{_bindir} \
+ --sbindir=%{_sbindir} \
+ --sysconfdir=%{_sysconfdir} \
+ --datadir=%{_datadir} \
+ --includedir=%{_includedir} \
+ --libdir=%{_libdir} \
+ --libexecdir=%{_libexecdir} \
+ --localstatedir=%{_localstatedir} \
+ --sharedstatedir=%{_sharedstatedir} \
+ --mandir=%{_mandir} \
+ --infodir=%{_infodir} \
+ --enable-mpbsd --enable-cxx
+sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
+ -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
+ -e 's|-lstdc++ -lm|-lstdc++|' \
+ -i libtool
+export LD_LIBRARY_PATH=`pwd`/.libs
+make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
+cd ..
+%ifarch %{ix86}
+mkdir build-sse2
+cd build-sse2
+ln -s ../configure .
+CFLAGS="$RPM_OPT_FLAGS -march=pentium4"
+./configure --build=%{_build} --host=%{_host} \
+ --program-prefix=%{?_program_prefix} \
+ --prefix=%{_prefix} \
+ --exec-prefix=%{_exec_prefix} \
+ --bindir=%{_bindir} \
+ --sbindir=%{_sbindir} \
+ --sysconfdir=%{_sysconfdir} \
+ --datadir=%{_datadir} \
+ --includedir=%{_includedir} \
+ --libdir=%{_libdir} \
+ --libexecdir=%{_libexecdir} \
+ --localstatedir=%{_localstatedir} \
+ --sharedstatedir=%{_sharedstatedir} \
+ --mandir=%{_mandir} \
+ --infodir=%{_infodir} \
+ --enable-mpbsd --enable-cxx
+sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
+ -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
+ -e 's|-lstdc++ -lm|-lstdc++|' \
+ -i libtool
+export LD_LIBRARY_PATH=`pwd`/.libs
+make CFLAGS="$RPM_OPT_FLAGS -march=pentium4" %{?_smp_mflags}
+unset CFLAGS
+cd ..
+%endif
%install
rm -rf $RPM_BUILD_ROOT
@@ -131,6 +203,8 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/lib{gmp,mp,gmpxx}.la
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
ln -sf libgmpxx.so.4 $RPM_BUILD_ROOT%{_libdir}/libgmpxx.so
+install -m 644 ../../gmp-4.3.2/base/.libs/libgmp.so.3.5.2 ${RPM_BUILD_ROOT}%{_libdir}
+ln -sf libgmp.so.3.5.2 $RPM_BUILD_ROOT%{_libdir}/libgmp.so.3
cd ..
%ifarch %{ix86}
cd build-sse2
@@ -233,6 +307,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Mon Sep 26 2011 Peter Schiffer <pschiffe at redhat.com> 1:5.0.2-2
+- temporary build wild old compatibility library version
+
* Tue Sep 20 2011 Peter Schiffer <pschiffe at redhat.com> 1:5.0.2-1
- resolves: #702919
update to 5.0.2
More information about the scm-commits
mailing list