Tue Nov 10 18:35:13 2009 UTC ()
Fix binary on NetBSD versions using binutils-2.19.
Patch from enami@

Bump PKGREVISION.


(wiz)
diff -r1.63 -r1.64 pkgsrc/devel/boehm-gc/Makefile
diff -r1.36 -r1.37 pkgsrc/devel/boehm-gc/distinfo
diff -r0 -r1.13 pkgsrc/devel/boehm-gc/patches/patch-ac

cvs diff -r1.63 -r1.64 pkgsrc/devel/boehm-gc/Makefile (expand / switch to context diff)
--- pkgsrc/devel/boehm-gc/Makefile 2009/08/11 18:04:48 1.63
+++ pkgsrc/devel/boehm-gc/Makefile 2009/11/10 18:35:13 1.64
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.63 2009/08/11 18:04:48 minskim Exp $
+# $NetBSD: Makefile,v 1.64 2009/11/10 18:35:13 wiz Exp $
 
 DISTNAME=	gc-7.1
 PKGNAME=	${DISTNAME:S/gc/boehm-gc/}
-PKGREVISION=	1
+PKGREVISION=	2
 CATEGORIES=	devel
 MASTER_SITES=	http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/
 

cvs diff -r1.36 -r1.37 pkgsrc/devel/boehm-gc/distinfo (expand / switch to context diff)
--- pkgsrc/devel/boehm-gc/distinfo 2008/05/22 11:45:25 1.36
+++ pkgsrc/devel/boehm-gc/distinfo 2009/11/10 18:35:13 1.37
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.36 2008/05/22 11:45:25 wiz Exp $
+$NetBSD: distinfo,v 1.37 2009/11/10 18:35:13 wiz Exp $
 
 SHA1 (gc-7.1.tar.gz) = e84cba5d18f4ea5ed4e5fd3f1dc6a46bc190ff6f
 RMD160 (gc-7.1.tar.gz) = 9338c1128686395739e3acd9052a651d1dffffb2
 Size (gc-7.1.tar.gz) = 1077714 bytes
 SHA1 (patch-aa) = 87a5bd5e83b0201d80a1e4e4ce6745c11b2e7cfe
 SHA1 (patch-ab) = 9b5133c7aa84e6824616e29613716a2fedd1d334
+SHA1 (patch-ac) = 15a277053946b1f4c826e20549ad9656dffadc9c

File Added: pkgsrc/devel/boehm-gc/patches/Attic/patch-ac
$NetBSD: patch-ac,v 1.13 2009/11/10 18:35:13 wiz Exp $

--- dyn_load.c.orig	2007-12-18 23:37:12.000000000 +0000
+++ dyn_load.c
@@ -78,6 +78,8 @@ static int (*GC_has_static_roots)(const 
 #endif
 
 #if defined(NETBSD)
+#   include <sys/param.h>
+#   include <dlfcn.h>
 #   include <machine/elf_machdep.h>
 #   define ELFSIZE ARCH_ELFSIZE
 #endif
@@ -499,6 +501,15 @@ GC_FirstDLOpenedLinkMap()
         return(0);
     }
     if( cachedResult == 0 ) {
+#if defined(NETBSD) && defined(__NetBSD_Version__) && __NetBSD_Version__ >= 599001900
+        struct link_map *lm = NULL;
+        int rv = dlinfo(RTLD_SELF, RTLD_DI_LINKMAP, &lm); 
+        if (rv != 0)
+            return (0);
+        if (lm == NULL)
+            return (0);
+        cachedResult = lm;
+#else  /* !(defined(NETBSD) && __NetBSD_Version__ >= 599001900) */
         int tag;
         for( dp = _DYNAMIC; (tag = dp->d_tag) != 0; dp++ ) {
             if( tag == DT_DEBUG ) {
@@ -508,6 +519,7 @@ GC_FirstDLOpenedLinkMap()
                 break;
             }
         }
+#endif /* !(defined(NETBSD) && __NetBSD_Version__ >= 599001900) */
     }
     return cachedResult;
 }