SHA256
1
0
forked from pool/gmp
OBS User unknown 2007-12-12 19:13:54 +00:00 committed by Git OBS Bridge
parent 4f976fbde7
commit 5cd099556f
12 changed files with 46 additions and 511 deletions

View File

@ -1,41 +0,0 @@
Index: gmp-h.in
===================================================================
--- gmp-h.in.orig 2006-04-11 20:10:15.000000000 +0200
+++ gmp-h.in 2007-05-23 11:08:11.000000000 +0200
@@ -24,6 +24,7 @@ MA 02110-1301, USA. */
#if defined (__cplusplus)
#include <iosfwd> /* for std::istream, std::ostream, std::string */
+#include <cstdio> /* for std::FILE */
#endif
@@ -418,9 +419,15 @@ typedef __mpq_struct *mpq_ptr;
/* gcc has __inline__ in all modes, including strict ansi. Give a prototype
for an inline too, so as to correctly specify "dllimport" on windows, in
- case the function is called rather than inlined. */
+ case the function is called rather than inlined.
+ GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+ inline semantics, unless -fgnu89-inline is used. */
#ifdef __GNUC__
+#ifdef __GNUC_STDC_INLINE__
+#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__))
+#else
#define __GMP_EXTERN_INLINE extern __inline__
+#endif
#define __GMP_INLINE_PROTOTYPES 1
#endif
Index: tests/cxx/t-locale.cc
===================================================================
--- tests/cxx/t-locale.cc.orig 2006-03-14 16:57:54.000000000 +0100
+++ tests/cxx/t-locale.cc 2007-05-23 15:31:10.000000000 +0200
@@ -20,6 +20,7 @@ the Free Software Foundation, Inc., 51 F
MA 02110-1301, USA. */
#include <clocale>
+#include <cstdlib>
#include <iostream>
#include "gmp.h"

View File

@ -1,39 +0,0 @@
Index: configure
================================================================================
--- configure
+++ configure
@@ -2962,9 +2962,11 @@
cclist="gcc cc"
cc_cflags="-O2"
gcc_cflags="-O2 -mpowerpc"
- gcc_cflags_optlist="precomp subtype cpu"
+ gcc_cflags_optlist="precomp subtype asm cpu"
gcc_cflags_precomp="-no-cpp-precomp"
gcc_cflags_subtype="-force_cpusubtype_ALL" # for vmx on darwin
+ gcc_cflags_asm=""
+ gcc_cflags_cpu=""
# grab this object, though it's not a true cycle counter routine
SPEED_CYCLECOUNTER_OBJ=powerpc.lo
@@ -2975,7 +2977,7 @@
path="powerpc32/750 powerpc32" ;;
powerpc7400)
path="powerpc32/vmx powerpc32/750 powerpc32" ;;
- powerpc745?)
+ powerpc74[45]?)
path="powerpc32/vmx powerpc32 powerpc32" ;;
*)
path="powerpc32" ;;
@@ -3009,8 +3011,11 @@
powerpc630) gcc_cflags_cpu="-mcpu=630" ;;
powerpc740) gcc_cflags_cpu="-mcpu=740" ;;
powerpc7400 | powerpc7410)
+ gcc_cflags_asm="-Wa,-maltivec"
gcc_cflags_cpu="-mcpu=7400 -mcpu=750" ;;
- powerpc745?) gcc_cflags_cpu="-mcpu=7450" ;;
+ powerpc74[45]?)
+ gcc_cflags_asm="-Wa,-maltivec"
+ gcc_cflags_cpu="-mcpu=7450" ;;
powerpc750) gcc_cflags_cpu="-mcpu=750" ;;
powerpc801) gcc_cflags_cpu="-mcpu=801" ;;
powerpc821) gcc_cflags_cpu="-mcpu=821" ;;

View File

