aboutsummaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorSimon Barner <barner@FreeBSD.org>2005-09-20 00:40:08 +0000
committerSimon Barner <barner@FreeBSD.org>2005-09-20 00:40:08 +0000
commitd711a485a0330a373306e3f3880b50f8120b9df5 (patch)
treea0e0956abe0065badcea70ea0da695f0952aab7f /devel
parentd58ede3d2faa8b00a856b4564e1ed0b3a16b9eed (diff)
downloadports-d711a485a0330a373306e3f3880b50f8120b9df5.tar.gz
ports-d711a485a0330a373306e3f3880b50f8120b9df5.zip
- Fix on FreeBSD 6 and above: [1] [2]
Valgrind did not handle the following sysarch calls, and thus crashed immediately o get_fsbase o set_fsbase o get_gsbase o set_fsbase - Valgrind no longer dumps core when its client application does. [2] Valgrind-snapshot does contain for safing the client's core dump, but it does not work (it resulted in a crash) and has therefore been disabled. - Fix crash with valgrind-snapshot when the application to debug does not exists or cannot be accessed. - Fix symlink farms for threading libraries. FreeBSD 4-7 are handled. [2] - Bump PORTREVISION Reported by: Ulrich Spoerlein <q@galgenberg.net> [1], Chris Gilbert <Chris@lainos.org> [2] PR: ports/86007 [1]
Notes
Notes: svn path=/head/; revision=143183
Diffstat (limited to 'devel')
-rw-r--r--devel/valgrind-snapshot/Makefile27
-rw-r--r--devel/valgrind-snapshot/files/patch-Makefile.am52
-rw-r--r--devel/valgrind-snapshot/files/patch-configure11
-rw-r--r--devel/valgrind-snapshot/files/patch-configure.in65
-rw-r--r--devel/valgrind-snapshot/files/patch-coregrind-vg_signals.c15
-rw-r--r--devel/valgrind-snapshot/files/patch-coregrind_Makefile.am51
-rw-r--r--devel/valgrind-snapshot/files/patch-coregrind_vg_main.c27
-rw-r--r--devel/valgrind-snapshot/files/patch-coregrind_vg_syscalls.c56
-rw-r--r--devel/valgrind-snapshot/pkg-plist9
-rw-r--r--devel/valgrind/Makefile27
-rw-r--r--devel/valgrind/files/patch-Makefile.am54
-rw-r--r--devel/valgrind/files/patch-configure11
-rw-r--r--devel/valgrind/files/patch-configure.in49
-rw-r--r--devel/valgrind/files/patch-coregrind_Makefile.am51
-rw-r--r--devel/valgrind/files/patch-coregrind_vg_signals.c18
-rw-r--r--devel/valgrind/files/patch-coregrind_vg_syscalls.c56
-rw-r--r--devel/valgrind/files/patch-include_vg_kerneliface.h11
-rw-r--r--devel/valgrind/pkg-plist9
18 files changed, 563 insertions, 36 deletions
diff --git a/devel/valgrind-snapshot/Makefile b/devel/valgrind-snapshot/Makefile
index 9e280c1ba946..0c4c79ecf686 100644
--- a/devel/valgrind-snapshot/Makefile
+++ b/devel/valgrind-snapshot/Makefile
@@ -7,7 +7,7 @@
PORTNAME= valgrind
PORTVERSION= 352
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= devel
MASTER_SITES= http://www.rabson.org/
PKGNAMESUFFIX= -snapshot
@@ -26,22 +26,41 @@ USE_GNOME= pkgconfig
USE_PERL5_BUILD=yes
USE_REINPLACE= yes
GNU_CONFIGURE= yes
+USE_AUTOTOOLS+= autoconf:259 aclocal:19 automake:19
CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
WRKSRC= ${WRKDIR}/${DISTNAME}
.include <bsd.port.pre.mk>
-.if ${OSVERSION} >= 500000
+.if ${OSVERSION} >= 700000
+PLIST_SUB+= RELENG_4="@comment "
+PLIST_SUB+= RELENG_5="@comment "
+PLIST_SUB+= RELENG_6="@comment "
+PLIST_SUB+= RELENG_7=""
+.else
+.if ${OSVERSION} >= 600000
+PLIST_SUB+= RELENG_4="@comment "
+PLIST_SUB+= RELENG_5="@comment "
+PLIST_SUB+= RELENG_6=""
+PLIST_SUB+= RELENG_7="@comment "
+.else
+.if ${OSVERSION} >= 500000
PLIST_SUB+= RELENG_4="@comment "
PLIST_SUB+= RELENG_5=""
+PLIST_SUB+= RELENG_6="@comment "
+PLIST_SUB+= RELENG_7="@comment "
.else
PLIST_SUB+= RELENG_4=""
PLIST_SUB+= RELENG_5="@comment "
+PLIST_SUB+= RELENG_6="@comment "
+PLIST_SUB+= RELENG_7="@comment "
+.endif
+.endif
.endif
.if ${PERL_LEVEL} < 500601
-IGNORE= "can\'t be built. Your Perl version is too old. Please use lang/perl5.8 port to upgrade your Perl"
+IGNORE= can\'t be built. Your Perl version is too old. Please use lang/perl5.8 port to upgrade your Perl
.endif
PROCFS!= /sbin/mount | ${GREP} '^procfs' | ${AWK} '{print $1}'
@@ -59,7 +78,7 @@ pre-everything::
#
.ifndef (PACKAGE_BUILDING)
ECHO_MSG=/usr/bin/printf
-IGNORE= needs a running procfs, which is not\n\
+IGNORE= needs a running procfs, which is not\n\
\ \ \ \ \ activated on your system. Please read the procfs\(5\)\n\
\ \ \ \ \ man page and add the following line to /etc/fstab:\n\
\n\
diff --git a/devel/valgrind-snapshot/files/patch-Makefile.am b/devel/valgrind-snapshot/files/patch-Makefile.am
new file mode 100644
index 000000000000..a1d24a03edb8
--- /dev/null
+++ b/devel/valgrind-snapshot/files/patch-Makefile.am
@@ -0,0 +1,52 @@
+--- Makefile.am.orig Sun May 9 13:00:57 2004
++++ Makefile.am Tue Sep 20 00:04:44 2005
+@@ -55,26 +55,44 @@
+ if !IS_LINUX
+ if IS_FREEBSD4
+ rm -f $(DESTDIR)$(valdir)/libc_r.so.4
+-else
++endif
++if IS_FREEBSD5
+ rm -f $(DESTDIR)$(valdir)/libc_r.so.5
+ rm -f $(DESTDIR)$(valdir)/libkse.so.1
+ rm -f $(DESTDIR)$(valdir)/libthr.so.1
+-if !IS_FREEBSD_LIBC_R
+ rm -f $(DESTDIR)$(valdir)/libpthread.so.1
+ endif
++if IS_FREEBSD6
++ rm -f $(DESTDIR)$(valdir)/libc_r.so.6
++ rm -f $(DESTDIR)$(valdir)/libthr.so.2
++ rm -f $(DESTDIR)$(valdir)/libpthread.so.2
++endif
++if IS_FREEBSD7
++ rm -f $(DESTDIR)$(valdir)/libc_r.so.6
++ rm -f $(DESTDIR)$(valdir)/libthr.so.2
++ rm -f $(DESTDIR)$(valdir)/libpthread.so.2
+ endif
+ endif
+- $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libpthread.so.0
+ if !IS_LINUX
+ if IS_FREEBSD4
+ $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libc_r.so.4
+-else
++ $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libpthread.so.0
++endif
++if IS_FREEBSD5
+ $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libc_r.so.5
+ $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libkse.so.1
+ $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libthr.so.1
+-if !IS_FREEBSD_LIBC_R
+ $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libpthread.so.1
+ endif
++if IS_FREEBSD6
++ $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libc_r.so.6
++ $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libthr.so.2
++ $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libpthread.so.2
++endif
++if IS_FREEBSD7
++ $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libc_r.so.6
++ $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libthr.so.2
++ $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libpthread.so.2
+ endif
+ endif
+
diff --git a/devel/valgrind-snapshot/files/patch-configure b/devel/valgrind-snapshot/files/patch-configure
deleted file mode 100644
index 9827b92dbace..000000000000
--- a/devel/valgrind-snapshot/files/patch-configure
+++ /dev/null
@@ -1,11 +0,0 @@
---- configure.orig Sat Aug 21 00:03:33 2004
-+++ configure Sat Aug 21 00:03:13 2004
-@@ -4020,7 +4020,7 @@
-
- ;;
-
-- *freebsd5*)
-+ *freebsd[567]*)
- echo "$as_me:$LINENO: result: ok (${host_os})" >&5
- echo "${ECHO_T}ok (${host_os})" >&6
- VG_PLATFORM="x86-freebsd"
diff --git a/devel/valgrind-snapshot/files/patch-configure.in b/devel/valgrind-snapshot/files/patch-configure.in
new file mode 100644
index 000000000000..9a081e014d92
--- /dev/null
+++ b/devel/valgrind-snapshot/files/patch-configure.in
@@ -0,0 +1,65 @@
+--- configure.in.orig Sun May 9 13:00:57 2004
++++ configure.in Tue Sep 20 00:12:06 2005
+@@ -132,23 +132,40 @@
+ ;;
+ esac
+ AM_CONDITIONAL(IS_FREEBSD4, false)
+- AM_CONDITIONAL(IS_FREEBSD_LIBC_R, false)
+
+ ;;
+
++ *freebsd7*)
++ AC_MSG_RESULT([ok (${host_os})])
++ VG_PLATFORM="x86-freebsd"
++ AM_CONDITIONAL(IS_LINUX, false)
++ AM_CONDITIONAL(IS_FREEBSD4, false)
++ AM_CONDITIONAL(IS_FREEBSD5, false)
++ AM_CONDITIONAL(IS_FREEBSD6, false)
++ AM_CONDITIONAL(IS_FREEBSD7, true)
++ AM_CONDITIONAL(IS_FREEBSD_LIBC_R, false)
++
++ ;;
++ *freebsd6*)
++ AC_MSG_RESULT([ok (${host_os})])
++ VG_PLATFORM="x86-freebsd"
++ AM_CONDITIONAL(IS_LINUX, false)
++ AM_CONDITIONAL(IS_FREEBSD4, false)
++ AM_CONDITIONAL(IS_FREEBSD5, false)
++ AM_CONDITIONAL(IS_FREEBSD6, true)
++ AM_CONDITIONAL(IS_FREEBSD7, false)
++ AM_CONDITIONAL(IS_FREEBSD_LIBC_R, false)
++
++ ;;
+ *freebsd5*)
+ AC_MSG_RESULT([ok (${host_os})])
+ VG_PLATFORM="x86-freebsd"
+ AM_CONDITIONAL(IS_LINUX, false)
+ AM_CONDITIONAL(IS_FREEBSD4, false)
+-
+- osreldate=`sysctl -n kern.osreldate`
+- if test $osreldate -lt 502102; then
+- AM_CONDITIONAL(IS_FREEBSD_LIBC_R, true)
+- else
+- AM_CONDITIONAL(IS_FREEBSD_LIBC_R, false)
+- fi
+-
++ AM_CONDITIONAL(IS_FREEBSD5, true)
++ AM_CONDITIONAL(IS_FREEBSD6, false)
++ AM_CONDITIONAL(IS_FREEBSD7, false)
++ AM_CONDITIONAL(IS_FREEBSD_LIBC_R, false)
+ ;;
+
+ *freebsd4*)
+@@ -156,8 +173,10 @@
+ VG_PLATFORM="x86-freebsd"
+ AM_CONDITIONAL(IS_LINUX, false)
+ AM_CONDITIONAL(IS_FREEBSD4, true)
+- AM_CONDITIONAL(IS_FREEBSD_LIBC_R, true)
+-
++ AM_CONDITIONAL(IS_FREEBSD5, false)
++ AM_CONDITIONAL(IS_FREEBSD6, false)
++ AM_CONDITIONAL(IS_FREEBSD7, false)
++ AM_CONDITIONAL(IS_FREEBSD_LIBC_R, false)
+ ;;
+
+ *)
diff --git a/devel/valgrind-snapshot/files/patch-coregrind-vg_signals.c b/devel/valgrind-snapshot/files/patch-coregrind-vg_signals.c
index c8b593f43028..79d868695a22 100644
--- a/devel/valgrind-snapshot/files/patch-coregrind-vg_signals.c
+++ b/devel/valgrind-snapshot/files/patch-coregrind-vg_signals.c
@@ -1,5 +1,5 @@
---- coregrind/vg_signals.c.orig Tue Aug 31 22:39:50 2004
-+++ coregrind/vg_signals.c Tue Aug 31 22:41:36 2004
+--- coregrind/vg_signals.c.orig Sun May 9 13:00:57 2004
++++ coregrind/vg_signals.c Mon Sep 19 18:18:07 2005
@@ -1374,6 +1374,12 @@
#define NT_PRXFPREG 0x46e62b7f /* copied from gdb5.1/include/elf/common.h */
#endif /* NT_PRXFPREG */
@@ -13,3 +13,14 @@
/* If true, then this Segment may be mentioned in the core */
static Bool may_dump(const Segment *seg)
{
+@@ -1900,8 +1906,8 @@
+ if (core) {
+ static struct vki_rlimit zero = { 0, 0 };
+
+- make_coredump(tid, info, corelim.rlim_cur);
+-
++ // make_coredump(tid, info, corelim.rlim_cur);
++ VG_(message) (Vg_UserMsg, "Core dumping is broken on FreeBSD. Please re-run valgrind after fixing the crash.");
+ /* make sure we don't get a confusing kernel-generated coredump */
+ VG_(setrlimit)(VKI_RLIMIT_CORE, &zero);
+ }
diff --git a/devel/valgrind-snapshot/files/patch-coregrind_Makefile.am b/devel/valgrind-snapshot/files/patch-coregrind_Makefile.am
new file mode 100644
index 000000000000..1c0c3f0ad94b
--- /dev/null
+++ b/devel/valgrind-snapshot/files/patch-coregrind_Makefile.am
@@ -0,0 +1,51 @@
+--- coregrind/Makefile.am.orig Sun May 9 13:00:57 2004
++++ coregrind/Makefile.am Tue Sep 20 00:04:17 2005
+@@ -172,11 +172,23 @@
+ vg_unsafe.h
+
+ if !IS_LINUX
++if IS_FREEBSD5
+ MANUAL_DEPS_EXTRA = $(inplacedir)/libc_r.so.5 \
+ $(inplacedir)/libkse.so.1 \
+ $(inplacedir)/libthr.so.1 \
+ $(inplacedir)/libpthread.so.1
+ endif
++if IS_FREEBSD6
++MANUAL_DEPS_EXTRA = $(inplacedir)/libc_r.so.6 \
++ $(inplacedir)/libthr.so.2 \
++ $(inplacedir)/libpthread.so.2
++endif
++if IS_FREEBSD7
++MANUAL_DEPS_EXTRA = $(inplacedir)/libc_r.so.6 \
++ $(inplacedir)/libthr.so.2 \
++ $(inplacedir)/libpthread.so.2
++endif
++endif
+
+ MANUAL_DEPS = $(noinst_HEADERS) $(include_HEADERS) $(inplacedir)/libpthread.so.0 ${MANUAL_DEPS_EXTRA}
+
+@@ -190,9 +202,23 @@
+ ln -sf $(top_builddir)/$(subdir)/$$i $$to; \
+ done
+ if !IS_LINUX
+- ln -sf libpthread.so.0 $(inplacedir)/libc_r.so.5
++if IS_FREEBSD4
+ ln -sf libpthread.so.0 $(inplacedir)/libc_r.so.4
++endif
++if IS_FREEBSD5
++ ln -sf libpthread.so.0 $(inplacedir)/libc_r.so.5
+ ln -sf libpthread.so.0 $(inplacedir)/libkse.so.1
+ ln -sf libpthread.so.0 $(inplacedir)/libthr.so.1
+ ln -sf libpthread.so.0 $(inplacedir)/libpthread.so.1
++endif
++if IS_FREEBSD6
++ ln -sf libpthread.so.0 $(inplacedir)/libc_r.so.6
++ ln -sf libpthread.so.0 $(inplacedir)/libthr.so.2
++ ln -sf libpthread.so.0 $(inplacedir)/libpthread.so.2
++endif
++if IS_FREEBSD7
++ ln -sf libpthread.so.0 $(inplacedir)/libc_r.so.6
++ ln -sf libpthread.so.0 $(inplacedir)/libthr.so.2
++ ln -sf libpthread.so.0 $(inplacedir)/libpthread.so.2
++endif
+ endif
diff --git a/devel/valgrind-snapshot/files/patch-coregrind_vg_main.c b/devel/valgrind-snapshot/files/patch-coregrind_vg_main.c
new file mode 100644
index 000000000000..88220ecfb985
--- /dev/null
+++ b/devel/valgrind-snapshot/files/patch-coregrind_vg_main.c
@@ -0,0 +1,27 @@
+--- coregrind/vg_main.c.orig Tue Sep 20 02:21:16 2005
++++ coregrind/vg_main.c Tue Sep 20 02:22:29 2005
+@@ -1286,6 +1286,7 @@
+
+ static const char* find_executable(const char* exec)
+ {
++ int found=0;
+ vg_assert(NULL != exec);
+ if (strchr(exec, '/') == NULL) {
+ /* no '/' - we need to search the path */
+@@ -1304,12 +1305,16 @@
+ if (access(buf, R_OK|X_OK) == 0) {
+ exec = strdup(buf);
+ vg_assert(NULL != exec);
++ found=1;
+ return 1;
+ }
+ return 0;
+ }
+ scan_colsep(path, match_exe);
+ }
++ if (!found)
++ return 0;
++
+ return exec;
+ }
+
diff --git a/devel/valgrind-snapshot/files/patch-coregrind_vg_syscalls.c b/devel/valgrind-snapshot/files/patch-coregrind_vg_syscalls.c
new file mode 100644
index 000000000000..f18c56469461
--- /dev/null
+++ b/devel/valgrind-snapshot/files/patch-coregrind_vg_syscalls.c
@@ -0,0 +1,56 @@
+--- coregrind/vg_syscalls.c.orig Fri Jul 16 19:21:08 2004
++++ coregrind/vg_syscalls.c Wed Sep 14 22:13:44 2005
+@@ -1369,6 +1369,38 @@
+ &tst->m_eflags,
+ arg1, arg2);
+ break;
++ case 7:
++ SYSCALL_TRACK( pre_mem_write, tid,
++ "sysarch.get_fsbase(args)", arg2, sizeof(UInt));
++ tst->m_eax = VG_(do_syscall_err)(__NR_sysarch,
++ tst->m_edx,
++ &tst->m_eflags,
++ arg1, arg2);
++ break;
++ case 8:
++ SYSCALL_TRACK( pre_mem_read, tid,
++ "sysarch.set_fsbase(args)", arg2, sizeof(UInt));
++ tst->m_eax = VG_(do_syscall_err)(__NR_sysarch,
++ tst->m_edx,
++ &tst->m_eflags,
++ arg1, arg2);
++ break;
++ case 9:
++ SYSCALL_TRACK( pre_mem_read, tid,
++ "sysarch.get_gsbase(args)", arg2, sizeof(UInt));
++ tst->m_eax = VG_(do_syscall_err)(__NR_sysarch,
++ tst->m_edx,
++ &tst->m_eflags,
++ arg1, arg2);
++ break;
++ case 10:
++ SYSCALL_TRACK( pre_mem_read, tid,
++ "sysarch.set_gsbase(args)", arg2, sizeof(UInt));
++ tst->m_eax = VG_(do_syscall_err)(__NR_sysarch,
++ tst->m_edx,
++ &tst->m_eflags,
++ arg1, arg2);
++ break;
+ default:
+ VG_(core_panic)("Unhandled sysarch call");
+ }
+@@ -1392,6 +1424,14 @@
+ break;
+ case 6: /* vm86 */
+ break;
++ case 7: /* get_fsbase */
++ break;
++ case 8: /* set_fsbase */
++ break;
++ case 9: /* get_gsbase */
++ break;
++ case 10: /* set_gsbase */
++ break;
+ default:
+ VG_(core_panic)("Unhandled sysarch call");
+ }
diff --git a/devel/valgrind-snapshot/pkg-plist b/devel/valgrind-snapshot/pkg-plist
index 65cb439eb8d3..aa1453871c4b 100644
--- a/devel/valgrind-snapshot/pkg-plist
+++ b/devel/valgrind-snapshot/pkg-plist
@@ -16,10 +16,15 @@ lib/valgrind/hp2ps
%%RELENG_4%%lib/valgrind/libc_r.so.4
%%RELENG_5%%lib/valgrind/libc_r.so.5
%%RELENG_5%%lib/valgrind/libkse.so.1
-lib/valgrind/libpthread.so
-lib/valgrind/libpthread.so.0
%%RELENG_5%%lib/valgrind/libpthread.so.1
%%RELENG_5%%lib/valgrind/libthr.so.1
+%%RELENG_6%%lib/valgrind/libc_r.so.6
+%%RELENG_6%%lib/valgrind/libpthread.so.2
+%%RELENG_6%%lib/valgrind/libthr.so.2
+%%RELENG_7%%lib/valgrind/libc_r.so.6
+%%RELENG_7%%lib/valgrind/libpthread.so.2
+%%RELENG_7%%lib/valgrind/libthr.so.2
+lib/valgrind/libpthread.so
lib/valgrind/stage2
lib/valgrind/valgrind
lib/valgrind/vg_inject.so
diff --git a/devel/valgrind/Makefile b/devel/valgrind/Makefile
index efb13f0e8e74..7f9dbd3deb13 100644
--- a/devel/valgrind/Makefile
+++ b/devel/valgrind/Makefile
@@ -7,7 +7,7 @@
PORTNAME= valgrind
PORTVERSION= 352
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= devel
MASTER_SITES= http://www.rabson.org/
DISTNAME= ${PORTNAME}-stable-${PORTVERSION}
@@ -21,6 +21,7 @@ WRKSRC= ${WRKDIR}/${DISTNAME}
USE_GMAKE= yes
USE_GNOME= pkgconfig
GNU_CONFIGURE= yes
+USE_AUTOTOOLS+= autoconf:259 aclocal:19 automake:19
CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ARGS+=--enable-maintainer-mode
USE_REINPLACE= yes
@@ -28,16 +29,34 @@ USE_PERL5_BUILD=yes
.include <bsd.port.pre.mk>
+.if ${OSVERSION} >= 700000
+PLIST_SUB+= RELENG_4="@comment "
+PLIST_SUB+= RELENG_5="@comment "
+PLIST_SUB+= RELENG_6="@comment "
+PLIST_SUB+= RELENG_7=""
+.else
+.if ${OSVERSION} >= 600000
+PLIST_SUB+= RELENG_4="@comment "
+PLIST_SUB+= RELENG_5="@comment "
+PLIST_SUB+= RELENG_6=""
+PLIST_SUB+= RELENG_7="@comment "
+.else
.if ${OSVERSION} >= 500000
-PLIST_SUB+= RELENG_5=""
PLIST_SUB+= RELENG_4="@comment "
+PLIST_SUB+= RELENG_5=""
+PLIST_SUB+= RELENG_6="@comment "
+PLIST_SUB+= RELENG_7="@comment "
.else
PLIST_SUB+= RELENG_4=""
PLIST_SUB+= RELENG_5="@comment "
+PLIST_SUB+= RELENG_6="@comment "
+PLIST_SUB+= RELENG_7="@comment "
+.endif
+.endif
.endif
.if ${PERL_LEVEL} < 500601
-IGNORE= "can\'t be built. Your Perl version is too old. Please use lang/perl5.8 port to upgrade your Perl"
+IGNORE= can\'t be built. Your Perl version is too old. Please use lang/perl5.8 port to upgrade your Perl
.endif
PROCFS!= /sbin/mount | ${GREP} '^procfs' | ${AWK} '{print $1}'
@@ -55,7 +74,7 @@ pre-everything::
#
.ifndef (PACKAGE_BUILDING)
ECHO_MSG=/usr/bin/printf
-IGNORE= needs a running procfs, which is not\n\
+IGNORE= needs a running procfs, which is not\n\
\ \ \ \ \ activated on your system. Please read the procfs\(5\)\n\
\ \ \ \ \ man page and add the following line to /etc/fstab:\n\
\n\
diff --git a/devel/valgrind/files/patch-Makefile.am b/devel/valgrind/files/patch-Makefile.am
new file mode 100644
index 000000000000..1d52c6bf7e90
--- /dev/null
+++ b/devel/valgrind/files/patch-Makefile.am
@@ -0,0 +1,54 @@
+--- Makefile.am.orig Thu Apr 8 21:05:08 2004
++++ Makefile.am Tue Sep 20 00:01:29 2005
+@@ -50,26 +50,46 @@
+
+ install-exec-hook:
+ $(mkinstalldirs) $(DESTDIR)$(valdir)
+- rm -f $(DESTDIR)$(valdir)/libpthread.so.0
++
+ if !IS_LINUX
+ if IS_FREEBSD4
+ rm -f $(DESTDIR)$(valdir)/libc_r.so.4
+-else
++endif
++if IS_FREEBSD5
+ rm -f $(DESTDIR)$(valdir)/libc_r.so.5
+ rm -f $(DESTDIR)$(valdir)/libkse.so.1
+ rm -f $(DESTDIR)$(valdir)/libthr.so.1
+- rm -f $(DESTDIR)$(valdir)/libpthread.so.1
++endif
++if IS_FREEBSD6
++ rm -f $(DESTDIR)$(valdir)/libc_r.so.6
++ rm -f $(DESTDIR)$(valdir)/libthr.so.2
++ rm -f $(DESTDIR)$(valdir)/libpthread.so.2
++endif
++if IS_FREEBSD7
++ rm -f $(DESTDIR)$(valdir)/libc_r.so.6
++ rm -f $(DESTDIR)$(valdir)/libthr.so.2
++ rm -f $(DESTDIR)$(valdir)/libpthread.so.2
+ endif
+ endif
+- $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libpthread.so.0
+ if !IS_LINUX
+ if IS_FREEBSD4
+ $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libc_r.so.4
+-else
++endif
++if IS_FREEBSD5
+ $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libc_r.so.5
+ $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libkse.so.1
+ $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libthr.so.1
+ $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libpthread.so.1
++endif
++if IS_FREEBSD6
++ $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libc_r.so.6
++ $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libthr.so.2
++ $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libpthread.so.2
++endif
++if IS_FREEBSD7
++ $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libc_r.so.6
++ $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libthr.so.2
++ $(LN_S) libpthread.so $(DESTDIR)$(valdir)/libpthread.so.2
+ endif
+ endif
+
diff --git a/devel/valgrind/files/patch-configure b/devel/valgrind/files/patch-configure
deleted file mode 100644
index 86bf6240d9a4..000000000000
--- a/devel/valgrind/files/patch-configure
+++ /dev/null
@@ -1,11 +0,0 @@
---- configure.orig Sat Aug 21 00:06:00 2004
-+++ configure Sat Aug 21 00:06:24 2004
-@@ -4010,7 +4010,7 @@
-
- ;;
-
-- *freebsd5*)
-+ *freebsd[567]*)
- echo "$as_me:$LINENO: result: ok (${host_os})" >&5
- echo "${ECHO_T}ok (${host_os})" >&6
- VG_PLATFORM="x86-freebsd"
diff --git a/devel/valgrind/files/patch-configure.in b/devel/valgrind/files/patch-configure.in
new file mode 100644
index 000000000000..54349f9ffe06
--- /dev/null
+++ b/devel/valgrind/files/patch-configure.in
@@ -0,0 +1,49 @@
+--- configure.in.orig Sun Mar 14 13:52:47 2004
++++ configure.in Mon Sep 19 23:58:01 2005
+@@ -135,11 +135,35 @@
+
+ ;;
+
++ *freebsd7*)
++ AC_MSG_RESULT([ok (${host_os})])
++ VG_PLATFORM="x86-freebsd"
++ AM_CONDITIONAL(IS_LINUX, false)
++ AM_CONDITIONAL(IS_FREEBSD4, false)
++ AM_CONDITIONAL(IS_FREEBSD5, false)
++ AM_CONDITIONAL(IS_FREEBSD6, false)
++ AM_CONDITIONAL(IS_FREEBSD7, true)
++
++ ;;
++ *freebsd6*)
++ AC_MSG_RESULT([ok (${host_os})])
++ VG_PLATFORM="x86-freebsd"
++ AM_CONDITIONAL(IS_LINUX, false)
++ AM_CONDITIONAL(IS_FREEBSD4, false)
++ AM_CONDITIONAL(IS_FREEBSD5, false)
++ AM_CONDITIONAL(IS_FREEBSD6, true)
++ AM_CONDITIONAL(IS_FREEBSD7, false)
++
++ ;;
++
+ *freebsd5*)
+ AC_MSG_RESULT([ok (${host_os})])
+ VG_PLATFORM="x86-freebsd"
+ AM_CONDITIONAL(IS_LINUX, false)
+ AM_CONDITIONAL(IS_FREEBSD4, false)
++ AM_CONDITIONAL(IS_FREEBSD5, true)
++ AM_CONDITIONAL(IS_FREEBSD6, false)
++ AM_CONDITIONAL(IS_FREEBSD7, false)
+
+ ;;
+
+@@ -148,7 +172,9 @@
+ VG_PLATFORM="x86-freebsd"
+ AM_CONDITIONAL(IS_LINUX, false)
+ AM_CONDITIONAL(IS_FREEBSD4, true)
+-
++ AM_CONDITIONAL(IS_FREEBSD5, false)
++ AM_CONDITIONAL(IS_FREEBSD6, false)
++ AM_CONDITIONAL(IS_FREEBSD7, false)
+ ;;
+
+ *)
diff --git a/devel/valgrind/files/patch-coregrind_Makefile.am b/devel/valgrind/files/patch-coregrind_Makefile.am
new file mode 100644
index 000000000000..c3eff9742481
--- /dev/null
+++ b/devel/valgrind/files/patch-coregrind_Makefile.am
@@ -0,0 +1,51 @@
+--- coregrind/Makefile.am.orig Sun Mar 14 13:52:47 2004
++++ coregrind/Makefile.am Tue Sep 20 00:01:58 2005
+@@ -162,11 +162,23 @@
+ vg_unsafe.h
+
+ if !IS_LINUX
++if IS_FREEBSD5
+ MANUAL_DEPS_EXTRA = $(inplacedir)/libc_r.so.5 \
+ $(inplacedir)/libkse.so.1 \
+ $(inplacedir)/libthr.so.1 \
+ $(inplacedir)/libpthread.so.1
+ endif
++if IS_FREEBSD6
++MANUAL_DEPS_EXTRA = $(inplacedir)/libc_r.so.6 \
++ $(inplacedir)/libthr.so.2 \
++ $(inplacedir)/libpthread.so.2
++endif
++if IS_FREEBSD7
++MANUAL_DEPS_EXTRA = $(inplacedir)/libc_r.so.6 \
++ $(inplacedir)/libthr.so.2 \
++ $(inplacedir)/libpthread.so.2
++endif
++endif
+
+ MANUAL_DEPS = $(noinst_HEADERS) $(include_HEADERS) $(inplacedir)/libpthread.so.0 ${MANUAL_DEPS_EXTRA}
+
+@@ -180,9 +192,23 @@
+ ln -sf $(top_srcdir)/$(subdir)/$$i $$to; \
+ done
+ if !IS_LINUX
+- ln -sf libpthread.so.0 $(inplacedir)/libc_r.so.5
++if IS_FREEBSD4
+ ln -sf libpthread.so.0 $(inplacedir)/libc_r.so.4
++endif
++if IS_FREEBSD5
++ ln -sf libpthread.so.0 $(inplacedir)/libc_r.so.5
+ ln -sf libpthread.so.0 $(inplacedir)/libkse.so.1
+ ln -sf libpthread.so.0 $(inplacedir)/libthr.so.1
+ ln -sf libpthread.so.0 $(inplacedir)/libpthread.so.1
++endif
++if IS_FREEBSD6
++ ln -sf libpthread.so.0 $(inplacedir)/libc_r.so.6
++ ln -sf libpthread.so.0 $(inplacedir)/libthr.so.2
++ ln -sf libpthread.so.0 $(inplacedir)/libpthread.so.2
++endif
++if IS_FREEBSD7
++ ln -sf libpthread.so.0 $(inplacedir)/libc_r.so.6
++ ln -sf libpthread.so.0 $(inplacedir)/libthr.so.2
++ ln -sf libpthread.so.0 $(inplacedir)/libpthread.so.2
++endif
+ endif
diff --git a/devel/valgrind/files/patch-coregrind_vg_signals.c b/devel/valgrind/files/patch-coregrind_vg_signals.c
new file mode 100644
index 000000000000..be277882e91a
--- /dev/null
+++ b/devel/valgrind/files/patch-coregrind_vg_signals.c
@@ -0,0 +1,18 @@
+--- coregrind/vg_signals.c.orig Mon Sep 19 21:16:07 2005
++++ coregrind/vg_signals.c Mon Sep 19 21:28:05 2005
+@@ -1488,6 +1488,15 @@
+ VG_(start_GDB)( tid );
+ }
+
++ if (core) {
++ static struct vki_rlimit zero = { 0, 0 };
++
++ VG_(message) (Vg_UserMsg, "Core dumping not implemented. Please re-run valgrind after fixing the crash.");
++
++ /* make sure we don't get a confusing kernel-generated coredump */
++ VG_(setrlimit)(VKI_RLIMIT_CORE, &zero);
++ }
++
+ if (VG_(fatal_signal_set)) {
+ VG_(fatal_sigNo) = sigNo;
+ __builtin_longjmp(VG_(fatal_signal_jmpbuf), 1);
diff --git a/devel/valgrind/files/patch-coregrind_vg_syscalls.c b/devel/valgrind/files/patch-coregrind_vg_syscalls.c
new file mode 100644
index 000000000000..f18c56469461
--- /dev/null
+++ b/devel/valgrind/files/patch-coregrind_vg_syscalls.c
@@ -0,0 +1,56 @@
+--- coregrind/vg_syscalls.c.orig Fri Jul 16 19:21:08 2004
++++ coregrind/vg_syscalls.c Wed Sep 14 22:13:44 2005
+@@ -1369,6 +1369,38 @@
+ &tst->m_eflags,
+ arg1, arg2);
+ break;
++ case 7:
++ SYSCALL_TRACK( pre_mem_write, tid,
++ "sysarch.get_fsbase(args)", arg2, sizeof(UInt));
++ tst->m_eax = VG_(do_syscall_err)(__NR_sysarch,
++ tst->m_edx,
++ &tst->m_eflags,
++ arg1, arg2);
++ break;
++ case 8:
++ SYSCALL_TRACK( pre_mem_read, tid,
++ "sysarch.set_fsbase(args)", arg2, sizeof(UInt));
++ tst->m_eax = VG_(do_syscall_err)(__NR_sysarch,
++ tst->m_edx,
++ &tst->m_eflags,
++ arg1, arg2);
++ break;
++ case 9:
++ SYSCALL_TRACK( pre_mem_read, tid,
++ "sysarch.get_gsbase(args)", arg2, sizeof(UInt));
++ tst->m_eax = VG_(do_syscall_err)(__NR_sysarch,
++ tst->m_edx,
++ &tst->m_eflags,
++ arg1, arg2);
++ break;
++ case 10:
++ SYSCALL_TRACK( pre_mem_read, tid,
++ "sysarch.set_gsbase(args)", arg2, sizeof(UInt));
++ tst->m_eax = VG_(do_syscall_err)(__NR_sysarch,
++ tst->m_edx,
++ &tst->m_eflags,
++ arg1, arg2);
++ break;
+ default:
+ VG_(core_panic)("Unhandled sysarch call");
+ }
+@@ -1392,6 +1424,14 @@
+ break;
+ case 6: /* vm86 */
+ break;
++ case 7: /* get_fsbase */
++ break;
++ case 8: /* set_fsbase */
++ break;
++ case 9: /* get_gsbase */
++ break;
++ case 10: /* set_gsbase */
++ break;
+ default:
+ VG_(core_panic)("Unhandled sysarch call");
+ }
diff --git a/devel/valgrind/files/patch-include_vg_kerneliface.h b/devel/valgrind/files/patch-include_vg_kerneliface.h
new file mode 100644
index 000000000000..e9b9973ec183
--- /dev/null
+++ b/devel/valgrind/files/patch-include_vg_kerneliface.h
@@ -0,0 +1,11 @@
+--- include/vg_kerneliface.h.orig Mon Sep 19 21:20:22 2005
++++ include/vg_kerneliface.h Mon Sep 19 21:22:41 2005
+@@ -975,6 +975,8 @@
+ unsigned long long rlim_max;
+ } vki_rlimit;
+
++#define VKI_RLIMIT_DATA 2
++#define VKI_RLIMIT_CORE 4
+ #define VKI_RLIMIT_NOFILE 8
+ #endif
+
diff --git a/devel/valgrind/pkg-plist b/devel/valgrind/pkg-plist
index b918413a03fe..213c0d4828c1 100644
--- a/devel/valgrind/pkg-plist
+++ b/devel/valgrind/pkg-plist
@@ -15,10 +15,15 @@ lib/valgrind/glibc-2.3.supp
%%RELENG_4%%lib/valgrind/libc_r.so.4
%%RELENG_5%%lib/valgrind/libc_r.so.5
%%RELENG_5%%lib/valgrind/libkse.so.1
-lib/valgrind/libpthread.so
-lib/valgrind/libpthread.so.0
%%RELENG_5%%lib/valgrind/libpthread.so.1
%%RELENG_5%%lib/valgrind/libthr.so.1
+%%RELENG_6%%lib/valgrind/libc_r.so.6
+%%RELENG_6%%lib/valgrind/libpthread.so.2
+%%RELENG_6%%lib/valgrind/libthr.so.2
+%%RELENG_7%%lib/valgrind/libc_r.so.6
+%%RELENG_7%%lib/valgrind/libpthread.so.2
+%%RELENG_7%%lib/valgrind/libthr.so.2
+lib/valgrind/libpthread.so
lib/valgrind/stage2
lib/valgrind/valgrind
lib/valgrind/vg_inject.so