This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
replace uses of Test.pm in dist/ distributions (IO, Math-BigInt)
[perl5.git] / Configure
index 91f20b8..835bf21 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -835,6 +835,7 @@ d_times=''
 d_tmpnam_r=''
 tmpnam_r_proto=''
 d_truncate=''
+d_truncl=''
 d_ttyname_r=''
 ttyname_r_proto=''
 d_tzname=''
@@ -5383,8 +5384,15 @@ default|recommended)
        # as that way the compiler can do the right implementation dependant
        # thing. (NWC)
        case "$gccversion" in
-       ?*)     set stack-protector -fstack-protector
+       ?*)     set stack-protector-strong -fstack-protector-strong
                eval $checkccflag
+               case "$dflt" in
+               *-fstack-protector-strong*) ;; # It got added.
+               *) # Try the plain/older -fstack-protector.
+                  set stack-protector -fstack-protector
+                  eval $checkccflag
+                  ;;
+               esac
                ;;
        esac
        ;;
@@ -5527,6 +5535,12 @@ case "$ldflags" in
 esac
 # See note above about -fstack-protector
 case "$ccflags" in
+*-fstack-protector-strong*)
+       case "$dflt" in
+       *-fstack-protector-strong*) ;; # Don't add it again
+       *) dflt="$dflt -fstack-protector-strong" ;;
+       esac
+       ;;
 *-fstack-protector*)
        case "$dflt" in
        *-fstack-protector*) ;; # Don't add it again
@@ -8398,6 +8412,12 @@ EOM
        esac
 
        case "$ldflags" in
+           *-fstack-protector-strong*)
+               case "$dflt" in
+                   *-fstack-protector-strong*) ;; # Don't add it again
+                   *) dflt="$dflt -fstack-protector-strong" ;;
+               esac
+               ;;
            *-fstack-protector*)
                case "$dflt" in
                    *-fstack-protector*) ;; # Don't add it again
@@ -15906,6 +15926,10 @@ eval $inlibc
 set scalbnl d_scalbnl
 eval $inlibc
 
+: see if truncl exists
+set truncl d_truncl
+eval $inlibc
+
 : see if modfl exists
 set modfl d_modfl
 eval $inlibc
@@ -15984,10 +16008,14 @@ if $test "$uselongdouble" = "$define"; then
        message="$message sqrtl"
     fi
     if $test "$d_modfl" != "$define"; then
-       if $test "$d_aintl:$d_copysignl" = "$define:$define"; then
-           echo "You have both aintl and copysignl, so I can emulate modfl."
+       if $test "$d_truncl:$d_copysignl" = "$define:$define"; then
+           echo "You have both truncl and copysignl, so I can emulate modfl."
        else
-           message="$message modfl"
+           if $test "$d_aintl:$d_copysignl" = "$define:$define"; then
+               echo "You have both aintl and copysignl, so I can emulate modfl."
+           else
+               message="$message modfl"
+           fi
        fi
     fi
     if $test "$d_frexpl" != "$define"; then
@@ -23672,6 +23700,7 @@ d_tm_tm_gmtoff='$d_tm_tm_gmtoff'
 d_tm_tm_zone='$d_tm_tm_zone'
 d_tmpnam_r='$d_tmpnam_r'
 d_truncate='$d_truncate'
+d_truncl='$d_truncl'
 d_ttyname_r='$d_ttyname_r'
 d_tzname='$d_tzname'
 d_u32align='$d_u32align'