update to new version

Signed-off-by: Toshaan Bharvani <toshaan@powerel.org>
master
Toshaan Bharvani 2026-05-15 10:14:23 +02:00
parent 14342c5a62
commit 9bf5a27b86
1 changed files with 217 additions and 23 deletions

View File

@ -1,10 +1,11 @@
%global DATE 20231218
%global gitrev 9e6808abff4d96f3f09474a2a744ef5f56df3e28
%global gcc_version 11.4.1
%global source_date_epoch_from_changelog 1
%global DATE 20240719
%global gitrev a985e3068a6f8045f8a6f2d2d5ae75f5eb0a8767
%global gcc_version 11.5.0
%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 11
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@ -123,7 +124,7 @@
%dnl rhel != 9
%global build_cross 0
%endif
# TODO: Add ppc64le-powerel-linux s390x-powerel-linux later.
# TODO: Add ppc64le-redhat-linux s390x-redhat-linux later.
%global cross_targets aarch64-powerel-linux
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
@ -150,7 +151,7 @@ Source0: gcc-%{version}-%{DATE}.tar.xz
Source1: nvptx-tools-%{nvptx_tools_gitrev}.tar.xz
# The source for nvptx-newlib package was pulled from upstream's vcs. Use the
# following commands to generate the tarball:
# git clone git://sourceware.org/git/newlib-cygwin.git newlib-cygwin-dir.tmp
# git clone https://sourceware.org/git/newlib-cygwin.git newlib-cygwin-dir.tmp
# git --git-dir=newlib-cygwin-dir.tmp/.git archive --prefix=newlib-cygwin-%%{newlib_cygwin_gitrev}/ %%{newlib_cygwin_gitrev} ":(exclude)newlib/libc/sys/linux/include/rpc/*.[hx]" | xz -9e > newlib-cygwin-%%{newlib_cygwin_gitrev}.tar.xz
# rm -rf newlib-cygwin-dir.tmp
Source2: newlib-cygwin-%{newlib_cygwin_gitrev}.tar.xz
@ -202,7 +203,10 @@ BuildRequires: glibc >= 2.3.90-35
%endif
%ifarch %{multilib_64_archs} sparcv9 ppc
# Ensure glibc{,-devel} is installed for both multilib arches
BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so
BuildRequires: (glibc32 or glibc-devel(%{__isa_name}-32))
%endif
%ifarch sparcv9 ppc
BuildRequires: (glibc64 or glibc-devel(%{__isa_name}-64))
%endif
%if %{build_ada}
# Ada requires Ada to build
@ -292,9 +296,42 @@ Patch28: gcc11-s390x-regarg-2.patch
Patch29: gcc11-s390x-regarg-3.patch
Patch30: gcc11-testsuite-fixes.patch
Patch32: gcc11-testsuite-fixes-2.patch
Patch33: gcc11-pr111039.patch
Patch34: gcc11-pr111070.patch
Patch33: gcc11-testsuite-fixes-3.patch
Patch34: gcc11-pr116034.patch
Patch35: gcc11-testsuite-aarch64-add-fno-stack-protector.patch
Patch36: gcc11-libgfortran-flush.patch
Patch37: gcc11-pr113960.patch
Patch38: gcc11-pr105157.patch
Patch39: gcc11-testsuite-fixes-4.patch
Patch40: gcc11-pr99888.patch
Patch41: gcc11-pr118976.patch
Patch42: gcc-RHEL-105072-1.patch
Patch43: gcc-RHEL-105072-2.patch
Patch44: gcc-RHEL-105072-3.patch
Patch45: gcc-RHEL-105072-4.patch
Patch46: gcc-RHEL-105072-5.patch
Patch47: gcc-RHEL-105072-6.patch
Patch48: gcc-RHEL-105072-7.patch
Patch49: gcc-RHEL-105072-8.patch
Patch50: gcc-RHEL-105072-9.patch
Patch51: gcc-RHEL-105072-10.patch
Patch52: gcc-RHEL-105072-11.patch
Patch53: gcc-RHEL-105072-12.patch
Patch54: gcc-RHEL-105072-13.patch
Patch55: gcc-RHEL-105072-14.patch
Patch56: gcc-RHEL-105072-15.patch
Patch57: gcc-RHEL-105072-16.patch
Patch58: gcc-RHEL-105072-17.patch
Patch59: gcc-RHEL-105072-18.patch
Patch60: gcc-RHEL-105072-19.patch
Patch61: gcc-RHEL-105072-20.patch
Patch62: gcc-RHEL-105072-21.patch
Patch63: gcc-RHEL-105072-22.patch
Patch64: gcc-RHEL-105072-23.patch
Patch65: gcc-RHEL-105072-24.patch
Patch66: gcc-RHEL-105072-25.patch
Patch67: gcc-RHEL-105072-26.patch
Patch68: gcc-RHEL-105072-27.patch

