summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xConfigure34
-rwxr-xr-xMakefile.SH7
-rw-r--r--Porting/Glossary5
3 files changed, 42 insertions, 4 deletions
diff --git a/Configure b/Configure
index 845fc43d76..9d91a81c4f 100755
--- a/Configure
+++ b/Configure
@@ -949,6 +949,7 @@ lddlflags=''
usedl=''
doublesize=''
dtraceobject=''
+dtracexnolibs=''
ebcdic=''
fflushNULL=''
fflushall=''
@@ -20966,12 +20967,38 @@ randseedtype=U32
: object file that uses at least one of the probes defined in the .d file
case "$usedtrace" in
$define)
+ case "$dtracexnolibs" in
+ $define|true|[yY]*)
+ dtracexnolibs=$define
+ $dtrace -h -xnolibs -s ../perldtrace.d -o perldtrace.h
+ ;;
+ ' '|'')
+ if $dtrace -h -xnolibs -s ../perldtrace.d -o perldtrace.h 2>&1 ; then
+ dtracexnolibs=$define
+ echo "Your dtrace accepts -xnolibs"
+ elif $dtrace -h -s ../perldtrace.d -o perldtrace.h 2>&1 ; then
+ dtracexnolibs=$undef
+ echo "Your dtrace doesn't accept -xnolibs"
+ else
+ echo "Your dtrace doesn't work at all, try building without dtrace support" >&4
+ exit 1
+ fi
+ ;;
+ *)
+ dtracexnolibs=$undef
+ $dtrace -h -s ../perldtrace.d -o perldtrace.h
+ ;;
+ esac
+ case $dtracexnolibs in
+ $define) xnolibs=-xnolibs ;;
+ *) xnolibs= ;;
+ esac
+
case "$dtraceobject" in
$define|true|[yY]*)
dtraceobject=$define
;;
' '|'')
- $dtrace -h -s ../perldtrace.d -o perldtrace.h
$cat >try.c <<EOM
#include "perldtrace.h"
int main(void) {
@@ -20981,14 +21008,14 @@ int main(void) {
EOM
dtraceobject=$undef
if $cc -c -o try.o $optimize $ccflags try.c \
- && $dtrace -G -s ../perldtrace.d try.o >/dev/null 2>&1; then
+ && $dtrace -G $xnolibs -s ../perldtrace.d try.o >/dev/null 2>&1; then
dtraceobject=$define
echo "Your dtrace builds an object file"
fi
- $rm -f try.c try.o perldtrace.o
;;
*) dtraceobject=$undef ;;
esac
+ $rm -f try.c try.o perldtrace.o perldtrace.h
esac
: Determine if this is an EBCDIC system
@@ -24954,6 +24981,7 @@ drand01='$drand01'
drand48_r_proto='$drand48_r_proto'
dtrace='$dtrace'
dtraceobject='$dtraceobject'
+dtracexnolibs='$dtracexnolibs'
dynamic_ext='$dynamic_ext'
eagain='$eagain'
ebcdic='$ebcdic'
diff --git a/Makefile.SH b/Makefile.SH
index fce2928aff..1b81e20adc 100755
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -390,8 +390,13 @@ VG_TEST ?= ./perl -e 1 2>/dev/null
;;
esac
+case "$dtracexnolibs" in
+define) xnolibs=-xnolibs ;;
+*) xnolibs= ;;
+esac
+
$spitshell >>$Makefile <<!GROK!THIS!
-DTRACE = $dtrace
+DTRACE = $dtrace $xnolibs
DTRACE_H = $dtrace_h
DTRACE_PERLLIB_O = $dtrace_perllib_o # "dtrace -G" output for perllib_objs
diff --git a/Porting/Glossary b/Porting/Glossary
index 1d2a6ea988..a94eaabe8a 100644
--- a/Porting/Glossary
+++ b/Porting/Glossary
@@ -3031,6 +3031,11 @@ dtrace (usedtrace.U):
dtraceobject (dtraceobject.U):
Whether we need to build an object file with the dtrace tool.
+dtracexnolibs (dtraceobject.U):
+ Whether dtrace accepts -xnolibs. If available we call dtrace -h
+ and dtrace -G with -xnolibs to allow dtrace to run in a jail on
+ FreeBSD.
+
dynamic_ext (Extensions.U):
This variable holds a list of XS extension files we want to
link dynamically into the package. It is used by Makefile.