summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2016-03-09 11:54:13 +1100
committerTony Cook <tony@develop-help.com>2016-03-09 11:54:13 +1100
commitc2538af7458bf317cdc7bc684f65831744010d80 (patch)
tree84c3b8b0048fb59567f3d7a7e8d81f8765169c9f /Configure
parentcda0c02ca04cbb6960392d44273bd40182397820 (diff)
downloadperl-c2538af7458bf317cdc7bc684f65831744010d80.tar.gz
[perl #122287] probe in Configure whether dtrace builds an object
When building the object file, newer versions of dtrace (on Illumos based systems at least) require an input object file that uses at least one of the probes defined in the .d file. The test in Makefile.SH didn't provide that definition so the test would fail, and not build an object file, and fail to link later on, on systems that *do* need the object file. Moved the probe to Configure (where it probably belongs) and supplied an object file that uses a probe. Tested successfully on OmniOS (with the new dtrace), Solaris 11, and darwin.
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure29
1 files changed, 29 insertions, 0 deletions
diff --git a/Configure b/Configure
index 7226ac9e6e..2546582f3c 100755
--- a/Configure
+++ b/Configure
@@ -1317,6 +1317,7 @@ use64bitall=''
use64bitint=''
usecbacktrace=''
dtrace=''
+dtraceobject=''
usedtrace=''
usefaststdio=''
usekernprocpathname=''
@@ -8171,6 +8172,33 @@ EOM
esac
done
+case "$usedtrace" in
+$define)
+ 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) {
+ PERL_LOADED_FILE("dummy");
+ return 0;
+}
+EOM
+ dtraceobject=$undef
+ if $cc -c -o try.o $optimize $ccflags try.c \
+ && $dtrace -G -s ../perldtrace.d try.o ; then
+ dtraceobject=$define
+ echo "Your dtrace builds an object file"
+ fi
+ $rm -f try.c try.o perldtrace.o
+ ;;
+ *) dtraceobject=$undef ;;
+ esac
+esac
+
: See if we want extra modules installed
echo " "
case "$extras" in
@@ -24720,6 +24748,7 @@ doublesize='$doublesize'
drand01='$drand01'
drand48_r_proto='$drand48_r_proto'
dtrace='$dtrace'
+dtraceobject='$dtraceobject'
dynamic_ext='$dynamic_ext'
eagain='$eagain'
ebcdic='$ebcdic'