2004/01/21 01:09:37
authorxwt <xwt@xwt.org>
Fri, 30 Jan 2004 08:05:12 +0000 (08:05 +0000)
committerxwt <xwt@xwt.org>
Fri, 30 Jan 2004 08:05:12 +0000 (08:05 +0000)
darcs-hash:20040130080512-3ac31-ec2824a86217d74d2a0a7eb79a44e2d5e8aac4ed.gz

upstream/gcc-3.3/patches/linux-fix-gc.patch [new file with mode: 0644]

diff --git a/upstream/gcc-3.3/patches/linux-fix-gc.patch b/upstream/gcc-3.3/patches/linux-fix-gc.patch
new file mode 100644 (file)
index 0000000..d0a1c9b
--- /dev/null
@@ -0,0 +1,45 @@
+diff -u boehm-gc/mach_dep.c boehm-gc/mach_dep.c
+--- boehm-gc/mach_dep.c        Thu Jul 18 13:06:00 2002
++++ boehm-gc/mach_dep.c        Tue Jan 20 17:00:36 2004
+@@ -368,9 +368,13 @@
+ #     if defined(PJ)
+       {
+           register int * sp asm ("optop");
++#ifdef LINUX
++          extern ptr_t GC_linux_stack_base(void);
++          GC_push_all_stack (sp, GC_linux_stack_base());
++#elseif
+           extern int *__libc_stack_end;
+-
+           GC_push_all_stack (sp, __libc_stack_end);
++#endif
+         }
+ #     endif
+diff -u boehm-gc/os_dep.c boehm-gc/os_dep.c
+--- boehm-gc/os_dep.c  Fri Jul 19 01:54:43 2002
++++ boehm-gc/os_dep.c  Tue Jan 20 16:59:10 2004
+@@ -666,8 +666,8 @@
+ # define STAT_SKIP 27   /* Number of fields preceding startstack      */
+                       /* field in /proc/self/stat                     */
+-# pragma weak __libc_stack_end
+-  extern ptr_t __libc_stack_end;
++//# pragma weak __libc_stack_end
++//  extern ptr_t __libc_stack_end;
+ # ifdef IA64
+ #   pragma weak __libc_ia64_register_backing_store_base
+@@ -709,9 +709,11 @@
+     size_t i, buf_offset = 0;
+     /* First try the easy way.  This should work for glibc 2.2        */
++    /*    
+       if (0 != &__libc_stack_end) {
+       return __libc_stack_end;
+       }
++    */
+     f = open("/proc/self/stat", O_RDONLY);
+     if (f < 0 || STAT_READ(f, stat_buf, STAT_BUF_SIZE) < 2 * STAT_SKIP) {
+       ABORT("Couldn't read /proc/self/stat");
+