Patch100: gcc11-fortran-fdec-duplicates.patch
Patch101: gcc11-fortran-flogical-as-integer.patch
@ -307,6 +344,11 @@ Patch107: gcc11-fortran-fdec-promotion.patch
Patch108: gcc11-fortran-fdec-sequence.patch
Patch109: gcc11-fortran-fdec-add-missing-indexes.patch

# Pretty printer update.
Patch1000: gcc11-libstdc++-prettyprinter-update-15.patch
Patch1001: gcc11-libstdc++-prettyprinter-update-15-tests.patch
Patch1002: gcc11-libstdc++-prettyprinter-update-15-tests-48362.patch

# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
%ifnarch %{arm}
@ -352,6 +394,8 @@ You'll need this package in order to compile C code.
%package -n libgcc
Summary: GCC version 11 shared support library
Autoreq: false
# This expresses the dependency on _dl_find_object.
Requires: libc.so.6(GLIBC_2.35)%[0%{?__isa_bits} == 64 ? "(64bit)" : ""]
%if !%{build_ada}
Obsoletes: libgnat < %{version}-%{release}
%endif
@ -892,9 +936,42 @@ mark them as cross compiled.
%patch29 -p1 -b .s390x-regarg-3~
%patch30 -p1 -b .testsuite~
%patch32 -p1 -b .testsuite2~
%patch33 -p1 -b .pr111039~
%patch34 -p1 -b .pr111070~
%patch35 -p1 -b .testsuite3~
%patch33 -p1 -b .testsuite3~
%patch34 -p1 -b .pr116034~
%patch35 -p1 -b .testsuite4~
%patch36 -p1 -b .libgfortran-flush~
%patch37 -p1 -b .pr113960~
%patch38 -p1 -b .pr105157~
%patch39 -p1 -b .testsuite4~
%patch40 -p1 -b .pr99888~
%patch41 -p1 -b .pr118976~
%patch42 -p1 -b .rhel-105072-1~
%patch43 -p1 -b .rhel-105072-2~
%patch44 -p1 -b .rhel-105072-3~
%patch45 -p1 -b .rhel-105072-4~
%patch46 -p1 -b .rhel-105072-5~
%patch47 -p1 -b .rhel-105072-6~
%patch48 -p1 -b .rhel-105072-7~
%patch49 -p1 -b .rhel-105072-8~
%patch50 -p1 -b .rhel-105072-9~
%patch51 -p1 -b .rhel-105072-10~
%patch52 -p1 -b .rhel-105072-11~
%patch53 -p1 -b .rhel-105072-12~
%patch54 -p1 -b .rhel-105072-13~
%patch55 -p1 -b .rhel-105072-14~
%patch56 -p1 -b .rhel-105072-15~
%patch57 -p1 -b .rhel-105072-16~
%patch58 -p1 -b .rhel-105072-17~
%patch59 -p1 -b .rhel-105072-18~
%patch60 -p1 -b .rhel-105072-19~
%patch61 -p1 -b .rhel-105072-20~
%patch62 -p1 -b .rhel-105072-21~
%patch63 -p1 -b .rhel-105072-22~
%patch64 -p1 -b .rhel-105072-23~
%patch65 -p1 -b .rhel-105072-24~
%patch66 -p1 -b .rhel-105072-25~
%patch67 -p1 -b .rhel-105072-26~
%patch68 -p1 -b .rhel-105072-27~

