From 62cb63d4a3ddb6b77a5a69794f2b8f76c3a25ad1 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 12 Feb 2025 00:48:56 +0000 Subject: [PATCH] import UBI gcc-toolset-14-gcc-14.2.1-7.1.el8_10 --- .gcc-toolset-14-gcc.metadata | 2 +- .gitignore | 2 +- SOURCES/0020-more-fixes.patch | 2 +- SOURCES/gcc14-libstdc++-compat.patch | 3 +- SOURCES/gcc14-pr118509.patch | 56 +++++++++++++++++++++ SPECS/gcc.spec | 74 +++++++++++++++++++++++++--- 6 files changed, 129 insertions(+), 10 deletions(-) create mode 100644 SOURCES/gcc14-pr118509.patch diff --git a/.gcc-toolset-14-gcc.metadata b/.gcc-toolset-14-gcc.metadata index 3d6901e..db209eb 100644 --- a/.gcc-toolset-14-gcc.metadata +++ b/.gcc-toolset-14-gcc.metadata @@ -1,4 +1,4 @@ -46c9c865217e7ed71d89b7c378c940341bda3586 SOURCES/gcc-14.2.1-20240801.tar.xz +1ba89d5d97aa19d0aaa5edd8834e71a2dcbd08e4 SOURCES/gcc-14.2.1-20250110.tar.xz ae5fbb33bcb442121fbbf482a93f6b3c84d489ee SOURCES/isl-0.24.tar.bz2 fa4301e00c164604a6d8122c130375a55621b076 SOURCES/newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed.tar.xz c1e42726a71ca4a385502580778439bd326c6d4e SOURCES/nvptx-tools-87ce9dc5999e5fca2e1d3478a30888d9864c9804.tar.xz diff --git a/.gitignore b/.gitignore index 99d354b..6ec148b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -SOURCES/gcc-14.2.1-20240801.tar.xz +SOURCES/gcc-14.2.1-20250110.tar.xz SOURCES/isl-0.24.tar.bz2 SOURCES/newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed.tar.xz SOURCES/nvptx-tools-87ce9dc5999e5fca2e1d3478a30888d9864c9804.tar.xz diff --git a/SOURCES/0020-more-fixes.patch b/SOURCES/0020-more-fixes.patch index 2dd02c7..d123161 100644 --- a/SOURCES/0020-more-fixes.patch +++ b/SOURCES/0020-more-fixes.patch @@ -6,7 +6,7 @@ index b64e71dae22..5bf47b20820 100644 jump threading opportunities. Skip the later tests on aarch64. */ /* { dg-final { scan-tree-dump-not "Jumps threaded" "dom3" { target { ! aarch64*-*-* } } } } */ /* { dg-final { scan-tree-dump "Jumps threaded: 9" "thread2" { target { ! aarch64*-*-* } } } } */ --/* { dg-final { scan-tree-dump "Jumps threaded: 18" "thread2" { target { aarch64*-*-* } } } } */ +-/* { dg-final { scan-tree-dump "Jumps threaded: 17" "thread2" { target { aarch64*-*-* } } } } */ enum STATE { S0=0, diff --git a/SOURCES/gcc14-libstdc++-compat.patch b/SOURCES/gcc14-libstdc++-compat.patch index 2ddc593..d86b7f3 100644 --- a/SOURCES/gcc14-libstdc++-compat.patch +++ b/SOURCES/gcc14-libstdc++-compat.patch @@ -7996,7 +7996,7 @@ +//asm (".hidden _ZNSt10filesystem7__cxx114_DirC2ERKNS0_4pathEbbbRSt10error_code"); --- libstdc++-v3/src/nonshared17/fs_ops80.cc.jj 2024-07-18 16:10:38.338406596 +0200 +++ libstdc++-v3/src/nonshared17/fs_ops80.cc 2024-07-19 15:49:59.793786981 +0200 -@@ -0,0 +1,103 @@ +@@ -0,0 +1,104 @@ +// Copyright (C) 2019-2024 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free @@ -8020,6 +8020,7 @@ +// . + +#include "../c++17/fs_ops.cc" ++asm (".hidden _ZNSt10filesystem11equiv_filesEPKcRK4statS1_S4_RSt10error_code"); +asm (".hidden _ZN9__gnu_cxx13stdio_filebufIcSt11char_traitsIcEED0Ev"); +asm (".hidden _ZN9__gnu_cxx13stdio_filebufIcSt11char_traitsIcEED1Ev"); +asm (".hidden _ZN9__gnu_cxx13stdio_filebufIcSt11char_traitsIcEED2Ev"); diff --git a/SOURCES/gcc14-pr118509.patch b/SOURCES/gcc14-pr118509.patch new file mode 100644 index 0000000..6e19016 --- /dev/null +++ b/SOURCES/gcc14-pr118509.patch @@ -0,0 +1,56 @@ +2025-01-20 Jakub Jelinek + + PR c++/118509 + * typeck.cc (get_member_function_from_ptrfunc): Wrap force_target_expr + with save_expr. + + * g++.dg/expr/pmf-4.C: New test. + +--- gcc/cp/typeck.cc.jj 2025-01-09 10:10:28.042651891 +0100 ++++ gcc/cp/typeck.cc 2025-01-20 15:09:24.200053590 +0100 +@@ -4187,8 +4187,8 @@ get_member_function_from_ptrfunc (tree * + && !DECL_P (instance_ptr) + && !TREE_CONSTANT (instance_ptr))) + instance_ptr = instance_save_expr +- = force_target_expr (TREE_TYPE (instance_ptr), instance_ptr, +- complain); ++ = save_expr (force_target_expr (TREE_TYPE (instance_ptr), ++ instance_ptr, complain)); + + /* See above comment. */ + if (TREE_SIDE_EFFECTS (function) +@@ -4196,7 +4196,8 @@ get_member_function_from_ptrfunc (tree * + && !DECL_P (function) + && !TREE_CONSTANT (function))) + function +- = force_target_expr (TREE_TYPE (function), function, complain); ++ = save_expr (force_target_expr (TREE_TYPE (function), function, ++ complain)); + + /* Start by extracting all the information from the PMF itself. */ + e3 = pfn_from_ptrmemfunc (function); +--- gcc/testsuite/g++.dg/expr/pmf-4.C.jj ++++ gcc/testsuite/g++.dg/expr/pmf-4.C +@@ -0,0 +1,22 @@ ++// PR c++/118509 ++// { dg-do run } ++// { dg-options "-Wall -O2" } ++ ++struct A { void foo () { a = 1; } int a; A () : a (0) {} }; ++struct B : virtual A {}; ++typedef void (A::*C) (); ++ ++__attribute__((noipa)) void ++foo (C x, B *y) ++{ ++ (y->*x) (); ++} ++ ++int ++main () ++{ ++ B b; ++ foo (&A::foo, &b); ++ if (b.a != 1) ++ __builtin_abort (); ++} diff --git a/SPECS/gcc.spec b/SPECS/gcc.spec index a87a721..7c1a891 100644 --- a/SPECS/gcc.spec +++ b/SPECS/gcc.spec @@ -5,13 +5,13 @@ BuildRequires: scl-utils-build %{?scl:%global __strip %%{_scl_root}/usr/bin/strip} %{?scl:%global __objdump %%{_scl_root}/usr/bin/objdump} %{?scl:%scl_package gcc} -%global DATE 20240801 -%global gitrev 43d4666d3d94934f11857a2fb9122c575be81801 +%global DATE 20250110 +%global gitrev e525669e462dd777a1af9932fe9188937acdeb69 %global gcc_version 14.2.1 %global gcc_major 14 # 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 1 +%global gcc_release 7 %global nvptx_tools_gitrev 87ce9dc5999e5fca2e1d3478a30888d9864c9804 %global newlib_cygwin_gitrev d45261f62a15f8abd94a1031020b9a9f455e4eed %global isl_version 0.24 @@ -333,6 +333,7 @@ Patch9: gcc14-Wno-format-security.patch Patch10: gcc14-rh1574936.patch Patch11: gcc14-d-shared-libphobos.patch Patch12: gcc14-pr101523.patch +Patch13: gcc14-pr118509.patch Patch50: isl-rh2155127.patch @@ -444,6 +445,8 @@ Summary: Fortran support for GCC %{gcc_major} Requires: %{?scl_prefix}gcc%{!?scl:13} = %{version}-%{release} Requires: libgfortran >= 8.1.1 Autoreq: true +Requires(post): /sbin/install-info +Requires(preun): /sbin/install-info %if %{build_libquadmath} %if 0%{!?scl:1} @@ -680,6 +683,7 @@ so that there cannot be any synchronization problems. %patch -P10 -p0 -b .rh1574936~ %patch -P11 -p0 -b .d-shared-libphobos~ %patch -P12 -p1 -b .pr101523~ +%patch -P13 -p0 -b .pr118509~ %patch -P100 -p1 -b .fortran-fdec-duplicates~ @@ -738,10 +742,8 @@ echo 'TM_H += $(srcdir)/config/rs6000/rs6000-modes.h' >> gcc/config/rs6000/t-rs6 LC_ALL=C sed -i -e 's/\xa0/ /' gcc/doc/options.texi -sed -i -e '/ldp_fusion/s/Init(1)/Init(0)/' gcc/config/aarch64/aarch64.opt - sed -i -e 's/Common Driver Var(flag_report_bug)/& Init(1)/' gcc/common.opt -sed -i -e 's/context->report_bug = false;/context->report_bug = true;/' gcc/diagnostic.cc +sed -i -e 's/m_report_bug = false;/m_report_bug = true;/' gcc/diagnostic.cc %ifarch ppc if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then @@ -776,6 +778,10 @@ rm -rf libgomp/testsuite/libgomp.fortran/pr90030.f90 rm -f libstdc++-v3/testsuite/30_threads/future/members/poll.cc %endif +# Disable jQuery use (CVE-2020-11023). +sed -i '/^SEARCHENGINE/s/YES/NO/' libstdc++-v3/doc/doxygen/user.cfg.in +sed -i '/^GENERATE_TREEVIEW/s/YES/NO/' libstdc++-v3/doc/doxygen/user.cfg.in + %build # Undo the broken autoconf change in recent Fedora versions @@ -1312,6 +1318,9 @@ cp -r -p $libstdcxx_doc_builddir/html ../rpm.doc/libstdc++-v3/html/api mkdir -p %{buildroot}%{_mandir}/man3 cp -r -p $libstdcxx_doc_builddir/man/man3/* %{buildroot}%{_mandir}/man3/ find ../rpm.doc/libstdc++-v3 -name \*~ | xargs rm +# We don't want to ship jQuery in the libstdc++-docs package. +find ../rpm.doc/libstdc++-v3 -name jquery.js | xargs rm +find ../rpm.doc/libstdc++-v3/html -name '*.html' | xargs sed -i '/