changeset 5176:7116c09cb3b9

Merge branch 'master' of git@github.com:janneke/gub
author Jan Nieuwenhuizen <janneke@gnu.org>
date Wed, 18 Feb 2009 09:18:19 +0100
parents 810a8bd66964 (current diff) e218b5a2bd41 (diff)
children ac0243e3a200
files gub/specs/gmp.py
diffstat 3 files changed, 128 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gub/settings.py	Wed Feb 18 09:17:49 2009 +0100
+++ b/gub/settings.py	Wed Feb 18 09:18:19 2009 +0100
@@ -206,7 +206,8 @@
             except:
                 pass
 
-        if self.build_bits == '32' and self.build_hardware_bits == '64':
+        if (self.build_bits == '32' and self.build_hardware_bits == '64'
+            and not 'darwin' in self.target_platform):
             # 32 bit OS running on 64 bit hardware, help configure
             self.ABI = self.target_bits
             os.environ['ABI'] = self.target_bits
--- a/gub/specs/gmp.py	Wed Feb 18 09:17:49 2009 +0100
+++ b/gub/specs/gmp.py	Wed Feb 18 09:18:19 2009 +0100
@@ -39,6 +39,10 @@
                        '%(install_prefix)s/include/gmp.h')
 
 class Gmp__darwin__x86 (Gmp__darwin):
+    def patch (self):
+        Gmp__darwin.patch (self)
+        self.apply_patch ('gmp-4.2.1-x86fat.patch')
+        
     def configure_command (self):
 
         ## bypass oddball assembler errors. 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gmp-4.2.1-x86fat.patch	Wed Feb 18 09:18:19 2009 +0100