%if 0%{?rhel} >= 9
%patch100 -p1 -b .fortran-fdec-duplicates~
@ -909,12 +986,16 @@ mark them as cross compiled.
%patch109 -p1 -b .fortran-fdec-add-missing-indexes~
%endif

%patch1000 -p1 -b .libstdc++-prettyprinter-update-15
%patch1001 -p1 -b .libstdc++-prettyprinter-update-15-tests
%patch1002 -p1 -b .libstdc++-prettyprinter-update-15-tests-48362

%ifarch %{arm}
rm -f gcc/testsuite/go.test/test/fixedbugs/issue19182.go
%endif

echo 'PowerEL9 %{version}-%{gcc_release}' > gcc/DEV-PHASE.native
echo 'PowerEL9 %{version}-%{gcc_release} cross from %{_arch}' > gcc/DEV-PHASE.cross
echo 'PowerEL %{version}-%{gcc_release}' > gcc/DEV-PHASE.native
echo 'PowerEL %{version}-%{gcc_release} cross from %{_arch}' > gcc/DEV-PHASE.cross
cp -p gcc/DEV-PHASE{.native,}

cp -a libstdc++-v3/config/cpu/i{4,3}86/atomicity.h
@ -1004,7 +1085,7 @@ CC="$CC" CXX="$CXX" CFLAGS="$OPT_FLAGS" \
--target nvptx-none --enable-as-accelerator-for=%{gcc_target_platform} \
--enable-languages=c,c++,fortran,lto \
--prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \
--with-bugurl=http://bugs.powerel.com/bugzilla \
--with-bugurl=https://bugzilla.powerel.org/bugzilla \
--enable-checking=release --with-system-zlib \
--with-gcc-major-version-only --without-isl --enable-host-pie --enable-host-bind-now
make %{?_smp_mflags}
@ -1069,7 +1150,7 @@ enableld=,d
# used in the cross builds.
CONFIGURE_OPTS_BASE="\
--prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \
--with-bugurl=http://bugs.powerel.com/bugzilla \
--with-bugurl=https://bugzilla.powerel.org/bugzilla \
--enable-shared --enable-threads=posix --enable-checking=release \
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions \
--enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only \
@ -1087,15 +1168,16 @@ CONFIGURE_OPTS_NATIVE="\
%ifarch ppc64le
--enable-targets=powerpcle-linux \
%endif
%ifarch ppc64
--enable-targets=powerpc-linux \
%endif
%ifarch ppc64le %{mips} s390x
%ifarch s390x
%if 0%{?fedora} < 32 && 0%{?rhel} < 8
--enable-multilib \
%else
--disable-multilib \
%endif
%else
--disable-multilib \
%endif
%else
--enable-multilib \
%endif
@ -1130,11 +1212,17 @@ CONFIGURE_OPTS_NATIVE="\
--host=%{gcc_target_platform} --build=%{gcc_target_platform} --target=%{gcc_target_platform} --with-cpu=v7
%endif
%ifarch ppc ppc64p7
--with-cpu-32=power4 --with-tune-32=power4 --with-cpu-64=power4 --with-tune-64=power4 \
%if 0%{?rhel} >= 7
--with-cpu-32=power7 --with-tune-32=power7 --with-cpu-64=power7 --with-tune-64=power7 \
%endif
%if 0%{?rhel} == 6
--with-cpu-32=power4 --with-tune-32=power6 --with-cpu-64=power4 --with-tune-64=power6 \
%endif
%endif
%ifarch ppc64 ppc64le
--with-cpu-32=%{cpuarch} --with-tune-32=%{cpuarch} --with-cpu-64=%{cpuarch} --with-tune-64=%{cpuarch} \
%endif
%endif
%ifarch ppc
--build=%{gcc_target_platform} --target=%{gcc_target_platform} --with-cpu=default32
%endif
@ -1150,7 +1238,7 @@ CONFIGURE_OPTS_NATIVE="\
%if 0%{?rhel} > 8
--with-arch_64=%{cpuarch} \
%endif
--with-arch_32=%{cpuarch} \
--with-arch_32=x86-64 \
%endif
%else
%ifarch %{ix86}
@ -1161,7 +1249,27 @@ CONFIGURE_OPTS_NATIVE="\
%endif
%endif
%ifarch s390 s390x
%if 0%{?rhel} >= 7
%if 0%{?rhel} > 7
%if 0%{?rhel} > 8
%if 0%{?rhel} == 9
--with-arch=z14 --with-tune=z15 \
%else
--with-arch=z13 --with-tune=arch13 \
%endif
%else
--with-arch=z13 --with-tune=z14 \
%endif
%else
--with-arch=z196 --with-tune=zEC12 \
%endif
%else
%if 0%{?fedora} >= 26
--with-arch=zEC12 --with-tune=z13 \
%else
--with-arch=z9-109 --with-tune=z10 \
%endif
%endif
--enable-decimal-float \
%endif
%ifarch armv7hl
@ -1386,6 +1494,9 @@ then
CONFIG_ARGS="$CONFIG_ARGS --without-annocheck"
CONFIG_ARGS="$CONFIG_ARGS --without-tests"
CONFIG_ARGS="$CONFIG_ARGS --disable-rpath"
CONFIG_ARGS="$CONFIG_ARGS --without-debuginfod"
CONFIG_ARGS="$CONFIG_ARGS --without-clang-plugin"
CONFIG_ARGS="$CONFIG_ARGS --without-llvm-plugin"

