changeset 2976:9ee8d2ff3b5a

Patch out dynamic PPC CPU feature detection. Simulate PPC with FPU without Altivec. Fixes version problems with __libc_stack_end
author hanwen <hanwen@lilypond.org>
date Sun, 17 Dec 2006 18:15:49 +0100
parents 84351e58c297
children 72a2ec7d9146
files lib/debian.py patches/gcc-4.1.1-ppc-unwind.patch
diffstat 2 files changed, 34 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lib/debian.py	Thu Dec 14 15:44:37 2006 +0100
+++ b/lib/debian.py	Sun Dec 17 18:15:49 2006 +0100
@@ -55,6 +55,13 @@
     pass
 
 class Gcc (cross.Gcc):
+    def patch (self):
+        cross.Gcc.patch (self)
+        self.system ("""
+cd %(srcdir)s && patch -p1 < %(patchdir)s/gcc-4.1.1-ppc-unwind.patch
+""")
+        
+
     ## TODO: should detect whether libc supports TLS 
     def configure_command (self):
         return cross.Gcc.configure_command (self) + ' --disable-tls '
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gcc-4.1.1-ppc-unwind.patch	Sun Dec 17 18:15:49 2006 +0100
@@ -0,0 +1,27 @@
+--- gcc-4.1.1/gcc/config/rs6000/linux-unwind.h~	2005-08-06 15:26:35.000000000 +0200
++++ gcc-4.1.1/gcc/config/rs6000/linux-unwind.h	2006-12-17 19:00:41.000000000 +0100
+@@ -202,6 +202,7 @@
+ }
+ #endif
+ 
++#if 0
+ /* Find an entry in the process auxiliary vector.  The canonical way to
+    test for VMX is to look at AT_HWCAP.  */
+ 
+@@ -233,6 +234,7 @@
+       return auxp->a_val;
+   return 0;
+ }
++#endif
+ 
+ /* Do code reading to identify a signal frame, and set the frame
+    state data appropriately.  See unwind-dw2.c for the structs.  */
+@@ -275,7 +277,7 @@
+ 
+   if (hwcap == 0)
+     {
+-      hwcap = ppc_linux_aux_vector (16);
++      hwcap = 0x08000000; /* FPU, VMX from G4 onwards. */
+       /* These will already be set if we found AT_HWCAP.  A nonzero
+ 	 value stops us looking again if for some reason we couldn't
+ 	 find AT_HWCAP.  */