From 2dead1c6518c184be09159ffe44d2c52f2b1e343e60c35c36193d2ccd7a6bb93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Tue, 3 Dec 2019 10:27:11 +0000 Subject: [PATCH] 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 --- perl-Adapt-Configure-to-GCC-version-10.patch | 100 +++++++++++++++++++ perl.changes | 6 ++ perl.spec | 9 +- 3 files changed, 112 insertions(+), 3 deletions(-) create mode 100644 perl-Adapt-Configure-to-GCC-version-10.patch diff --git a/perl-Adapt-Configure-to-GCC-version-10.patch b/perl-Adapt-Configure-to-GCC-version-10.patch new file mode 100644 index 0000000..ba88491 --- /dev/null +++ b/perl-Adapt-Configure-to-GCC-version-10.patch @@ -0,0 +1,100 @@ +From 6bd6308fcea3541e505651bf8e8127a4a03d22cd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Tue, 12 Nov 2019 09:19:18 +0100 +Subject: [PATCH] Adapt Configure to GCC version 10 + +I got a notice from Jeff Law : + + 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. diff --git a/perl.changes b/perl.changes index be22118..d651315 100644 --- a/perl.changes +++ b/perl.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Dec 3 09:13:07 UTC 2019 - Martin Liška + +- 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 diff --git a/perl.spec b/perl.spec index ce47784..267f6c8 100644 --- a/perl.spec +++ b/perl.spec @@ -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}