diff options
author | Volker Stolz <vs@FreeBSD.org> | 2004-12-27 11:41:40 +0000 |
---|---|---|
committer | Volker Stolz <vs@FreeBSD.org> | 2004-12-27 11:41:40 +0000 |
commit | 006ecc902e1227fa3cc99291097cc3b986b79018 (patch) | |
tree | e55d9b2825de3158e367b4b714f400cade6ab8d3 /devel/valgrind | |
parent | 9ab18be7abf1f1e92bc9c5dd58c6c6c543ee10c4 (diff) | |
download | ports-006ecc902e1227fa3cc99291097cc3b986b79018.tar.gz ports-006ecc902e1227fa3cc99291097cc3b986b79018.zip |
Notes
Diffstat (limited to 'devel/valgrind')
-rw-r--r-- | devel/valgrind/Makefile | 30 | ||||
-rw-r--r-- | devel/valgrind/pkg-message | 10 | ||||
-rw-r--r-- | devel/valgrind/pkg-plist | 1 |
3 files changed, 38 insertions, 3 deletions
diff --git a/devel/valgrind/Makefile b/devel/valgrind/Makefile index 9e855f83fe58..f0fc0adc6506 100644 --- a/devel/valgrind/Makefile +++ b/devel/valgrind/Makefile @@ -7,7 +7,7 @@ PORTNAME= valgrind PORTVERSION= 352 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= devel MASTER_SITES= http://www.rabson.org/ DISTNAME= ${PORTNAME}-stable-${PORTVERSION} @@ -66,12 +66,36 @@ pre-patch: .endif post-install: - ${INSTALL_DATA} ${WRKSRC}/coregrind/vg_unistd.h \ + @${INSTALL_DATA} ${WRKSRC}/coregrind/vg_unistd.h \ ${PREFIX}/include/valgrind +# Check if kernel is built with USER_LDT option (FreeBSD 4 only) +.if ${OSVERSION} < 500000 + @${PREFIX}/bin/valgrind --tool=memcheck true 2> ${WRKDIR}/ldt.test + @${GREP} i386_set_ldt ${WRKDIR}/ldt.test >/dev/null &&\ + ${ECHO_CMD} !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! && \ + ${ECHO_CMD} Please rebuild your kernel with ``options USER_LDT''! && \ + ${ECHO_CMD} Otherwise, valgrind will not be able to perform pointer analysis! && \ + ${ECHO_CMD} !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! || true +.endif + + @yes | ${PREFIX}/bin/valgrind --tool=memcheck --gen-suppressions=yes true \ + | ${SED} -e 's,.*{$$,{,' \ + | ${GREP} -v '^=' \ + > ${WRKDIR}/freebsd-default.supp || \ + ${RM} ${WRKDIR}/freebsd-default.supp + @${ECHO} "" @${ECHO} "" - @${CAT} ${PKGMESSAGE} + @${CAT} ${PKGMESSAGE} | ${SED} -e 's,%%PREFIX%%,${PREFIX},g' @${ECHO} "" +.if exists(${WRKDIR}/freebsd-default.supp) + @${INSTALL_DATA} ${WRKDIR}/freebsd-default.supp \ + ${PREFIX}/lib/valgrind +PLIST_SUB+= VALGRIND_SUPPFILE="" +.else +PLIST_SUB+= VALGRIND_SUPPFILE="@comment " +.endif + .include <bsd.port.post.mk> diff --git a/devel/valgrind/pkg-message b/devel/valgrind/pkg-message index a2b55833c8f2..d5609b69eb34 100644 --- a/devel/valgrind/pkg-message +++ b/devel/valgrind/pkg-message @@ -7,3 +7,13 @@ Note: This version of valgrind does not support some older processors, As a workaround you can use the devel/valgrind-snapshot port, which is based on a more recent snapshot. + +Note 2: A sample suppression file might have been installed to \ + %%PREFIX%%/etc/freebsd-default.supp. It makes Valgrind hide warnings + caused by flawed code sequences - if any - in your system libraries, + so that you can concentrate on the warnings issued for your own code. + + To use these suppressions, either pass + --suppressions=%%PREFIX%%/etc/freebsd-default.supp + to Valgrind on the commandline, or add that line to your + ~/.valgrindrc file, which is the recommended way. diff --git a/devel/valgrind/pkg-plist b/devel/valgrind/pkg-plist index e4cf87470f11..b918413a03fe 100644 --- a/devel/valgrind/pkg-plist +++ b/devel/valgrind/pkg-plist @@ -36,6 +36,7 @@ lib/valgrind/vgskin_none.so lib/valgrind/xfree-3.supp lib/valgrind/xfree-4.supp libdata/pkgconfig/valgrind.pc +%%VALGRIND_SUPPFILE%%etc/freebsd-default.supp %%PORTDOCS%%%%DOCSDIR%%/ac_main.html %%PORTDOCS%%%%DOCSDIR%%/cc_main.html %%PORTDOCS%%%%DOCSDIR%%/cg_main.html |