avr32 build fixes
[openwrt/svn-archive/archive.git] / package / gmp / patches / 001-fat_fix.diff
1 diff -Nur gmp-4.2.1/configure gmp-4.2.1-owrt/configure
2 --- gmp-4.2.1/configure 2006-05-04 18:50:26.000000000 +0200
3 +++ gmp-4.2.1-owrt/configure 2007-07-17 10:38:53.000000000 +0200
4 @@ -3549,8 +3549,10 @@
5 *) path="x86" ;;
6 esac
7
8 - # If the user asked for a fat build, override the path set above
9 + # If the user asked for a fat build, override the path and flags set above
10 if test $enable_fat = yes; then
11 + gcc_cflags_cpu=""
12 + gcc_cflags_arch=""
13 extra_functions="$extra_functions fat fat_entry"
14 path="x86/fat x86"
15 fat_path="x86 x86/fat x86/i486
16 diff -Nur gmp-4.2.1/mpn/generic/addsub_n.c gmp-4.2.1-owrt/mpn/generic/addsub_n.c
17 --- gmp-4.2.1/mpn/generic/addsub_n.c 2006-03-14 16:57:54.000000000 +0100
18 +++ gmp-4.2.1-owrt/mpn/generic/addsub_n.c 2007-07-17 10:38:53.000000000 +0200
19 @@ -1,6 +1,6 @@
20 /* mpn_addsub_n -- Add and Subtract two limb vectors of equal, non-zero length.
21
22 -Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
23 +Copyright 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
24
25 This file is part of the GNU MP Library.
26
27 @@ -58,13 +58,13 @@
28 for (off = 0; off < n; off += PART_SIZE)
29 {
30 this_n = MIN (n - off, PART_SIZE);
31 -#if HAVE_NATIVE_mpn_add_nc || !HAVE_NATIVE_mpn_add_n
32 +#if HAVE_NATIVE_mpn_add_nc
33 acyo = mpn_add_nc (r1p + off, s1p + off, s2p + off, this_n, acyo);
34 #else
35 acyn = mpn_add_n (r1p + off, s1p + off, s2p + off, this_n);
36 acyo = acyn + mpn_add_1 (r1p + off, r1p + off, this_n, acyo);
37 #endif
38 -#if HAVE_NATIVE_mpn_sub_nc || !HAVE_NATIVE_mpn_sub_n
39 +#if HAVE_NATIVE_mpn_sub_nc
40 scyo = mpn_sub_nc (r2p + off, s1p + off, s2p + off, this_n, scyo);
41 #else
42 scyn = mpn_sub_n (r2p + off, s1p + off, s2p + off, this_n);
43 @@ -81,13 +81,13 @@
44 for (off = 0; off < n; off += PART_SIZE)
45 {
46 this_n = MIN (n - off, PART_SIZE);
47 -#if HAVE_NATIVE_mpn_sub_nc || !HAVE_NATIVE_mpn_sub_n
48 +#if HAVE_NATIVE_mpn_sub_nc
49 scyo = mpn_sub_nc (r2p + off, s1p + off, s2p + off, this_n, scyo);
50 #else
51 scyn = mpn_sub_n (r2p + off, s1p + off, s2p + off, this_n);
52 scyo = scyn + mpn_sub_1 (r2p + off, r2p + off, this_n, scyo);
53 #endif
54 -#if HAVE_NATIVE_mpn_add_nc || !HAVE_NATIVE_mpn_add_n
55 +#if HAVE_NATIVE_mpn_add_nc
56 acyo = mpn_add_nc (r1p + off, s1p + off, s2p + off, this_n, acyo);
57 #else
58 acyn = mpn_add_n (r1p + off, s1p + off, s2p + off, this_n);
59 @@ -97,7 +97,7 @@
60 }
61 else
62 {
63 - /* r1 and r2 are identical to s1 and s2 (r1==s1 and r2=s2 or vice versa)
64 + /* r1 and r2 are identical to s1 and s2 (r1==s1 and r2==s2 or vice versa)
65 Need temporary storage. */
66 mp_limb_t tp[PART_SIZE];
67 acyo = 0;
68 @@ -105,13 +105,13 @@
69 for (off = 0; off < n; off += PART_SIZE)
70 {
71 this_n = MIN (n - off, PART_SIZE);
72 -#if HAVE_NATIVE_mpn_add_nc || !HAVE_NATIVE_mpn_add_n
73 +#if HAVE_NATIVE_mpn_add_nc
74 acyo = mpn_add_nc (tp, s1p + off, s2p + off, this_n, acyo);
75 #else
76 acyn = mpn_add_n (tp, s1p + off, s2p + off, this_n);
77 acyo = acyn + mpn_add_1 (tp, tp, this_n, acyo);
78 #endif
79 -#if HAVE_NATIVE_mpn_sub_nc || !HAVE_NATIVE_mpn_sub_n
80 +#if HAVE_NATIVE_mpn_sub_nc
81 scyo = mpn_sub_nc (r2p + off, s1p + off, s2p + off, this_n, scyo);
82 #else
83 scyn = mpn_sub_n (r2p + off, s1p + off, s2p + off, this_n);