In metaconfig.git, the branch master has been updated

<http://perl5.git.perl.org/metaconfig.git/commitdiff/4a09025814332ef37a7b6ad16abf42c075e742d9?hp=cb3731263d5491bdad2b9adba26dab94331066ac>

- Log -----------------------------------------------------------------
commit 4a09025814332ef37a7b6ad16abf42c075e742d9
Author: H.Merijn Brand - Tux <[email protected]>
Date:   Fri May 12 16:44:27 2017 +0200

    Make mconfig more verbose on fail
    
    If a unit erroneously has
    
    ?MAKE:  -pick $@ $@
    
    instead of
    
    ?MAKE:  -pick $@ %<
    
    it passes with just one make target, but with two make targets, mconfig
    fails with
    
    Can't open .
    
    which isn't very helpful

M       bin/mconfig

commit f58de3dbc4f1366afb7e29871457bfe20d8dd586
Author: H.Merijn Brand - Tux <[email protected]>
Date:   Fri May 12 16:40:48 2017 +0200

    (perl #130108) check if dtrace accepts -xnolibs and use it if available
    
    Backport of f2a60c1f79f4336895ffcbe81f18e49b0228ea44
    
    dtrace without -xnolibs fails in a FreeBSD jail, so we need to supply
    it on FreeBSD.
    
    Unfortunately systemtap's dtrace emulation doesn't support -xnolibs so
    we need to test if it's available.
    
    And fixed a serious typo in the make-rules

M       U/perl/dtraceobject.U

commit 7148384bdb14fa755be27c578e22a3567b107e09
Author: H.Merijn Brand - Tux <[email protected]>
Date:   Fri May 12 16:38:46 2017 +0200

    Turn on removal of dot in @INC by default
    
    Backport of 4634f4819b15eb189f3502773a and 12e837793e279bd6e705e920b9
    
    That's it. Dot no longer in @INC.

M       U/perl/defaultincdot.U
-----------------------------------------------------------------------

Summary of changes:
 U/perl/defaultincdot.U | 14 +++++++-------
 U/perl/dtraceobject.U  | 43 ++++++++++++++++++++++++++++++++++++++-----
 bin/mconfig            |  4 ++--
 3 files changed, 47 insertions(+), 14 deletions(-)

diff --git a/U/perl/defaultincdot.U b/U/perl/defaultincdot.U
index fff93d28..98cffdaf 100644
--- a/U/perl/defaultincdot.U
+++ b/U/perl/defaultincdot.U
@@ -27,15 +27,15 @@ a shared directory. This can lead to executing unexpected 
code.
 EOM
 
 # When changing to exclude by default:
-#case "$default_inc_excludes_dot" in
-#    $undef|false|[nN]*) dflt="n" ;;
-#    *)                  dflt="y" ;;
-#esac
-# For now:
 case "$default_inc_excludes_dot" in
-    $define|true|[yY]*) dflt="y" ;;
-    *)                  dflt="n" ;;
+    $undef|false|[nN]*) dflt="n" ;;
+    *)                  dflt="y" ;;
 esac
+# To turn exclude off by default:
+#case "$default_inc_excludes_dot" in
+#    $define|true|[yY]*) dflt="y" ;;
+#    *)                  dflt="n" ;;
+#esac
 
 rp='Exclude '.' from @INC by default? '
 . ./myread
diff --git a/U/perl/dtraceobject.U b/U/perl/dtraceobject.U
index e9f07dcf..8bbbb36e 100644
--- a/U/perl/dtraceobject.U
+++ b/U/perl/dtraceobject.U
@@ -3,21 +3,54 @@
 ?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 $@ $@
+?MAKE:dtraceobject dtracexnolibs: usedtrace dtrace cc ccflags optimize \
+               Compile cat rm_try
+?MAKE: -pick add $@ %<
 ?S:dtraceobject:
 ?S:    Whether we need to build an object file with the dtrace tool.
 ?S:.
+?S:dtracexnolibs:
+?S:    Whether dtrace accepts -xnolibs.  If available we call dtrace -h
+?S:    and dtrace -G with -xnolibs to allow dtrace to run in a jail on
+?S:    FreeBSD.
+?S:.
+?T:xnolibs
 : 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 "$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) {
@@ -27,13 +60,13 @@ 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_try perldtrace.o perldtrace.h
 esac
 
diff --git a/bin/mconfig b/bin/mconfig
index 3ce6c633..0b9036f1 100755
--- a/bin/mconfig
+++ b/bin/mconfig
@@ -1297,7 +1297,7 @@ sub process_command {
                        warn "\t    $msg\n";
                }
        }
-       die "Can't open $file.\n" unless open(UNIT, $file);
+       die "Can't open UNIT (name: $name, target: $target) $file.\n" unless 
open(UNIT, $file);
        print "\t$cmd $file\n" if $opt_v;
        &init_interp;                                           # Initializes 
the interpreter
 
@@ -1435,7 +1435,7 @@ sub process_command {
                        open(PREPEND, ">.prepend") ||
                                die "Can't create .MT/.prepend.\n";
                        open(TARGET, $Unit{$target}) ||
-                               die "Can't open $Unit{$target}.\n";
+                               die "Can't open Unit $Unit{$target}.\n";
                        while (<TARGET>) {
                                print PREPEND unless &skipped;
                        }

--
perl5 metaconfig repository

Reply via email to