83f7126a09
= Core Enhancements = Experimental Try/Catch Syntax An initial experimental attempt at providing C<try>/C<catch> notation has been added. use feature 'try'; try { a_function(); } catch ($e) { warn "An error occurred: $e"; } For more information, see L<perlsyn/"Try Catch Exception Handling">. = C<qr/{,n}/> is now accepted An empty lower bound is now accepted for regular expression quantifiers, like C<{,3}>. = Blanks freely allowed within but adjacent to curly braces (in double-quotish contexts and regular expression patterns) This means you can write things like S<C<\x{ FFFC }>> if you like. This applies to all such constructs, namely C<\b{}>, C<\g{}>, C<\k{}>, C<\N{}>, C<\o{}>, and C<\x{}>; as well as the regular expression quantifier C<{I<m>,I<n>}>. C<\p{}> and C<\P{}> retain their already-existing, even looser, rules mandated by the Unicode standard (see L<perluniprops/Properties accessible through \p{} and \P{}>). This ability is in effect regardless of the presence of the C</x> regular expression pattern modifier. Additionally, the comma in a regular expression braced quantifier may have blanks (tabs or spaces) before and/or after the comma, like S<C<qr/a{ 5, 7 }/>>. = New octal syntax C<0oI<ddddd>> It is now possible to specify octal literals with C<0o> prefixes, as in C<0o123_456>, parallel to the existing construct to specify hexadecimal literal C<0xI<ddddd>> and binary literal C<0bI<ddddd>>. Also, the builtin C<oct()> function now accepts this new syntax. See L<perldata/Scalar value constructors> and L<perlfunc/oct EXPR>. = Performance Enhancements =item * Fix a memory leak in RegEx [L<GH #18604|https://github.com/Perl/perl5/issues/18604>] = Modules and Pragmata = New Modules and Pragmata =item * L<ExtUtils::PL2Bat> 0.004 has been added to the Perl core. This module is a generalization of the C<pl2bat> script. It being a script has led to at least two forks of this code; this module will unify them under one implementation with tests. (and lots more changes)
229 lines
6.2 KiB
Text
229 lines
6.2 KiB
Text
$NetBSD: patch-Configure,v 1.11 2021/05/24 17:46:25 wiz Exp $
|
|
|
|
* Use "uname -r" to get OS version for *BSD.
|
|
* Move $loclibpth to the end of $dlist, instead of the beginning.
|
|
* Detect systems which have <fenv.h> but where using it fails.
|
|
* Honor more ldflags in shared objects.
|
|
* Add Minix
|
|
* Several other changes.
|
|
* Add rpath for QNX
|
|
|
|
--- Configure.orig 2021-05-04 06:52:48.000000000 +0000
|
|
+++ Configure
|
|
@@ -3482,13 +3482,14 @@ EOM
|
|
osvers="$3"
|
|
;;
|
|
dragonfly) osname=dragonfly
|
|
- osvers="$3"
|
|
+ osvers=`$uname -r | UU/tr '[A-Z]' '[a-z]'`
|
|
;;
|
|
dynixptx*) osname=dynixptx
|
|
osvers=`echo "$4"|sed 's/^v//'`
|
|
;;
|
|
freebsd) osname=freebsd
|
|
- osvers="$3" ;;
|
|
+ osvers=`$uname -r | UU/tr '[A-Z]' '[a-z]'`
|
|
+ ;;
|
|
genix) osname=genix ;;
|
|
gnu) osname=gnu
|
|
osvers="$3" ;;
|
|
@@ -3513,8 +3514,11 @@ EOM
|
|
minix) osname=minix
|
|
osvers=`$uname -r`
|
|
;;
|
|
+ minix*) osname=minix
|
|
+ osvers=`$uname -r`
|
|
+ ;;
|
|
netbsd*) osname=netbsd
|
|
- osvers="$3"
|
|
+ osvers=`$uname -r | UU/tr '[A-Z]' '[a-z]'`
|
|
;;
|
|
news-os) osvers="$3"
|
|
case "$3" in
|
|
@@ -3524,7 +3528,7 @@ EOM
|
|
;;
|
|
nonstop-ux) osname=nonstopux ;;
|
|
openbsd) osname=openbsd
|
|
- osvers="$3"
|
|
+ osvers=`$uname -r | UU/tr '[A-Z]' '[a-z]'`
|
|
;;
|
|
os2) osname=os2
|
|
osvers="$4"
|
|
@@ -3539,6 +3543,9 @@ EOM
|
|
qnx) osname=qnx
|
|
osvers="$4"
|
|
;;
|
|
+ sco_sv) osname=sco_sv
|
|
+ osvers=`$uname -r`v`$uname -v`
|
|
+ ;;
|
|
solaris) osname=solaris
|
|
case "$3" in
|
|
5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
|
|
@@ -4861,7 +4868,7 @@ esac
|
|
# If using gcc or clang, we can get better values for libpth, incpth
|
|
# and usrinc directly from the compiler.
|
|
# Note that ccname for clang is also gcc.
|
|
-case "$ccname" in
|
|
+case "xx$ccname" in
|
|
gcc)
|
|
realpath=`which realpath 2>/dev/null | sed 's/no realpath in.*//'`
|
|
$echo 'extern int foo;' > try.c
|
|
@@ -4945,14 +4952,14 @@ case "$plibpth" in
|
|
esac
|
|
case "$libpth" in
|
|
' ') dlist='';;
|
|
-'') dlist="$loclibpth $plibpth $glibpth";;
|
|
+'') dlist="$plibpth $glibpth $loclibpth";;
|
|
*) dlist="$libpth";;
|
|
esac
|
|
|
|
: Now check and see which directories actually exist, avoiding duplicates
|
|
for xxx in $dlist
|
|
do
|
|
- if $test -d $xxx; then
|
|
+ if $test -d $xxx -o "$xxx" = "$prefix/lib"; then
|
|
case " $libpth " in
|
|
*" $xxx "*) ;;
|
|
*) libpth="$libpth $xxx";;
|
|
@@ -5068,7 +5075,7 @@ lib_ext=$_a
|
|
obj_ext=$_o
|
|
path_sep=$p_
|
|
|
|
-rm_try="$rm -f try try$_exe a.out .out try.[cho] try.$_o core core.try* try.core*"
|
|
+rm_try="@TOOLS_RM@ -f try try$_exe a.out .out try.[cho] try.$_o core core.try* try.core*"
|
|
|
|
: Which makefile gets called first. This is used by make depend.
|
|
case "$firstmakefile" in
|
|
@@ -5401,7 +5408,7 @@ default|recommended)
|
|
*-fno-stack-protector*)
|
|
echo "Do not add -fstack-protector nor -fstack-protector-strong" 2>&1
|
|
;;
|
|
- *) case "$gccversion" in
|
|
+ nothing) case "$gccversion" in
|
|
?*) set stack-protector-strong -fstack-protector-strong
|
|
eval $checkccflag
|
|
case "$dflt" in
|
|
@@ -6384,6 +6391,15 @@ case "$nm_so_opt" in
|
|
;;
|
|
esac
|
|
|
|
+: Mac OS X 10.7 is different
|
|
+case "$osname" in
|
|
+ darwin)
|
|
+ case "$osvers" in
|
|
+ 11.*)
|
|
+ libnames="$libnames /usr/lib/system/libsystem_*.dylib"
|
|
+ esac
|
|
+esac
|
|
+
|
|
: Figure out where the libc is located
|
|
case "$runnm" in
|
|
true)
|
|
@@ -7564,7 +7580,9 @@ rp='Pathname for the site-specific libra
|
|
. ./getfile
|
|
prefixvar=sitelib
|
|
. ./setprefixvar
|
|
-sitelib_stem=`echo "$sitelibexp" | sed "s,/$version$,,"`
|
|
+if $test -z "$sitelib_stem"; then
|
|
+ sitelib_stem=`echo "$sitelibexp" | sed "s,/$version$,,"`
|
|
+fi
|
|
|
|
: Determine list of previous versions to include in @INC
|
|
$cat > getverlist <<EOPL
|
|
@@ -7977,7 +7995,9 @@ case "$vendorprefix" in
|
|
vendorlibexp="$ansexp"
|
|
;;
|
|
esac
|
|
-vendorlib_stem=`echo "$vendorlibexp" | sed "s,/$version$,,"`
|
|
+if $test -z "$vendorlib_stem"; then
|
|
+ vendorlib_stem=`echo "$vendorlibexp" | sed "s,/$version$,,"`
|
|
+fi
|
|
prefixvar=vendorlib
|
|
. ./installprefix
|
|
|
|
@@ -8477,6 +8497,7 @@ EOM
|
|
esac
|
|
;;
|
|
*linux*|irix*|gnu*) dflt="-shared $optimize" ;;
|
|
+ sco_sv) dflt='-shared' ;;
|
|
solaris) # See [perl #66604].
|
|
# On Solaris 11, gcc -m64 on amd64
|
|
# appears not to understand -G. gcc versions at
|
|
@@ -8516,7 +8537,7 @@ EOM
|
|
esac
|
|
for thisflag in $ldflags; do
|
|
case "$thisflag" in
|
|
- -L*|-R*|-Wl,-R*)
|
|
+ -L*|-R*|-Wl,-R*|-Wl,-z*)
|
|
case " $dflt " in
|
|
*" $thisflag "*) ;;
|
|
*) dflt="$dflt $thisflag" ;;
|
|
@@ -8772,7 +8793,7 @@ if "$useshrplib"; then
|
|
freebsd|minix|mirbsd|netbsd|openbsd|interix|dragonfly|bitrig)
|
|
xxx="-Wl,-R$shrpdir"
|
|
;;
|
|
- bsdos|linux|irix*|dec_osf|gnu*|haiku)
|
|
+ bsdos|linux|irix*|dec_osf|gnu*|haiku|nto)
|
|
xxx="-Wl,-rpath,$shrpdir"
|
|
;;
|
|
hpux*)
|
|
@@ -8782,6 +8803,9 @@ if "$useshrplib"; then
|
|
cygwin)
|
|
# cygwin needs only ldlibpth
|
|
;;
|
|
+ sco_sv)
|
|
+ xxx="-Wl,-R$shrpdir"
|
|
+ ;;
|
|
*)
|
|
tmp_shrpenv="env LD_RUN_PATH=$shrpdir"
|
|
;;
|
|
@@ -9858,6 +9882,13 @@ esac
|
|
: Check if we want perlio
|
|
useperlio="$define"
|
|
|
|
+: Look for a hint-file generated 'call-back-unit'. We need
|
|
+: to set some defaults for building perl in pkgsrc.
|
|
+if $test -f pkgsrc.cbu; then
|
|
+ echo "Setting pkgsrc-specific hints regarding compiler/linker flags..."
|
|
+ . ./pkgsrc.cbu
|
|
+fi
|
|
+
|
|
: Set the vendorbin variables
|
|
case "$vendorprefix" in
|
|
'') d_vendorbin="$undef"
|
|
@@ -20225,7 +20256,15 @@ RCAT(Rei,ser)
|
|
ACAT(Cir,cus)
|
|
EOCP
|
|
$cppstdin $cppflags $cppminus <cpp_stuff.c >cpp_stuff.out 2>&1
|
|
-if $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then
|
|
+# yuck, what a hack.
|
|
+# MIPSPro compiler/preprocessor behaves differently if invoked on
|
|
+# stdin vs file. Here we test for stdin, but lateron we use files.
|
|
+# So force it to work the way we know it does:
|
|
+if [ x"${OPSYS}" = x"IRIX" ]; then
|
|
+ echo "Hacking MIPSPro on file vs. stdin..." >&4
|
|
+ echo "We know we can catify or stringify, separately or together!"
|
|
+ cpp_stuff=42
|
|
+elif $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then
|
|
echo "Oh! Smells like ANSI's been here." >&4
|
|
echo "We can catify or stringify, separately or together!"
|
|
cpp_stuff=42
|
|
@@ -23062,6 +23101,18 @@ eval $inhdr
|
|
set fenv.h i_fenv
|
|
eval $inhdr
|
|
|
|
+: And really validate that it is OK to include it
|
|
+: On NetBSD 6.x non-amd64 non-i386 and non-sparc this fails
|
|
+cat > try.c <<EOCP
|
|
+#include <fenv.h>
|
|
+int main() { return 0; }
|
|
+EOCP
|
|
+set try
|
|
+if ! eval $compile_ok; then
|
|
+ echo "<fenv.h> found to be unusable, disabling" >&4
|
|
+ i_fenv=$undef
|
|
+fi
|
|
+
|
|
: see if this is a fp.h system
|
|
set fp.h i_fp
|
|
eval $inhdr
|