From: Aaron Crane Date: Thu, 21 Apr 2016 11:55:30 +0000 (+0100) Subject: probe in Configure whether dtrace builds an object X-Git-Tag: 5.26.1~68 X-Git-Url: https://perl5.git.perl.org/metaconfig.git/commitdiff_plain/99c9005fc91a1c28d23319b3d8cfec94bb7073c0 probe in Configure whether dtrace builds an object backport of: commit c2538af7458bf317cdc7bc684f65831744010d80 Author: Tony Cook Date: Wed Mar 9 11:54:13 2016 +1100 [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. commit 5fa8e144165a5c086facccf35630b9c4a781c4ad Author: David Mitchell Date: Fri Mar 18 23:29:44 2016 +0000 Configure: silence 'dtrace -G' probe When built with -Dusedtrace, Configure checks to see whether 'dtrace -G' is supported, by running it. If it fails, it may spew error messages to stderr, so use >/dev/null 2>&1. --- diff --git a/U/perl/dtraceobject.U b/U/perl/dtraceobject.U new file mode 100644 index 0000000..e9f07dc --- /dev/null +++ b/U/perl/dtraceobject.U @@ -0,0 +1,39 @@ +?RCS: Copyright (c) 2016 Tony Cook +?RCS: +?RCS: You may distribute under the terms of either the GNU General Public +?RCS: License or the Artistic License, as specified in the README file. +?RCS: +?MAKE:dtraceobject: usedtrace dtrace cc ccflags rm optimize Compile cat +?MAKE: -pick add $@ $@ +?S:dtraceobject: +?S: Whether we need to build an object file with the dtrace tool. +?S:. +: Probe whether dtrace builds an object, as newer Illumos requires an input +: object file that uses at least one of the probes defined in the .d file +case "$usedtrace" in +$define) + case "$dtraceobject" in + $define|true|[yY]*) + dtraceobject=$define + ;; + ' '|'') + $dtrace -h -s ../perldtrace.d -o perldtrace.h + $cat >try.c </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 +esac +