Accepting request 753158 from home:marxin:branches:devel:languages:perl

- Add perl-Adapt-Configure-to-GCC-version-10.patch in order
  to fix boo#1158254.

OBS-URL: https://build.opensuse.org/request/show/753158
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl?expand=0&rev=184
This commit is contained in:
Michael Schröder 2019-12-03 10:27:11 +00:00 committed by Git OBS Bridge
parent 12ca3a8449
commit dfc941edbb
3 changed files with 112 additions and 3 deletions

View File

@ -0,0 +1,100 @@
From 6bd6308fcea3541e505651bf8e8127a4a03d22cd 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
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.
---
Configure | 14 +++++++-------
cflags.SH | 2 +-
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/Configure b/Configure
index 684a9c0..7a8dbef 100755
--- a/Configure
+++ b/Configure
@@ -4696,7 +4696,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='' ;;
@@ -4736,7 +4736,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 | \
@@ -5462,13 +5462,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.
@@ -5477,7 +5477,7 @@ default|recommended)
;;
esac
case "$gccversion" in
- 1*) ;;
+ 1.*) ;;
2.[0-8]*) ;;
?*) set strict-aliasing -fno-strict-aliasing
eval $checkccflag
@@ -5595,7 +5595,7 @@ case "$cppflags" in
;;
esac
case "$gccversion" in
-1*) cppflags="$cppflags -D__GNUC__"
+1.*) cppflags="$cppflags -D__GNUC__"
esac
case "$mips_type" in
'');;
@@ -23180,7 +23180,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 e60742f..f1bcd6c 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.

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Dec 3 09:13:07 UTC 2019 - Martin Liška <mliska@suse.cz>
- Add perl-Adapt-Configure-to-GCC-version-10.patch in order
to fix boo#1158254.
-------------------------------------------------------------------
Tue Nov 19 14:25:46 CET 2019 - mls@suse.de

View File

@ -1,7 +1,7 @@
#
# spec file for package perl
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@ -24,7 +24,7 @@ Release: 0
Summary: The Perl interpreter
License: Artistic-1.0 OR GPL-2.0-or-later
Group: Development/Languages/Perl
Url: https://www.perl.org/
URL: https://www.perl.org/
Source: https://www.cpan.org/src/5.0/perl-%{version}.tar.xz
Source1: %{name}-rpmlintrc
Source2: macros.perl
@ -49,6 +49,8 @@ Patch15: perl-gdbm-test-no-mmap.diff
Patch17: perl-fix2020.patch
# PATCH-FIX-UPSTREAM unmerged https://www.nntp.perl.org/group/perl.perl5.porters/2018/12/msg253240.html
Patch18: perl-reproducible2.patch
# PATCH-FIX-UPSTREAM https://github.com/Perl/perl5/commit/6bd6308fcea3541e505651bf8e8127a4a03d22cd Fix detection of GCC 10 compiler and later
Patch19: perl-Adapt-Configure-to-GCC-version-10.patch
BuildRequires: db-devel
BuildRequires: gdbm-devel
BuildRequires: libbz2-devel
@ -183,6 +185,7 @@ cp -p %{SOURCE3} .
%patch15
%patch17
%patch18
%patch19 -p1
%build
%define _lto_cflags %{nil}