Переглянути джерело

fix run-time under FreeBSD/amd64 and this way fix building of other packages on this platform which depend on GC

Ralf S. Engelschall 19 роки тому
батько
коміт
26207678f7
2 змінених файлів з 33 додано та 16 видалено
  1. 32 15
      gc/gc.patch
  2. 1 1
      gc/gc.spec

+ 32 - 15
gc/gc.patch

@@ -1,6 +1,6 @@
 Index: dyn_load.c
---- dyn_load.c.orig	2005-07-13 02:07:42 +0200
-+++ dyn_load.c	2005-10-07 22:08:52 +0200
+--- dyn_load.c.orig	2006-06-07 07:01:52 +0200
++++ dyn_load.c	2006-10-12 10:24:45 +0200
 @@ -102,6 +102,12 @@
  #      else
  #        define ElfW(type) Elf64_##type
@@ -15,9 +15,9 @@ Index: dyn_load.c
  #      ifdef NETBSD
  #        if ELFSIZE == 32
 Index: include/private/gcconfig.h
---- include/private/gcconfig.h.orig	2005-08-12 03:31:22 +0200
-+++ include/private/gcconfig.h	2005-10-07 22:30:28 +0200
-@@ -62,7 +62,7 @@
+--- include/private/gcconfig.h.orig	2006-07-07 23:08:05 +0200
++++ include/private/gcconfig.h	2006-10-12 10:26:54 +0200
+@@ -63,7 +63,7 @@
  /* Determine the machine type: */
  # if defined(__arm__) || defined(__thumb__)
  #    define ARM32
@@ -26,7 +26,7 @@ Index: include/private/gcconfig.h
  #      define NOSYS
  #      define mach_type_known
  #    endif
-@@ -334,10 +334,26 @@
+@@ -342,10 +342,26 @@
  #    define X86_64
  #    define mach_type_known
  # endif
@@ -54,7 +54,7 @@ Index: include/private/gcconfig.h
  # if defined(bsdi) && (defined(i386) || defined(__i386__))
  #    define I386
  #    define BSDI
-@@ -845,6 +861,16 @@
+@@ -860,6 +876,16 @@
  #     define DATASTART GC_data_start
  #     define DYNAMIC_LOADING
  #   endif
@@ -71,7 +71,7 @@ Index: include/private/gcconfig.h
  #   ifdef NOSYS
  #     define ALIGNMENT 4
  #     define OS_TYPE "NOSYS"
-@@ -1721,6 +1747,19 @@
+@@ -1776,6 +1802,19 @@
  #     endif
  #     define ALIGNMENT 8
  #   endif
@@ -91,7 +91,7 @@ Index: include/private/gcconfig.h
  # endif
  
  # ifdef M88K
-@@ -1807,6 +1846,17 @@
+@@ -1862,6 +1901,17 @@
  #	endif
  #       define USE_GENERIC_PUSH_REGS
  #   endif
@@ -109,9 +109,9 @@ Index: include/private/gcconfig.h
  #   ifdef LINUX
  #       define OS_TYPE "LINUX"
  #       define LINUX_STACKBOTTOM
-@@ -1961,6 +2011,15 @@
- 	extern char etext[];
- #	define SEARCH_FOR_DATA_START
+@@ -1967,6 +2017,15 @@
+       extern int _end[];
+ #     define DATAEND (_end)
  #   endif
 +#   ifdef FREEBSD
 +#       define OS_TYPE "FREEBSD"
@@ -124,10 +124,18 @@ Index: include/private/gcconfig.h
 +#   endif
  # endif
  
- #if defined(LINUX) && defined(USE_MMAP)
+ # ifdef X86_64
+@@ -2009,6 +2068,7 @@
+ #   endif
+ #   ifdef FREEBSD
+ #	define OS_TYPE "FREEBSD"
++#	define NEED_FIND_LIMIT
+ #	ifndef GC_FREEBSD_THREADS
+ #	    define MPROTECT_VDB
+ #	endif
 Index: os_dep.c
---- os_dep.c.orig	2005-07-28 02:33:34 +0200
-+++ os_dep.c	2005-10-07 22:08:52 +0200
+--- os_dep.c.orig	2006-04-22 01:26:47 +0200
++++ os_dep.c	2006-10-12 10:24:45 +0200
 @@ -694,7 +694,7 @@
      || defined(HURD) || defined(NETBSD)
  	static struct sigaction old_segv_act;
@@ -155,3 +163,12 @@ Index: os_dep.c
  		    /* Under Irix 5.x or HP/UX, we may get SIGBUS.	*/
  		    /* Pthreads doesn't exist under Irix 5.x, so we	*/
  		    /* don't have to worry in the threads case.		*/
+@@ -1392,7 +1392,7 @@
+ }
+ # endif
+ 
+-# if defined(FREEBSD) && (defined(I386) || defined(powerpc) || defined(__powerpc__)) && !defined(PCR)
++# if defined(FREEBSD) && (defined(I386) || defined(X86_64) || defined(powerpc) || defined(__powerpc__)) && !defined(PCR)
+ /* Its unclear whether this should be identical to the above, or 	*/
+ /* whether it should apply to non-X86 architectures.			*/
+ /* For now we don't assume that there is always an empty page after	*/

+ 1 - 1
gc/gc.spec

@@ -33,7 +33,7 @@ Class:        BASE
 Group:        Libraries
 License:      MIT-style
 Version:      6.8
-Release:      20060924
+Release:      20061012
 
 #   list of sources
 Source0:      http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc%{version}.tar.gz