ports/129600: Add HAVE_DTRACE_KERN to bsd.port.mk
Steven Kreuzer
skreuzer at exit2shell.com
Fri Dec 12 19:40:01 UTC 2008
>Number: 129600
>Category: ports
>Synopsis: Add HAVE_DTRACE_KERN to bsd.port.mk
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Fri Dec 12 19:40:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Steven Kreuzer
>Release: 7.1-PRERELEASE
>Organization:
>Environment:
FreeBSD slurry.exit2shell.com 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #3: Mon Nov 24 14:01:09 EST 2008 root at simon.sddi.net:/usr/obj/usr/src/sys/KERNEL amd64
>Description:
The attached patch will check for the existence of the debug.dtrace.providers sysctl and if found, set HAVE_DTRACE_KERN to YES.
This will allow you to check if a kernel has dtrace support compiled in and then build applications with dtrace probes if they are available
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
Index: bsd.port.mk
===================================================================
RCS file: /usr/share/cvs/freebsd/ports/Mk/bsd.port.mk,v
retrieving revision 1.604
diff -u -r1.604 bsd.port.mk
--- bsd.port.mk 5 Sep 2008 19:41:43 -0000 1.604
+++ bsd.port.mk 12 Dec 2008 19:25:55 -0000
@@ -1657,6 +1657,14 @@
.endif
.endif
+# Check for DTrace support
+
+.if ${OSVERSION} >= 701000
+.if !defined(HAVE_DTRACE_KERN)
+HAVE_DTRACE_KERN!= if ${SYSCTL} -a debug.dtrace.providers >/dev/null 2>&1; then echo YES; fi
+.endif
+.endif
+
# Check the compatibility layer for amd64/ia64
.if ${ARCH} == "amd64" || ${ARCH} =="ia64"
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list