This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Adapt Configure to GCC version 10
authorH.Merijn Brand - Tux <h.m.brand@xs4all.nl>
Tue, 21 Jan 2020 19:57:37 +0000 (20:57 +0100)
committerH.Merijn Brand - Tux <h.m.brand@xs4all.nl>
Tue, 21 Jan 2020 19:57:37 +0000 (20:57 +0100)
backport of 9f4e6307232229875331a55e44e1245b0b91e219

U/compline/ccflags.U
U/modified/Cppsym.U
U/perl/gccvers.U

index bbd264e..755b8db 100644 (file)
@@ -184,14 +184,14 @@ fi
 case "$hint" in
 default|recommended)
        case "$gccversion" in
-       1*) dflt="$dflt -fpcc-struct-return" ;;
+       1.*) dflt="$dflt -fpcc-struct-return" ;;
        esac
        case "$optimize:$DEBUGGING" in
        *-g*:old) dflt="$dflt -DDEBUGGING";;
        esac
 ?X: check for POSIXized ISC
        case "$gccversion" in
-       2*) if $test -d /etc/conf/kconfig.d &&
+       2.*) if $test -d /etc/conf/kconfig.d &&
                        $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
                then
                        # Interactive Systems (ISC) POSIX mode.
@@ -205,7 +205,7 @@ default|recommended)
 ?X: greater than 2.8.
 ?X:    --Andy Dougherty  27 Aug 1999
        case "$gccversion" in
-       1*) ;;
+       1.*) ;;
        2.[0-8]*) ;;
        ?*)     set strict-aliasing -fno-strict-aliasing
                eval $checkccflag
@@ -331,7 +331,7 @@ case "$cppflags" in
     ;;
 esac
 case "$gccversion" in
-1*) cppflags="$cppflags -D__GNUC__"
+1.*) cppflags="$cppflags -D__GNUC__"
 esac
 case "$mips_type" in
 '');;
index 46f4bc9..f04f8db 100644 (file)
@@ -316,7 +316,7 @@ fi
 
 : add -D_FORTIFY_SOURCE if feasible and not already there
 case "$gccversion" in
-[456789].*)    case "$optimize$ccflags" in
+[456789].*|[1-9][0-9]*)        case "$optimize$ccflags" in
        *-O*)   case "$ccflags$cppsymbols" in
                *_FORTIFY_SOURCE=*) # Don't add it again.
                        echo "You seem to have -D_FORTIFY_SOURCE already, not adding it." >&4
index c3532bb..21c96ef 100644 (file)
@@ -80,7 +80,7 @@ else
 fi
 $rm -f try try.*
 case "$gccversion" in
-1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
+1.*) cpp=`./loc gcc-cpp $cpp $pth` ;;
 esac
 case "$gccversion" in
 '') gccosandvers='' ;;
@@ -120,7 +120,7 @@ esac
 # gcc 3.* complain about adding -Idirectories that they already know about,
 # so we will take those off from locincpth.
 case "$gccversion" in
-3*)
+3.*)
     echo "main(){}">try.c
     for incdir in $locincpth; do
        warn=`$cc $ccflags -I$incdir -c try.c 2>&1 | \