@ -1,11 +0,0 @@
--- configure
+++ configure
@@ -27484,7 +27484,7 @@
got[12] == "000" && \
got[13] == "000" && \
got[14] == "000" && \
- got[15] == "124")
+ (got[15] == "124" || got[15] == "000"))
{
print "IEEE little endian, swapped halves"
found = 1

View File

@ -1,12 +0,0 @@
--- mpz/set_d.c
+++ mpz/set_d.c
@@ -56,6 +56,9 @@
if (ALLOC(r) < rn)
_mpz_realloc (r, rn);
+ if (rn <= 0)
+ rn = 0;
+
rp = PTR (r);
switch (rn)

View File

@ -1,83 +0,0 @@
Index: mpn/generic/addsub_n.c
================================================================================
--- configure
+++ configure
@@ -3554,8 +3554,10 @@
*) path="x86" ;;
esac
- # If the user asked for a fat build, override the path set above
+ # If the user asked for a fat build, override the path and flags set above
if test $enable_fat = yes; then
+ gcc_cflags_cpu=""
+ gcc_cflags_arch=""
extra_functions="$extra_functions fat fat_entry"
path="x86/fat x86"
fat_path="x86 x86/fat x86/i486
--- mpn/generic/addsub_n.c
+++ mpn/generic/addsub_n.c
@@ -1,6 +1,6 @@
/* mpn_addsub_n -- Add and Subtract two limb vectors of equal, non-zero length.
-Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+Copyright 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -58,13 +58,13 @@
for (off = 0; off < n; off += PART_SIZE)
{
this_n = MIN (n - off, PART_SIZE);
-#if HAVE_NATIVE_mpn_add_nc || !HAVE_NATIVE_mpn_add_n
+#if HAVE_NATIVE_mpn_add_nc
acyo = mpn_add_nc (r1p + off, s1p + off, s2p + off, this_n, acyo);
#else
acyn = mpn_add_n (r1p + off, s1p + off, s2p + off, this_n);
acyo = acyn + mpn_add_1 (r1p + off, r1p + off, this_n, acyo);
#endif
-#if HAVE_NATIVE_mpn_sub_nc || !HAVE_NATIVE_mpn_sub_n
+#if HAVE_NATIVE_mpn_sub_nc
scyo = mpn_sub_nc (r2p + off, s1p + off, s2p + off, this_n, scyo);
#else
scyn = mpn_sub_n (r2p + off, s1p + off, s2p + off, this_n);
@@ -81,13 +81,13 @@
for (off = 0; off < n; off += PART_SIZE)
{
this_n = MIN (n - off, PART_SIZE);
-#if HAVE_NATIVE_mpn_sub_nc || !HAVE_NATIVE_mpn_sub_n
+#if HAVE_NATIVE_mpn_sub_nc
scyo = mpn_sub_nc (r2p + off, s1p + off, s2p + off, this_n, scyo);
#else
scyn = mpn_sub_n (r2p + off, s1p + off, s2p + off, this_n);
scyo = scyn + mpn_sub_1 (r2p + off, r2p + off, this_n, scyo);
#endif
-#if HAVE_NATIVE_mpn_add_nc || !HAVE_NATIVE_mpn_add_n
+#if HAVE_NATIVE_mpn_add_nc
acyo = mpn_add_nc (r1p + off, s1p + off, s2p + off, this_n, acyo);
#else
acyn = mpn_add_n (r1p + off, s1p + off, s2p + off, this_n);
@@ -97,7 +97,7 @@
}
else
{
- /* r1 and r2 are identical to s1 and s2 (r1==s1 and r2=s2 or vice versa)
+ /* r1 and r2 are identical to s1 and s2 (r1==s1 and r2==s2 or vice versa)
Need temporary storage. */
mp_limb_t tp[PART_SIZE];
acyo = 0;
@@ -105,13 +105,13 @@
for (off = 0; off < n; off += PART_SIZE)
{
this_n = MIN (n - off, PART_SIZE);
-#if HAVE_NATIVE_mpn_add_nc || !HAVE_NATIVE_mpn_add_n
+#if HAVE_NATIVE_mpn_add_nc
acyo = mpn_add_nc (tp, s1p + off, s2p + off, this_n, acyo);
#else
acyn = mpn_add_n (tp, s1p + off, s2p + off, this_n);
acyo = acyn + mpn_add_1 (tp, tp, this_n, acyo);
#endif
-#if HAVE_NATIVE_mpn_sub_nc || !HAVE_NATIVE_mpn_sub_n
+#if HAVE_NATIVE_mpn_sub_nc
scyo = mpn_sub_nc (r2p + off, s1p + off, s2p + off, this_n, scyo);
#else
scyn = mpn_sub_n (r2p + off, s1p + off, s2p + off, this_n);

View File

@ -1,283 +0,0 @@
--- mpn/generic/dive_1.c
+++ mpn/generic/dive_1.c
@@ -70,7 +70,7 @@
{
mp_size_t i;
mp_limb_t c, h, l, ls, s, s_next, inverse, dummy;
- unsigned shift;
+ unsigned long shift;
ASSERT (size >= 1);
ASSERT (divisor != 0);
--- mpn/generic/divis.c
+++ mpn/generic/divis.c
@@ -118,7 +118,7 @@
if ((dlow & 1) == 0)
{
- unsigned twos;
+ unsigned long twos;
count_trailing_zeros (twos, dlow);
dlow >>= twos;
}
@@ -130,7 +130,7 @@
mp_limb_t dsecond = dp[1];
if (dsecond <= dmask)
{
- unsigned twos;
+ unsigned long twos;
count_trailing_zeros (twos, dlow);
dlow = (dlow >> twos) | (dsecond << (GMP_NUMB_BITS-twos));
ASSERT_LIMB (dlow);
--- mpn/generic/gcd.c
+++ mpn/generic/gcd.c
@@ -264,7 +264,7 @@
if ((up[0] & 1) == 0) /* Result even; remove twos. */
{
- unsigned int r;
+ unsigned long r;
count_trailing_zeros (r, up[0]);
mpn_rshift (anchor_up, up, usize, r);
usize -= (anchor_up[usize - 1] == 0);
@@ -382,7 +382,7 @@
up += 1, usize -= 1;
if ((up[0] & 1) == 0)
{
- unsigned int r;
+ unsigned long r;
count_trailing_zeros (r, up[0]);
mpn_rshift (up, up, usize, r);
usize -= (up[usize - 1] == 0);
--- mpn/generic/scan0.c
+++ mpn/generic/scan0.c
@@ -33,7 +33,7 @@
{
mp_size_t starting_word;
mp_limb_t alimb;
- int cnt;
+ long cnt;
mp_srcptr p;
/* Start at the word implied by STARTING_BIT. */
--- mpn/generic/scan1.c
+++ mpn/generic/scan1.c
@@ -33,7 +33,7 @@
{
mp_size_t starting_word;
mp_limb_t alimb;
- int cnt;
+ long cnt;
mp_srcptr p;
/* Start at the word implied by STARTING_BIT. */
--- mpq/set_d.c
+++ mpq/set_d.c
@@ -41,7 +41,7 @@
mp_limb_t tp[LIMBS_PER_DOUBLE];
mp_ptr np, dp;
mp_size_t nn, dn;
- int c;
+ long c;
DOUBLE_NAN_INF_ACTION (d,
__gmp_invalid_operation (),
--- mpq/set_f.c
+++ mpq/set_f.c
@@ -83,7 +83,7 @@
else
{
/* right shift numerator, adjust denominator accordingly */
- int shift;
+ long shift;
den_size--;
count_trailing_zeros (shift, flow);
--- mpz/cong.c
+++ mpz/cong.c
@@ -115,7 +115,7 @@
/* Strip low zero bits to get odd d required by modexact. If
d==e*2^n then a==c mod d if and only if both a==c mod e and
a==c mod 2^n, the latter having been done above. */
- unsigned twos;
+ unsigned long twos;
count_trailing_zeros (twos, dlow);
dlow >>= twos;
}
@@ -133,7 +133,7 @@
if (dsecond <= dmask)
{
- unsigned twos;
+ unsigned long twos;
count_trailing_zeros (twos, dlow);
dlow = (dlow >> twos) | (dsecond << (GMP_NUMB_BITS-twos));
ASSERT_LIMB (dlow);
--- mpz/cong_ui.c
+++ mpz/cong_ui.c
@@ -93,7 +93,7 @@
d==e*2^n then a==c mod d if and only if both a==c mod 2^n
and a==c mod e. */
- unsigned twos;
+ unsigned long twos;
if ((ap[0]-c) & LOW_ZEROS_MASK (d))
return 0;
--- mpz/divegcd.c
+++ mpz/divegcd.c
@@ -78,7 +78,7 @@
if (SIZ(d) == 1)
{
mp_limb_t dl = PTR(d)[0];
- int twos;
+ long twos;
if (dl == 1)
{
--- mpz/divexact.c
+++ mpz/divexact.c
@@ -114,7 +114,7 @@
}
else
{
- unsigned int r;
+ unsigned long r;
tp = (mp_ptr) TMP_ALLOC (tsize * BYTES_PER_MP_LIMB);
count_trailing_zeros (r, dp[0]);
mpn_rshift (tp, dp, tsize, r);
--- mpz/divis_ui.c
+++ mpz/divis_ui.c
@@ -29,7 +29,7 @@
{
mp_size_t asize;
mp_ptr ap;
- unsigned twos;
+ unsigned long twos;
asize = SIZ(a);
if (UNLIKELY (d == 0))
--- mpz/jacobi.c
+++ mpz/jacobi.c
@@ -87,7 +87,7 @@
mp_size_t asize, bsize;
mp_ptr ap, bp;
mp_limb_t alow, blow, ahigh, bhigh, asecond, bsecond;
- unsigned atwos, btwos;
+ unsigned long atwos, btwos;
int result_bit1;
TMP_DECL;
@@ -285,7 +285,7 @@
if ((alow & 1) == 0)
{
/* factors of 2 from a */
- unsigned twos;
+ unsigned long twos;
count_trailing_zeros (twos, alow);
TRACE (printf ("twos %u\n", twos));
result_bit1 ^= JACOBI_TWOS_U_BIT1 (twos, blow);
--- mpz/kronsz.c
+++ mpz/kronsz.c
@@ -32,7 +32,7 @@
mp_size_t b_size;
mp_size_t b_abs_size;
mp_limb_t a_limb, b_rem;
- unsigned twos;
+ unsigned long twos;
int result_bit1;
#if GMP_NUMB_BITS < BITS_PER_ULONG
--- mpz/kronuz.c
+++ mpz/kronuz.c
@@ -31,7 +31,7 @@
mp_limb_t b_low;
int b_abs_size;
mp_limb_t b_rem;
- int twos;
+ long twos;
int result_bit1;
/* (a/-1)=1 when a>=0, so the sign of b is ignored */
--- mpz/kronzs.c
+++ mpz/kronzs.c
@@ -58,7 +58,7 @@
if ((b_limb & 1) == 0)
{
mp_limb_t a_low = a_ptr[0];
- int twos;
+ long twos;
if (b_limb == 0)
return JACOBI_LS0 (a_low, a_size); /* (a/0) */
--- mpz/kronzu.c
+++ mpz/kronzu.c
@@ -54,7 +54,7 @@
else
{
mp_limb_t a_low = a_ptr[0];
- int twos;
+ long twos;
if (b == 0)
return JACOBI_LS0 (a_low, a_size); /* (a/0) */
--- mpz/n_pow_ui.c
+++ mpz/n_pow_ui.c
@@ -154,7 +154,8 @@
{
mp_ptr rp;
mp_size_t rtwos_limbs, ralloc, rsize;
- int rneg, i, cnt, btwos, r_bp_overlap;
+ int rneg, i, cnt, r_bp_overlap;
+ long btwos;
mp_limb_t blimb, rl;
unsigned long rtwos_bits;
#if HAVE_NATIVE_mpn_mul_2
--- mpz/perfpow.c
+++ mpz/perfpow.c
@@ -209,7 +209,7 @@
static unsigned long int
gcd (unsigned long int a, unsigned long int b)
{
- int an2, bn2, n2;
+ long an2, bn2, n2;
if (a == 0)
return b;
--- tests/mpn/t-mp_bases.c
+++ tests/mpn/t-mp_bases.c
@@ -31,7 +31,8 @@
main (int argc, char *argv[])
{
mp_limb_t want_bb, want_bb_inv;
- int base, want_chars_per_limb;
+ int base;
+ unsigned long want_chars_per_limb;
want_chars_per_limb = refmpn_chars_per_limb (10);
if (MP_BASES_CHARS_PER_LIMB_10 != want_chars_per_limb)
--- tests/t-count_zeros.c
+++ tests/t-count_zeros.c
@@ -44,7 +44,7 @@
void
check_ctz (int want, mp_limb_t n)
{
- int got;
+ long got;
count_trailing_zeros (got, n);
if (got != want)
{
--- tune/common.c
+++ tune/common.c
@@ -1825,9 +1825,9 @@
speed_routine_count_zeros_setup (struct speed_params *s,
mp_ptr xp, int leading, int zero)
{
- int i, c;
+ int i;
mp_limb_t n;
-
+ long c;
if (s->r == 0)
{
/* Make uniformly distributed data. If zero isn't allowed then change

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d07ffcb37eecec35c5ec72516d10b35fdf6e6fef1fcf1dcd37e30b8cbf8bf941
size 1726453

3
gmp-4.2.2.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2b2c0aacafa2dc41f4604b381349d49596921e38a58bf782b0d70b33f548657b
size 1747068

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Wed Dec 12 14:28:23 CET 2007 - rguenther@suse.de
- Update to 4.2.2, which is now LGPLv3.
- Remove no longer applicable patches.
- Disable building of berkley MP compatibility library.
- Run testsuite only once.
- Do not package libtool .la files.
- Do not package static C++ binding library.
- Do not package CVS changelog.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue May 22 12:40:44 CEST 2007 - rguenther@suse.de Tue May 22 12:40:44 CEST 2007 - rguenther@suse.de

View File

@ -1,5 +1,5 @@
# #
# spec file for package gmp (Version 4.2.1) # spec file for package gmp (Version 4.2.2)
# #
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine # This file and all modifications and additions to the pristine
@ -12,23 +12,17 @@
Name: gmp Name: gmp
BuildRequires: gcc-c++ BuildRequires: gcc-c++
License: GNU General Public License (GPL), GNU Library General Public License v. 2.0 and 2.1 (LGPL) License: GPL v2 or later; LGPL v2.1 or later
Group: System/Libraries Group: System/Libraries
Autoreqprov: on AutoReqProv: on
Version: 4.2.1 Version: 4.2.2
Release: 33 Release: 1
Summary: The GNU MP Library Summary: The GNU MP Library
URL: http://www.swox.com/gmp/ Url: http://gmplib.org/
Source: ftp://prep.ai.mit.edu/pub/gnu/gmp/gmp-%{version}.tar.bz2 Source: gmp-%{version}.tar.bz2
Patch0: %{name}-%{version}-x86_64.diff Patch0: gmp-noexec.diff
Patch1: %{name}-%{version}-ia64.diff Patch1: gmp-ia64.diff
Patch2: %{name}-%{version}-s390.diff Patch2: gmp-s390x.diff
Patch3: %{name}-%{version}-configure.arm-double.diff
Patch4: %{name}-%{version}-configure-ppc.diff
Patch5: %{name}-%{version}-mpz_set_d.diff
Patch6: %{name}-%{version}-x86-fat.diff
Patch7: %{name}-noexec.diff
Patch8: %{name}-%{version}-c99-fixes.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
@ -44,7 +38,7 @@ Authors:
Summary: Include Files and Libraries for Development with the GNU MP Library Summary: Include Files and Libraries for Development with the GNU MP Library
Group: Development/Languages/C and C++ Group: Development/Languages/C and C++
Requires: gmp = %{version} Requires: gmp = %{version}
Autoreqprov: on AutoReqProv: on
PreReq: %install_info_prereq PreReq: %install_info_prereq
%description devel %description devel
@ -62,12 +56,6 @@ Authors:
%patch0 %patch0
%patch1 %patch1
%patch2 %patch2
%patch3
%patch4
%patch5
%patch6
%patch7
%patch8
%build %build
export HOME=/tmp/ export HOME=/tmp/
@ -88,24 +76,19 @@ CFLAGS="$RPM_OPT_FLAGS -Wall" \
--libdir=%{_libdir} \ --libdir=%{_libdir} \
--infodir=%{_infodir} \ --infodir=%{_infodir} \
--build=%{_target_platform} \ --build=%{_target_platform} \
--enable-mpbsd \
--disable-mpfr \ --disable-mpfr \
--enable-cxx --enable-cxx
%ifarch x86_64
make CFLAGS="$RPM_OPT_FLAGS -Wall" fib_table.h mp_bases.h
cd mpf
make CFLAGS="$RPM_OPT_FLAGS -fno-cse-follow-jumps -Wall" cmp_si.o cmp_si.lo
cd ..
%endif
make CFLAGS="$RPM_OPT_FLAGS -Wall" CC=gcc %{?jobs:-j%jobs} make CFLAGS="$RPM_OPT_FLAGS -Wall" CC=gcc %{?jobs:-j%jobs}
%ifnarch alpha
make CFLAGS="$RPM_OPT_FLAGS -Wall" CC=gcc check %{?jobs:-j%jobs} %check
%endif
# do not disable "make check", FIX THE BUGS! # do not disable "make check", FIX THE BUGS!
make check make check
%install %install
make install DESTDIR=${RPM_BUILD_ROOT} make install DESTDIR=${RPM_BUILD_ROOT}
rm $RPM_BUILD_ROOT%{_libdir}/libgmp.la
rm $RPM_BUILD_ROOT%{_libdir}/libgmpxx.la
rm $RPM_BUILD_ROOT%{_libdir}/libgmpxx.a
%post %post
%run_ldconfig %run_ldconfig
@ -122,19 +105,29 @@ rm -rf $RPM_BUILD_ROOT
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%doc AUTHORS README NEWS ChangeLog %doc AUTHORS README NEWS
%{_libdir}/lib*.so.* %{_libdir}/libgmp.so.*
%{_libdir}/libgmpxx.so.*
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%doc demos %doc demos
%doc %{_infodir}/gmp.info*.gz %doc %{_infodir}/gmp.info*.gz
%{_libdir}/lib*.a %{_libdir}/libgmp.a
%{_libdir}/lib*.la %{_libdir}/libgmp.so
%{_libdir}/lib*.so %{_libdir}/libgmpxx.so
/usr/include/* /usr/include/gmp.h
/usr/include/gmpxx.h
%changelog %changelog
* Wed Dec 12 2007 - rguenther@suse.de
- Update to 4.2.2, which is now LGPLv3.
- Remove no longer applicable patches.
- Disable building of berkley MP compatibility library.
- Run testsuite only once.
- Do not package libtool .la files.
- Do not package static C++ binding library.
- Do not package CVS changelog.
* Tue May 22 2007 - rguenther@suse.de * Tue May 22 2007 - rguenther@suse.de
- Fix inline behavior for C99. - Fix inline behavior for C99.
* Sat Jan 13 2007 - meissner@suse.de * Sat Jan 13 2007 - meissner@suse.de