From cf69869be0ef5d1aa4cca6a88aeb84e34d178d7b Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 29 Jun 2021 19:33:41 +0000 Subject: [PATCH] import gcc-toolset-11-gcc-11.1.1-6.el8 --- .gcc-toolset-11-gcc.metadata | 2 +- .gitignore | 2 +- SOURCES/gcc11-pr100797.patch | 91 ------------------------------------ SPECS/gcc.spec | 55 +++++++++++++--------- 4 files changed, 34 insertions(+), 116 deletions(-) delete mode 100644 SOURCES/gcc11-pr100797.patch diff --git a/.gcc-toolset-11-gcc.metadata b/.gcc-toolset-11-gcc.metadata index cf17599..434da82 100644 --- a/.gcc-toolset-11-gcc.metadata +++ b/.gcc-toolset-11-gcc.metadata @@ -1,5 +1,5 @@ 7f4348418dc3efefd357b32a2b5c8010211ab284 SOURCES/doxygen-1.8.0.src.tar.gz -a0fc7a6b30f4bcd1625e99522d7c9060a7fef946 SOURCES/gcc-11.1.1-20210531.tar.xz +d052afe0ae999ff216078d2ba5d7035ec4d553de SOURCES/gcc-11.1.1-20210623.tar.xz db38c7b67f8eea9f2e5b8a48d219165b2fdab11f SOURCES/gmp-6.1.0.tar.bz2 bbffc5a2b05e4f0c97e882f96c448504491dc4ed SOURCES/isl-0.18.tar.bz2 b8be66396c726fdc36ebb0f692ed8a8cca3bcc66 SOURCES/mpc-1.0.3.tar.gz diff --git a/.gitignore b/.gitignore index 6d38ef7..2c1334c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ SOURCES/doxygen-1.8.0.src.tar.gz -SOURCES/gcc-11.1.1-20210531.tar.xz +SOURCES/gcc-11.1.1-20210623.tar.xz SOURCES/gmp-6.1.0.tar.bz2 SOURCES/isl-0.18.tar.bz2 SOURCES/mpc-1.0.3.tar.gz diff --git a/SOURCES/gcc11-pr100797.patch b/SOURCES/gcc11-pr100797.patch deleted file mode 100644 index ff85ade..0000000 --- a/SOURCES/gcc11-pr100797.patch +++ /dev/null @@ -1,91 +0,0 @@ -2021-05-27 Jason Merrill - - PR c++/100797 - PR c++/95719 - * call.c (build_over_call): Adjust base_binfo in - resolves_to_fixed_type_p case. - - * g++.dg/inherit/virtual15.C: New test. - ---- gcc/cp/call.c -+++ gcc/cp/call.c -@@ -9152,18 +9152,32 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain) - if (base_binfo == error_mark_node) - return error_mark_node; - } -- tree converted_arg = build_base_path (PLUS_EXPR, arg, -- base_binfo, 1, complain); - - /* If we know the dynamic type of the object, look up the final overrider - in the BINFO. */ - if (DECL_VINDEX (fn) && (flags & LOOKUP_NONVIRTUAL) == 0 - && resolves_to_fixed_type_p (arg)) - { -- fn = lookup_vfn_in_binfo (DECL_VINDEX (fn), base_binfo); -- flags |= LOOKUP_NONVIRTUAL; -+ tree ov = lookup_vfn_in_binfo (DECL_VINDEX (fn), base_binfo); -+ -+ /* And unwind base_binfo to match. If we don't find the type we're -+ looking for in BINFO_INHERITANCE_CHAIN, we're looking at diamond -+ inheritance; for now do a normal virtual call in that case. */ -+ tree octx = DECL_CONTEXT (ov); -+ tree obinfo = base_binfo; -+ while (obinfo && !SAME_BINFO_TYPE_P (BINFO_TYPE (obinfo), octx)) -+ obinfo = BINFO_INHERITANCE_CHAIN (obinfo); -+ if (obinfo) -+ { -+ fn = ov; -+ base_binfo = obinfo; -+ flags |= LOOKUP_NONVIRTUAL; -+ } - } - -+ tree converted_arg = build_base_path (PLUS_EXPR, arg, -+ base_binfo, 1, complain); -+ - argarray[j++] = converted_arg; - parm = TREE_CHAIN (parm); - if (first_arg != NULL_TREE) ---- gcc/testsuite/g++.dg/inherit/virtual15.C -+++ gcc/testsuite/g++.dg/inherit/virtual15.C -@@ -0,0 +1,18 @@ -+// PR c++/100797 -+// { dg-do run } -+ -+bool ok = false; -+struct S1 { virtual ~S1() {} }; -+struct S2 { virtual void f1() = 0; }; -+struct S3: S1, S2 { -+ void f1() { f2(); } -+ virtual void f2() = 0; -+}; -+struct S4: S3 { -+ void f2() { ok = true; } -+ using S2::f1; -+}; -+int main() { -+ S4().f1(); -+ if (!ok) __builtin_abort (); -+} ---- gcc/testsuite/g++.dg/inherit/virtual15a.C -+++ gcc/testsuite/g++.dg/inherit/virtual15a.C -@@ -0,0 +1,19 @@ -+// PR c++/100797 plus diamond inheritance -+// { dg-do run } -+ -+bool ok = false; -+struct S1 { virtual ~S1() {} }; -+struct S2 { virtual void f1() = 0; }; -+struct S3: S1, virtual S2 { -+ void f1() { f2(); } -+ virtual void f2() = 0; -+}; -+struct SX: virtual S2 { }; -+struct S4: SX, S3 { -+ void f2() { ok = true; } -+ using S2::f1; -+}; -+int main() { -+ S4().f1(); -+ if (!ok) __builtin_abort (); -+} diff --git a/SPECS/gcc.spec b/SPECS/gcc.spec index a034142..0b380c4 100644 --- a/SPECS/gcc.spec +++ b/SPECS/gcc.spec @@ -2,13 +2,13 @@ %{?scl:%global __strip %%{_scl_root}/usr/bin/strip} %{?scl:%global __objdump %%{_scl_root}/usr/bin/objdump} %{?scl:%scl_package gcc} -%global DATE 20210531 -%global gitrev e8a00355f6fd6fe219de22855d92c351911519da +%global DATE 20210623 +%global gitrev cab23df287db6bf4e3d8207e72726b40a4b11058 %global gcc_version 11.1.1 %global gcc_major 11 # Note, gcc_release must be integer, if you want to add suffixes to # %%{release}, append them after %%{gcc_release} on Release: line. -%global gcc_release 3 +%global gcc_release 6 %global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e %global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0 %global mpc_version 1.0.3 @@ -179,12 +179,10 @@ URL: http://gcc.gnu.org # Need binutils which support -plugin # Need binutils which support .loc view >= 2.30 # Need binutils which support --generate-missing-build-notes=yes >= 2.31 -BuildRequires: procps-ng %if 0%{?scl:1} BuildRequires: %{?scl_prefix}binutils >= 2.31 # For testing -#BuildRequires: %{?scl_prefix}gdb >= 7.4.50 -BuildRequires: gcc-toolset-10-gdb >= 7.4.50 +BuildRequires: %{?scl_prefix}gdb >= 7.4.50 %endif # While gcc doesn't include statically linked binaries, during testing # -static is used several times. @@ -335,7 +333,6 @@ Patch9: gcc11-foffload-default.patch Patch10: gcc11-Wno-format-security.patch Patch11: gcc11-rh1574936.patch Patch12: gcc11-d-shared-libphobos.patch -Patch14: gcc11-pr100797.patch Patch100: gcc11-fortran-fdec-duplicates.patch Patch101: gcc11-fortran-flogical-as-integer.patch @@ -684,7 +681,6 @@ to NVidia PTX capable devices if available. %patch11 -p0 -b .rh1574936~ %endif %patch12 -p0 -b .d-shared-libphobos~ -%patch14 -p0 -b .pr100797~ %patch100 -p1 -b .fortran-fdec-duplicates~ %patch101 -p1 -b .fortran-flogical-as-integer~ @@ -723,9 +719,14 @@ find gcc/testsuite -name \*.pr96939~ | xargs rm -f echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE %if 0%{?rhel} == 6 -# Default to -gdwarf-3 rather than -gdwarf-4 -sed -i '/UInteger Var(dwarf_version)/s/Init(4)/Init(3)/' gcc/common.opt -sed -i 's/\(may be either 2, 3 or 4; the default version is \)4\./\13./' gcc/doc/invoke.texi +# Default to -gdwarf-3 rather than -gdwarf-5 +sed -i '/UInteger Var(dwarf_version)/s/Init(5)/Init(3)/' gcc/common.opt +sed -i 's/\(version for most targets is \)5 /\13 /' gcc/doc/invoke.texi +%endif +%if 0%{?rhel} <= 8 +# Default to -gdwarf-4 rather than -gdwarf-5 +sed -i '/UInteger Var(dwarf_version)/s/Init(5)/Init(4)/' gcc/common.opt +sed -i 's/\(version for most targets is \)5 /\14 /' gcc/doc/invoke.texi %endif cp -a libstdc++-v3/config/cpu/i{4,3}86/atomicity.h @@ -760,15 +761,12 @@ rm -f gcc/testsuite/go.test/test/chan/goroutines.go # These tests get stuck and don't timeout. %ifarch ppc ppc64 ppc64le -rm -f libgomp/testsuite/libgomp.c/target-32.c -rm -f libgomp/testsuite/libgomp.c/target-33.c -rm -f libgomp/testsuite/libgomp.c/target-34.c +rm -f libgomp/testsuite/libgomp.c/target-*.c rm -rf libgomp/testsuite/libgomp.oacc* -rm -rf libgomp/testsuite/libgomp.hsa.c* rm -rf libgomp/testsuite/libgomp.graphite* %endif # This test gets stuck. -%ifarch %{ix86} +%ifarch %{ix86} ppc64 s390x rm -f libstdc++-v3/testsuite/30_threads/future/members/poll.cc %endif @@ -1159,11 +1157,11 @@ find rpm.doc -name \*ChangeLog\* | xargs bzip2 -9 # Test the nonshared bits. mkdir libstdc++_compat_test cd libstdc++_compat_test -readelf -Ws %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libstdc++.so.6 | sed -n '/\.symtab/,$d;/ UND /d;/@GLIBC_PRIVATE/d;/\(GLOBAL\|WEAK\|UNIQUE\)/p' | awk '{ if ($4 == "OBJECT") { printf "%s %s %s %s %s\n", $8, $4, $5, $6, $3 } else { printf "%s %s %s %s\n", $8, $4, $5, $6 }}' | sed 's/ UNIQUE / GLOBAL /;s/ WEAK / GLOBAL /;s/@@GLIBCXX_[0-9.]*//;s/@@CXXABI_TM_[0-9.]*//;s/@@CXXABI_FLOAT128//;s/@@CXXABI_[0-9.]*//' | LC_ALL=C sort -u > system.abilist -readelf -Ws ../obj-%{gcc_target_platform}/%{gcc_target_platform}/libstdc++-v3/src/.libs/libstdc++.so.6 | sed -n '/\.symtab/,$d;/ UND /d;/@GLIBC_PRIVATE/d;/\(GLOBAL\|WEAK\|UNIQUE\)/p' | awk '{ if ($4 == "OBJECT") { printf "%s %s %s %s %s\n", $8, $4, $5, $6, $3 } else { printf "%s %s %s %s\n", $8, $4, $5, $6 }}' | sed 's/ UNIQUE / GLOBAL /;s/ WEAK / GLOBAL /;s/@@GLIBCXX_[0-9.]*//;s/@@CXXABI_TM_[0-9.]*//;s/@@CXXABI_FLOAT128//;s/@@CXXABI_[0-9.]*//' | LC_ALL=C sort -u > vanilla.abilist +readelf -Ws %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libstdc++.so.6 | sed -n '/\.symtab/,$d;/ UND /d;/@GLIBC_PRIVATE/d;/\(GLOBAL\|WEAK\|UNIQUE\)/p' | awk '{ if ($4 == "OBJECT") { printf "%s %s %s %s %s\n", $8, $4, $5, $6, $3 } else { printf "%s %s %s %s\n", $8, $4, $5, $6 }}' | sed 's/ UNIQUE / GLOBAL /;s/ WEAK / GLOBAL /;s/@@GLIBCXX_\(LDBL_\)\?[0-9.]*//;s/@@CXXABI_TM_[0-9.]*//;s/@@CXXABI_FLOAT128//;s/@@CXXABI_\(LDBL_\)\?[0-9.]*//' | LC_ALL=C sort -u > system.abilist +readelf -Ws ../obj-%{gcc_target_platform}/%{gcc_target_platform}/libstdc++-v3/src/.libs/libstdc++.so.6 | sed -n '/\.symtab/,$d;/ UND /d;/@GLIBC_PRIVATE/d;/\(GLOBAL\|WEAK\|UNIQUE\)/p' | awk '{ if ($4 == "OBJECT") { printf "%s %s %s %s %s\n", $8, $4, $5, $6, $3 } else { printf "%s %s %s %s\n", $8, $4, $5, $6 }}' | sed 's/ UNIQUE / GLOBAL /;s/ WEAK / GLOBAL /;s/@@GLIBCXX_\(LDBL_\)\?[0-9.]*//;s/@@CXXABI_TM_[0-9.]*//;s/@@CXXABI_FLOAT128//;s/@@CXXABI_\(LDBL_\)\?[0-9.]*//' | LC_ALL=C sort -u > vanilla.abilist diff -up system.abilist vanilla.abilist | awk '/^\+\+\+/{next}/^\+/{print gensub(/^+(.*)$/,"\\1","1",$0)}' > system2vanilla.abilist.diff ../obj-%{gcc_target_platform}/gcc/xgcc -B ../obj-%{gcc_target_platform}/gcc/ -shared -o libstdc++_nonshared.so -Wl,--whole-archive ../obj-%{gcc_target_platform}/%{gcc_target_platform}/libstdc++-v3/src/.libs/libstdc++_nonshared%{nonsharedver}.a -Wl,--no-whole-archive %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libstdc++.so.6 -readelf -Ws libstdc++_nonshared.so | sed -n '/\.symtab/,$d;/ UND /d;/@GLIBC_PRIVATE/d;/\(GLOBAL\|WEAK\|UNIQUE\)/p' | awk '{ if ($4 == "OBJECT") { printf "%s %s %s %s %s\n", $8, $4, $5, $6, $3 } else { printf "%s %s %s %s\n", $8, $4, $5, $6 }}' | sed 's/ UNIQUE / GLOBAL /;s/ WEAK / GLOBAL /;s/@@GLIBCXX_[0-9.]*//;s/@@CXXABI_TM_[0-9.]*//;s/@@CXXABI_FLOAT128//;s/@@CXXABI_[0-9.]*//' | LC_ALL=C sort -u > nonshared.abilist +readelf -Ws libstdc++_nonshared.so | sed -n '/\.symtab/,$d;/ UND /d;/@GLIBC_PRIVATE/d;/\(GLOBAL\|WEAK\|UNIQUE\)/p' | awk '{ if ($4 == "OBJECT") { printf "%s %s %s %s %s\n", $8, $4, $5, $6, $3 } else { printf "%s %s %s %s\n", $8, $4, $5, $6 }}' | sed 's/ UNIQUE / GLOBAL /;s/ WEAK / GLOBAL /;s/@@GLIBCXX_\(LDBL_\)\?[0-9.]*//;s/@@CXXABI_TM_[0-9.]*//;s/@@CXXABI_FLOAT128//;s/@@CXXABI_\(LDBL_\)\?[0-9.]*//' | LC_ALL=C sort -u > nonshared.abilist echo ====================NONSHARED========================= ldd -d -r ./libstdc++_nonshared.so || : ldd -u ./libstdc++_nonshared.so || : @@ -1987,10 +1985,6 @@ ln -s ../../libexec/gcc/%{gcc_target_platform}/%{gcc_major}/liblto_plugin.so \ %check cd obj-%{gcc_target_platform} -%ifarch ppc ppc64 ppc64le %{ix86} -while :; do sleep 15m; ps -ejHf; done & -%endif - %{?scl:PATH=%{_bindir}${PATH:+:${PATH}}} %if 0%{?rhel} <= 8 # Test against the system libstdc++.so.6 + libstdc++_nonshared.a combo @@ -2832,6 +2826,21 @@ fi %endif %changelog +* Wed Jun 23 2021 Marek Polacek 11.1.1-6 +- update from Fedora gcc 11.1.1-6 (#1946782) + - PRs c++/100876, c++/100879, c++/101106, c/100619, c/100783, fortran/95501, + fortran/95502, fortran/100283, fortran/101123, inline-asm/100785, + libstdc++/91488, libstdc++/95833, libstdc++/100806, libstdc++/100940, + middle-end/100250, middle-end/100307, middle-end/100574, + middle-end/100684, middle-end/100732, middle-end/100876, + middle-end/101062, middle-end/101167, target/99842, target/99939, + target/100310, target/100777, target/100856, target/100871, + target/101016 + +* Mon Jun 21 2021 Marek Polacek 11.1.1-5 +- update from Fedora gcc 11.1.1-5 (#1946782) +- default to -gdwarf-4 (#1974402) + * Wed Jun 2 2021 Marek Polacek 11.1.1-3 - update from Fedora gcc 11.1.1-3 (#1946782)