@@ -0,0 +1,122 @@
+See:
+
+ http://gmplib.org/patches/x86-fat.diff
+ http://gmplib.org/list-archives/gmp-bugs/2006-October/000579.html
+ http://gmplib.org/#BUGREPORTS
+
+Removed the configure part of the patch since we patch configure.in. It was
+only needed for FAT binaries anyway and this is being included to fix
+linking errors.
+   
+Index: mpn/generic/addsub_n.c
+===================================================================
+RCS file: /home/cvsfiles/gmp42/mpn/generic/addsub_n.c,v
+retrieving revision 1.1
+retrieving revision 1.2
+diff -p -2 -r1.1 -r1.2
+*** gmp/mpn/generic/addsub_n.c	14 Mar 2006 15:57:54 -0000	1.1
+--- gmpold/mpn/generic/addsub_n.c	15 May 2006 22:38:42 -0000	1.2
+***************
+*** 1,5 ****
+  /* mpn_addsub_n -- Add and Subtract two limb vectors of equal, non-zero length.
+  
+! Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+  
+  This file is part of the GNU MP Library.
+--- 1,5 ----
+  /* mpn_addsub_n -- Add and Subtract two limb vectors of equal, non-zero length.
+  
+! Copyright 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
+  
+  This file is part of the GNU MP Library.
+*************** mpn_addsub_n (mp_ptr r1p, mp_ptr r2p, mp
+*** 59,63 ****
+  	{
+  	  this_n = MIN (n - off, PART_SIZE);
+! #if HAVE_NATIVE_mpn_add_nc || !HAVE_NATIVE_mpn_add_n
+  	  acyo = mpn_add_nc (r1p + off, s1p + off, s2p + off, this_n, acyo);
+  #else
+--- 59,63 ----
+  	{
+  	  this_n = MIN (n - off, PART_SIZE);
+! #if HAVE_NATIVE_mpn_add_nc
+  	  acyo = mpn_add_nc (r1p + off, s1p + off, s2p + off, this_n, acyo);
+  #else
+*************** mpn_addsub_n (mp_ptr r1p, mp_ptr r2p, mp
+*** 65,69 ****
+  	  acyo = acyn + mpn_add_1 (r1p + off, r1p + off, this_n, acyo);
+  #endif
+! #if HAVE_NATIVE_mpn_sub_nc || !HAVE_NATIVE_mpn_sub_n
+  	  scyo = mpn_sub_nc (r2p + off, s1p + off, s2p + off, this_n, scyo);
+  #else
+--- 65,69 ----
+  	  acyo = acyn + mpn_add_1 (r1p + off, r1p + off, this_n, acyo);
+  #endif
+! #if HAVE_NATIVE_mpn_sub_nc
+  	  scyo = mpn_sub_nc (r2p + off, s1p + off, s2p + off, this_n, scyo);
+  #else
+*************** mpn_addsub_n (mp_ptr r1p, mp_ptr r2p, mp
+*** 82,86 ****
+  	{
+  	  this_n = MIN (n - off, PART_SIZE);
+! #if HAVE_NATIVE_mpn_sub_nc || !HAVE_NATIVE_mpn_sub_n
+  	  scyo = mpn_sub_nc (r2p + off, s1p + off, s2p + off, this_n, scyo);
+  #else
+--- 82,86 ----
+  	{
+  	  this_n = MIN (n - off, PART_SIZE);
+! #if HAVE_NATIVE_mpn_sub_nc
+  	  scyo = mpn_sub_nc (r2p + off, s1p + off, s2p + off, this_n, scyo);
+  #else
+*************** mpn_addsub_n (mp_ptr r1p, mp_ptr r2p, mp
+*** 88,92 ****
+  	  scyo = scyn + mpn_sub_1 (r2p + off, r2p + off, this_n, scyo);
+  #endif
+! #if HAVE_NATIVE_mpn_add_nc || !HAVE_NATIVE_mpn_add_n
+  	  acyo = mpn_add_nc (r1p + off, s1p + off, s2p + off, this_n, acyo);
+  #else
+--- 88,92 ----
+  	  scyo = scyn + mpn_sub_1 (r2p + off, r2p + off, this_n, scyo);
+  #endif
+! #if HAVE_NATIVE_mpn_add_nc
+  	  acyo = mpn_add_nc (r1p + off, s1p + off, s2p + off, this_n, acyo);
+  #else
+*************** mpn_addsub_n (mp_ptr r1p, mp_ptr r2p, mp
+*** 98,102 ****
+    else
+      {
+!       /* 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];
+--- 98,102 ----
+    else
+      {
+!       /* 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];
+*************** mpn_addsub_n (mp_ptr r1p, mp_ptr r2p, mp
+*** 106,110 ****
+  	{
+  	  this_n = MIN (n - off, PART_SIZE);
+! #if HAVE_NATIVE_mpn_add_nc || !HAVE_NATIVE_mpn_add_n
+  	  acyo = mpn_add_nc (tp, s1p + off, s2p + off, this_n, acyo);
+  #else
+--- 106,110 ----
+  	{
+  	  this_n = MIN (n - off, PART_SIZE);
+! #if HAVE_NATIVE_mpn_add_nc
+  	  acyo = mpn_add_nc (tp, s1p + off, s2p + off, this_n, acyo);
+  #else
+*************** mpn_addsub_n (mp_ptr r1p, mp_ptr r2p, mp
+*** 112,116 ****
+  	  acyo = acyn + mpn_add_1 (tp, tp, this_n, acyo);
+  #endif
+! #if HAVE_NATIVE_mpn_sub_nc || !HAVE_NATIVE_mpn_sub_n
+  	  scyo = mpn_sub_nc (r2p + off, s1p + off, s2p + off, this_n, scyo);
+  #else
+--- 112,116 ----
+  	  acyo = acyn + mpn_add_1 (tp, tp, this_n, acyo);
+  #endif
+! #if HAVE_NATIVE_mpn_sub_nc
+  	  scyo = mpn_sub_nc (r2p + off, s1p + off, s2p + off, this_n, scyo);
+  #else