diff options
author | dmcmahill <dmcmahill> | 2000-06-26 18:05:44 +0000 |
---|---|---|
committer | dmcmahill <dmcmahill> | 2000-06-26 18:05:44 +0000 |
commit | d17482f5cc78bc99f8a792e251de0db298363da0 (patch) | |
tree | b37bd206b750af46f53291d9650460456a9b7bd8 /devel | |
parent | f8122e088afd73aa920071cc3042e890fe60b374 (diff) | |
download | pkgsrc-d17482f5cc78bc99f8a792e251de0db298363da0.tar.gz |
-add sparc and mipsel support. Thanks to soda for help on the mipsel part.
-it has been suggested (Soren) that the routines in sysdeps/freebsd/prockernel.c
are of minimal use anyway and should just be disabled.
-it has also been suggested (Soren) that the right way anyway is to use the KERN_PROC2 sysctl.
I do not have a recent enough machine to try this (this sysctl was not part of
NetBSD-1.4.2).
Diffstat (limited to 'devel')
-rw-r--r-- | devel/libgtop/Makefile | 5 | ||||
-rw-r--r-- | devel/libgtop/files/patch-sum | 4 | ||||
-rw-r--r-- | devel/libgtop/patches/patch-al | 47 |
3 files changed, 25 insertions, 31 deletions
diff --git a/devel/libgtop/Makefile b/devel/libgtop/Makefile index ca4addce1e3..d121625244d 100644 --- a/devel/libgtop/Makefile +++ b/devel/libgtop/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.37 2000/06/24 16:40:57 danw Exp $ +# $NetBSD: Makefile,v 1.38 2000/06/26 18:05:44 dmcmahill Exp $ DISTNAME= libgtop-1.0.9 CATEGORIES= devel gnome @@ -17,7 +17,8 @@ NOT_FOR_PLATFORM= SunOS .include "../../mk/bsd.prefs.mk" .if ${OPSYS} == NetBSD .if (${MACHINE_ARCH} != arm32) && (${MACHINE_ARCH} != i386) && \ - (${MACHINE_ARCH} != m68k) && (${MACHINE_ARCH} != powerpc) + (${MACHINE_ARCH} != m68k) && (${MACHINE_ARCH} != mipsel) && \ + (${MACHINE_ARCH} != powerpc) && (${MACHINE_ARCH} != sparc) IGNORE= "has not yet been ported to ${MACHINE_ARCH}." IGNORE+= "Please look at /usr/include/${MACHINE_ARCH}/pcb.h" IGNORE+= "and update patches/patch-al appropriately." diff --git a/devel/libgtop/files/patch-sum b/devel/libgtop/files/patch-sum index 7439676ff9b..838fbd7507d 100644 --- a/devel/libgtop/files/patch-sum +++ b/devel/libgtop/files/patch-sum @@ -1,9 +1,9 @@ -$NetBSD: patch-sum,v 1.14 2000/06/24 16:40:59 danw Exp $ +$NetBSD: patch-sum,v 1.15 2000/06/26 18:05:46 dmcmahill Exp $ MD5 (patch-ab) = 1be0d48b1e41fea46ee459a320fb11c7 MD5 (patch-ac) = f84a83914548206edccb11e1f84bf1bf MD5 (patch-ad) = 617e9e681d3576d14d2b9dd4185dfd68 MD5 (patch-ae) = 0a5362d02bbce6f831ad54078b951326 -MD5 (patch-al) = 44db8963c21d47e5f6ff90e23d71fdbf +MD5 (patch-al) = 010ee10f093b399b82479da2f64ee92e MD5 (patch-an) = 92fc474edf1d713540f7ee0a35a6dbf2 MD5 (patch-ao) = ae10e3b4bd4ee612c4fac54fccbb15a8 diff --git a/devel/libgtop/patches/patch-al b/devel/libgtop/patches/patch-al index 7c852905048..778f5870a8d 100644 --- a/devel/libgtop/patches/patch-al +++ b/devel/libgtop/patches/patch-al @@ -1,18 +1,15 @@ -$NetBSD: patch-al,v 1.8 2000/06/24 16:41:01 danw Exp $ +$NetBSD: patch-al,v 1.9 2000/06/26 18:05:46 dmcmahill Exp $ ---- sysdeps/freebsd/prockernel.c.orig Fri Jan 21 17:20:51 2000 -+++ sysdeps/freebsd/prockernel.c Mon May 1 18:56:00 2000 -@@ -34,7 +34,7 @@ - #if (!defined __OpenBSD__) && (!defined __bsdi__) +--- sysdeps/freebsd/prockernel.c.orig Sat Oct 16 14:31:43 1999 ++++ sysdeps/freebsd/prockernel.c Mon Jun 26 08:42:11 2000 +@@ -35,5 +35,5 @@ #include <sys/user.h> #endif -#if !defined(__bsdi__) && !(defined(__FreeBSD__) && defined(__alpha__)) +#if !defined(__bsdi__) && !(defined(__FreeBSD__) && defined(__alpha__)) && !defined(__NetBSD__) #include <machine/pcb.h> #endif - #if defined(__FreeBSD__) && !defined(__alpha__) -@@ -48,6 +48,11 @@ - #include <osreldate.h> +@@ -49,4 +49,9 @@ #endif +#if defined(__NetBSD__) && defined(__arm32__) @@ -22,9 +19,7 @@ $NetBSD: patch-al,v 1.8 2000/06/24 16:41:01 danw Exp $ + static const unsigned long _glibtop_sysdeps_proc_kernel_pstats = (1L << GLIBTOP_PROC_KERNEL_MIN_FLT) + - (1L << GLIBTOP_PROC_KERNEL_MAJ_FLT) + -@@ -129,8 +134,15 @@ - +@@ -130,6 +135,13 @@ glibtop_suid_enter (server); +#ifdef __NetBSD__ @@ -38,9 +33,7 @@ $NetBSD: patch-al,v 1.8 2000/06/24 16:41:01 danw Exp $ +#endif (unsigned long) &u_addr->u_stats, (char *) &pstats, sizeof (pstats)) == sizeof (pstats)) - { -@@ -149,8 +161,12 @@ - buf->flags |= _glibtop_sysdeps_proc_kernel_pstats; +@@ -150,6 +162,10 @@ } +#ifdef __NetBSD__ @@ -51,37 +44,37 @@ $NetBSD: patch-al,v 1.8 2000/06/24 16:41:01 danw Exp $ +#endif (unsigned long) &u_addr->u_pcb, (char *) &pcb, sizeof (pcb)) == sizeof (pcb)) - { -@@ -167,14 +183,32 @@ - /*xxx FreeBSD/Alpha? */ +@@ -168,4 +184,5 @@ #endif #else +#ifdef __i386__ buf->kstk_esp = (u_int64_t) pcb.pcb_tss.tss_esp0; #ifdef __bsdi__ - buf->kstk_eip = (u_int64_t) pcb.pcb_tss.tss_eip; - #else +@@ -174,6 +191,27 @@ buf->kstk_eip = (u_int64_t) pcb.pcb_tss.__tss_eip; #endif +#else -+#if defined(__NetBSD__) && defined(__m68k__) ++#if defined(__NetBSD__) ++#if defined(__m68k__) + buf->kstk_esp = (u_int64_t) pcb.pcb_usp; + buf->kstk_eip = (u_int64_t) 0; -+#else -+#if defined(__NetBSD__) && (defined(__arm32__) || defined(__powerpc__)) ++#elif (defined(__arm32__) || defined(__powerpc__)) + buf->kstk_esp = (u_int64_t) pcb.pcb_sp; + buf->kstk_eip = (u_int64_t) 0; ++#elif defined(__mipsel__) ++ buf->kstk_esp = (u_int64_t) pcb.pcb_context[8]; ++ buf->kstk_eip = (u_int64_t) 0; ++#elif defined(__sparc__) ++ buf->kstk_esp = (u_int64_t) pcb.pcb_sp; ++ buf->kstk_eip = (u_int64_t) pcb.pcb_pc; +#else -+#ifdef __NetBSD__ + /* provide some defaults for other platforms */ + buf->kstk_esp = (u_int64_t) 0; + buf->kstk_eip = (u_int64_t) 0; -+#endif -+#endif -+#endif ++#endif /* ${MACHINE_ARCH} */ ++#endif /* __NetBSD__ */ buf->flags |= _glibtop_sysdeps_proc_kernel_pcb; +#endif #endif } - |