This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix garbage collector for NetBSD
- From: Richard Earnshaw <Richard dot Earnshaw at buzzard dot freeserve dot co dot uk>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Richard dot Earnshaw at buzzard dot freeserve dot co dot uk
- Date: Sat, 26 Feb 2005 15:46:37 +0000
- Subject: [PATCH] Fix garbage collector for NetBSD
This is a back-port of a patch that is in boehm-gc7.0alpha1. It fixes
boehm-gc on NetBSD platforms when using shared libraries.
With this patch the libjava testsuite failures on netbsd/i386 is down from
1033 to just 14.
Bootstrapped on i386-netbsd2.0 and installed on Mainline and the 4.0
branch.
2005-02-26 Richard Earnshaw <rearnsha@arm.com>
* dyn_load.c: On NetBSD, include machine/elf_machdep.h and define
ELFSIZE in terms of ARCH_ELFSIZE (back-ported from gc7.0alpha1).
Index: dyn_load.c
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/dyn_load.c,v
retrieving revision 1.23
diff -p -p -r1.23 dyn_load.c
*** dyn_load.c 9 Feb 2005 21:33:02 -0000 1.23
--- dyn_load.c 26 Feb 2005 15:39:41 -0000
***************
*** 80,85 ****
--- 80,90 ----
# define l_name lm_name
#endif
+ #if defined(NETBSD)
+ # include <machine/elf_machdep.h>
+ # define ELFSIZE ARCH_ELFSIZE
+ #endif
+
#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
(defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
(defined(NETBSD) && defined(__ELF__)) || defined(HURD)