comp_dir="%{_builddir}/gcc-%{version}-%{DATE}/obj-%{gcc_target_platform}/gcc/"
ccompiler="%{_builddir}/gcc-%{version}-%{DATE}/obj-%{gcc_target_platform}/gcc/xgcc -B $comp_dir"
@ -1777,9 +1888,9 @@ mv -f %{buildroot}%{_prefix}/%{_lib}/libstdc++*gdb.py* \
%{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/
pushd ../libstdc++-v3/python
for i in `find . -name \*.py`; do
touch -r $i %{buildroot}%{_prefix}/share/gcc-%{gcc_major}/python/$i
touch -d @$SOURCE_DATE_EPOCH %{buildroot}%{_prefix}/share/gcc-%{gcc_major}/python/$i
done
touch -r hook.in %{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/libstdc++*gdb.py
touch -d @$SOURCE_DATE_EPOCH %{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/libstdc++*gdb.py
popd
for f in `find %{buildroot}%{_prefix}/share/gcc-%{gcc_major}/python/ \
%{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/ -name \*.py`; do
@ -3558,6 +3669,89 @@ end
%endif

%changelog
* Thu Jul 31 2025 Florian Weimer <fweimer@redhat.com> - 11.5.0-11
- Adjust glibc32 build dependency (RHEL-105072)

* Tue Jul 29 2025 Florian Weimer <fweimer@redhat.com> - 11.5.0-10
- Exception handling performance improvements (RHEL-105072)
- libgcc: Use _dl_find_object to find DWARF data in unwinder
- libgcc: Use lock-free data structures for run-time unwinder registration

* Fri Jun 27 2025 Siddhesh Poyarekar <siddhesh@redhat.com> 11.5.0-9
- Pin modification time for python files to SOURCE_DATE_EPOCH (RHEL-100148).

* Mon Jun 23 2025 Siddhesh Poyarekar <siddhesh@redhat.com> - 11.5.0-8
- Sync libstdc++ pretty printers to latest GTS (RHEL-81975)

* Thu May 29 2025 Joseph Myers <josmyers@redhat.com> - 11.5.0-7
- Fix folding of BIT_NOT_EXPR for POLY_INT_CST (PR 118976, RHEL-90239)

* Wed May 21 2025 David Malcolm <dmalcolm@redhat.com> - 11.5.0-6
- rs6000: Rework ELFv2 support for -fpatchable-function-entry (PR target/99888,
RHEL-75806)

* Fri Feb 7 2025 Marek Polacek <polacek@redhat.com> 11.5.0-5
- rebuild for CVE-2020-11023 (RHEL-78377)

* Mon Jan 27 2025 Marek Polacek <polacek@redhat.com> 11.5.0-4
- revert the PR middle-end/57245 patch (RHEL-76359)

* Tue Jan 21 2025 Marek Polacek <polacek@redhat.com> 11.5.0-3
- honor -frounding-math in real truncation (PR middle-end/57245, RHEL-73749)

* Mon Jul 22 2024 Marek Polacek <polacek@redhat.com> 11.5.0-2
- fix TARGET_CPU_DEFAULT (PR target/105157, RHEL-50037)
- libstdc++: Workaround kernel-headers on s390x-linux (RHEL-50054)
- fix wrong code with memcpy from _Complex (PR tree-optimization/116034)

* Fri Jul 19 2024 Marek Polacek <polacek@redhat.com> 11.5.0-1
- update from releases/gcc-11 branch (RHEL-35635)
- GCC 11.5 release
- PRs ada/113893, ada/113979, analyzer/104042, c/113262, c/114007, c/114493,
c++/89224, c++/92145, c++/92407, c++/97990, c++/99710, c++/100667,
c++/100772, c++/101765, c++/103185, c++/104051, c++/111485,
c++/111529, c++/113598, c++/113674, c++/114537, c++/114561,
c++/114562, c++/114572, c++/114634, c++/114691, d/113125, d/113758,
d/114171, debug/111080, debug/112718, driver/115440, fortran/50410,
fortran/103715, fortran/104908, fortran/107426, fortran/114474,
fortran/114825, gcov-profile/114115, libfortran/110651,
libgomp/113192, libquadmath/114533, libstdc++/104259,
libstdc++/104606, libstdc++/105417, libstdc++/110054,
libstdc++/113250, libstdc++/114147, libstdc++/114401,
libstdc++/114750, libstdc++/114803, libstdc++/115269,
libstdc++/115454, libstdc++/115575, middle-end/90348,
middle-end/95351, middle-end/107385, middle-end/108789,
middle-end/110027, middle-end/110115, middle-end/110176,
middle-end/111422, middle-end/111632, middle-end/112732,
middle-end/113907, middle-end/113921, middle-end/114599,
middle-end/114734, middle-end/114753, middle-end/115527,
middle-end/115836, objc/101666, objc/101718, preprocessor/105608,
rtl-optimization/100303, rtl-optimization/108086,
rtl-optimization/110079, rtl-optimization/114768,
rtl-optimization/114902, rtl-optimization/115092, sanitizer/97696,
sanitizer/111736, sanitizer/114956, sanitizer/115172, target/88309,
target/101737, target/101865, target/105522, target/108120,
target/108743, target/110411, target/111610, target/111677,
target/112397, target/113122, target/113281, target/114049,
target/114098, target/114130, target/114184, target/114310,
target/114837, target/114846, target/115253, target/115297,
target/115360, target/115457, target/115475, target/115611,
target/115691, testsuite/113175, testsuite/114034, testsuite/114036,
tree-optimization/110386, tree-optimization/110422,
tree-optimization/111039, tree-optimization/111070,
tree-optimization/111331, tree-optimization/111407,
tree-optimization/111445, tree-optimization/111736,
tree-optimization/112495, tree-optimization/112505,
tree-optimization/112793, tree-optimization/113372,
tree-optimization/113552, tree-optimization/113603,
tree-optimization/114027, tree-optimization/114115,
tree-optimization/114566, tree-optimization/114876,
tree-optimization/115192, tree-optimization/115337,
tree-optimization/115843
- fix FLUSH IOSTAT value (PR libfortran/101255, RHEL-32536)
- fix conditions for using memcmp in
std::lexicographical_compare_three_way (PR libstdc++/113960)

* Mon Dec 18 2023 Marek Polacek <polacek@redhat.com> 11.4.1-3
- update from releases/gcc-11-branch (RHEL-17638)
- PRs c++/106310, c++/106890, c++/109666, c++/109761, c++/111357,