Fix GCC 10 version detection
This commit is contained in:
parent
148d5a6bc6
commit
84cf293397
|
@ -0,0 +1,109 @@
|
||||||
|
From 913582217c96512015fd60f270f0e262824579b7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||||
|
Date: Tue, 12 Nov 2019 09:19:18 +0100
|
||||||
|
Subject: [PATCH] Adapt Configure to GCC version 10
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
I got a notice from Jeff Law <law@redhat.com>:
|
||||||
|
|
||||||
|
Your particular package fails its testsuite. This was ultimately
|
||||||
|
tracked down to a Configure problem. The perl configure script treated
|
||||||
|
gcc-10 as gcc-1 and turned on -fpcc-struct-return. This is an ABI
|
||||||
|
changing flag and caused Perl to not be able to interact properly with
|
||||||
|
the dbm libraries on the system leading to a segfault.
|
||||||
|
|
||||||
|
His proposed patch corrected only this one instance of the version
|
||||||
|
mismatch. Reading the Configure script revealed more issues. This
|
||||||
|
patch fixes all of them I found.
|
||||||
|
|
||||||
|
Please note I did not test it because I don't have GCC 10 available.
|
||||||
|
|
||||||
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||||
|
---
|
||||||
|
Configure | 14 +++++++-------
|
||||||
|
cflags.SH | 2 +-
|
||||||
|
2 files changed, 8 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/Configure b/Configure
|
||||||
|
index fad1c9f2b1..706c0b64ed 100755
|
||||||
|
--- a/Configure
|
||||||
|
+++ b/Configure
|
||||||
|
@@ -4701,7 +4701,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='' ;;
|
||||||
|
@@ -4741,7 +4741,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 | \
|
||||||
|
@@ -5467,13 +5467,13 @@ 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
|
||||||
|
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.
|
||||||
|
@@ -5482,7 +5482,7 @@ default|recommended)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
case "$gccversion" in
|
||||||
|
- 1*) ;;
|
||||||
|
+ 1.*) ;;
|
||||||
|
2.[0-8]*) ;;
|
||||||
|
?*) set strict-aliasing -fno-strict-aliasing
|
||||||
|
eval $checkccflag
|
||||||
|
@@ -5600,7 +5600,7 @@ case "$cppflags" in
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
case "$gccversion" in
|
||||||
|
-1*) cppflags="$cppflags -D__GNUC__"
|
||||||
|
+1.*) cppflags="$cppflags -D__GNUC__"
|
||||||
|
esac
|
||||||
|
case "$mips_type" in
|
||||||
|
'');;
|
||||||
|
@@ -23103,7 +23103,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
|
||||||
|
diff --git a/cflags.SH b/cflags.SH
|
||||||
|
index e60742fed1..f1bcd6c38e 100755
|
||||||
|
--- a/cflags.SH
|
||||||
|
+++ b/cflags.SH
|
||||||
|
@@ -156,7 +156,7 @@ esac
|
||||||
|
|
||||||
|
case "$gccversion" in
|
||||||
|
'') ;;
|
||||||
|
-[12]*) ;; # gcc versions 1 (gasp!) and 2 are not good for this.
|
||||||
|
+[12].*) ;; # gcc versions 1 (gasp!) and 2 are not good for this.
|
||||||
|
Intel*) ;; # # Is that you, Intel C++?
|
||||||
|
#
|
||||||
|
# NOTE 1: the -std=c89 without -pedantic is a bit pointless.
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
|
@ -288,6 +288,10 @@ Patch70: perl-5.31.5-prevent-a-race-between-name-based-stat-and-an-open-m
|
||||||
# in upstream after 5.31.5
|
# in upstream after 5.31.5
|
||||||
Patch71: perl-5.30.1-handle-s-being-updated-without-len-being-updated.patch
|
Patch71: perl-5.30.1-handle-s-being-updated-without-len-being-updated.patch
|
||||||
|
|
||||||
|
# Fix GCC 10 version detection, proposed to upstream
|
||||||
|
# <https://github.com/Perl/perl5/pull/17295>
|
||||||
|
Patch72: perl-5.31.5-Adapt-Configure-to-GCC-version-10.patch
|
||||||
|
|
||||||
# Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048
|
# Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048
|
||||||
Patch200: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch
|
Patch200: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch
|
||||||
|
|
||||||
|
@ -2880,6 +2884,7 @@ rm -rf .git # Perl tests examine a git repository
|
||||||
%patch69 -p1
|
%patch69 -p1
|
||||||
%patch70 -p1
|
%patch70 -p1
|
||||||
%patch71 -p1
|
%patch71 -p1
|
||||||
|
%patch72 -p1
|
||||||
%patch200 -p1
|
%patch200 -p1
|
||||||
%patch201 -p1
|
%patch201 -p1
|
||||||
|
|
||||||
|
@ -2946,6 +2951,7 @@ perl -x patchlevel.h \
|
||||||
'Fedora Patch69: Fix an unintended upgrade to UTF-8 in the middle of a transliteration' \
|
'Fedora Patch69: Fix an unintended upgrade to UTF-8 in the middle of a transliteration' \
|
||||||
'Fedora Patch70: Fix a race in File::stat() tests (GH#17234)' \
|
'Fedora Patch70: Fix a race in File::stat() tests (GH#17234)' \
|
||||||
'Fedora Patch71: Fix a buffer overread in when parsing a number (GH#17279)' \
|
'Fedora Patch71: Fix a buffer overread in when parsing a number (GH#17279)' \
|
||||||
|
'Fedora Patch72: Fix GCC 10 version detection (GH#17295)' \
|
||||||
'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \
|
'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \
|
||||||
'Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux' \
|
'Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux' \
|
||||||
%{nil}
|
%{nil}
|
||||||
|
@ -5199,6 +5205,7 @@ popd
|
||||||
- Fix an unintended upgrade to UTF-8 in the middle of a transliteration
|
- Fix an unintended upgrade to UTF-8 in the middle of a transliteration
|
||||||
- Fix a race in File::stat() tests (GH#17234)
|
- Fix a race in File::stat() tests (GH#17234)
|
||||||
- Fix a buffer overread in when parsing a number (GH#17279)
|
- Fix a buffer overread in when parsing a number (GH#17279)
|
||||||
|
- Fix GCC 10 version detection (GH#17295)
|
||||||
|
|
||||||
* Mon Nov 11 2019 Jitka Plesnikova <jplesnik@redhat.com> - 4:5.30.1-447
|
* Mon Nov 11 2019 Jitka Plesnikova <jplesnik@redhat.com> - 4:5.30.1-447
|
||||||
- 5.30.1 bump (see <https://metacpan.org/pod/release/SHAY/perl-5.30.1/pod/perldelta.pod>
|
- 5.30.1 bump (see <https://metacpan.org/pod/release/SHAY/perl-5.30.1/pod/perldelta.pod>
|
||||||
|
|
Loading…
Reference in New Issue