In metaconfig.git, the branch master has been updated

<http://perl5.git.perl.org/metaconfig.git/commitdiff/8f330a830bffb7d54d364eb686a1e00596e945ba?hp=d90dac742d603c1c2d7d812e43d8be3344a301b9>

- Log -----------------------------------------------------------------
commit 8f330a830bffb7d54d364eb686a1e00596e945ba
Author: Aaron Crane <[email protected]>
Date:   Thu Apr 21 12:55:30 2016 +0100

    probe in Configure whether dtrace builds an object
    
    backport of:
    
    commit c2538af7458bf317cdc7bc684f65831744010d80
    Author: Tony Cook <[email protected]>
    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 <[email protected]>
    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.
-----------------------------------------------------------------------

Summary of changes:
 U/perl/dtraceobject.U | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 U/perl/dtraceobject.U

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 <<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 >/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
+

--
perl5 metaconfig repository

Reply via email to