diff --git a/.fmf/version b/.fmf/version
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/.fmf/version
@@ -0,0 +1 @@
+1
diff --git a/.gitignore b/.gitignore
index 18ec708..b67c902 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,59 +1,32 @@
-/gcc-7.0.1-20170126.tar.bz2
-/nvptx-newlib-aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24.tar.bz2
-/nvptx-tools-c28050f60193b3b95a18866a96f03334e874e78f.tar.bz2
-/gcc-7.0.1-20170128.tar.bz2
-/gcc-7.0.1-20170131.tar.bz2
-/gcc-7.0.1-20170201.tar.bz2
-/gcc-7.0.1-20170204.tar.bz2
-/gcc-7.0.1-20170209.tar.bz2
-/gcc-7.0.1-20170211.tar.bz2
-/gcc-7.0.1-20170219.tar.bz2
-/gcc-7.0.1-20170225.tar.bz2
-/gcc-7.0.1-20170308.tar.bz2
-/gcc-7.0.1-20170309.tar.bz2
-/gcc-7.0.1-20170327.tar.bz2
-/gcc-7.0.1-20170410.tar.bz2
-/gcc-7.0.1-20170421.tar.bz2
-/gcc-7.0.1-20170425.tar.bz2
-/gcc-7.1.1-20170503.tar.bz2
-/gcc-7.1.1-20170526.tar.bz2
-/gcc-7.1.1-20170622.tar.bz2
-/gcc-7.1.1-20170708.tar.bz2
-/gcc-7.1.1-20170711.tar.bz2
-/gcc-7.1.1-20170718.tar.bz2
-/gcc-7.1.1-20170802.tar.bz2
-/gcc-7.2.1-20170829.tar.bz2
-/gcc-7.2.1-20170915.tar.bz2
-/gcc-7.2.1-20180101.tar.bz2
-/gcc-7.2.1-20180104.tar.bz2
-/gcc-7.2.1-20180117.tar.bz2
-/gcc-7.3.1-20180125.tar.bz2
-/gcc-8.0.1-20180127.tar.xz
-/nvptx-newlib-aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24.tar.xz
-/nvptx-tools-c28050f60193b3b95a18866a96f03334e874e78f.tar.xz
-/gcc-8.0.1-20180830.tar.xz
-/gcc-8.0.1-20180130.tar.xz
-/gcc-8.0.1-20180131.tar.xz
-/gcc-8.0.1-20180207.tar.xz
-/gcc-8.0.1-20180210.tar.xz
-/gcc-8.0.1-20180218.tar.xz
-/gcc-8.0.1-20180220.tar.xz
-/gcc-8.0.1-20180222.tar.xz
-/gcc-8.0.1-20180310.tar.xz
-/gcc-8.0.1-20180312.tar.xz
-/gcc-8.0.1-20180317.tar.xz
-/gcc-8.0.1-20180324.tar.xz
-/gcc-8.0.1-20180410.tar.xz
-/gcc-8.0.1-20180424.tar.xz
-/gcc-8.0.1-20180425.tar.xz
-/gcc-8.1.1-20180502.tar.xz
-/gcc-8.1.1-20180620.tar.xz
-/gcc-8.1.1-20180626.tar.xz
-/gcc-8.1.1-20180712.tar.xz
-/gcc-8.2.1-20180726.tar.xz
-/gcc-8.2.1-20180801.tar.xz
-/gcc-8.2.1-20180905.tar.xz
-/gcc-8.2.1-20181011.tar.xz
-/gcc-8.2.1-20181105.tar.xz
-/gcc-8.2.1-20181215.tar.xz
-/gcc-8.2.1-20190109.tar.xz
+/isl-0.24.tar.bz2
+/nvptx-tools-87ce9dc5999e5fca2e1d3478a30888d9864c9804.tar.xz
+/newlib-cygwin-2e4db338ac125579d555aeee516e48588a628a16.tar.xz
+/gcc-15.0.1-20250201.tar.xz
+/gcc-15.0.1-20250204.tar.xz
+/gcc-15.0.1-20250225.tar.xz
+/gcc-15.0.1-20250301.tar.xz
+/gcc-15.0.1-20250313.tar.xz
+/gcc-15.0.1-20250329.tar.xz
+/gcc-15.0.1-20250410.tar.xz
+/newlib-cygwin-d35cc82b5ec15bb8a5fe0fe11e183d1887992e99.tar.xz
+/gcc-15.0.1-20250417.tar.xz
+/gcc-15.0.1-20250418.tar.xz
+/gcc-15.1.1-20250425.tar.xz
+/gcc-15.1.1-20250521.tar.xz
+/gcc-15.1.1-20250707.tar.xz
+/gcc-15.1.1-20250718.tar.xz
+/gcc-15.1.1-20250719.tar.xz
+/gcc-15.2.1-20250808.tar.xz
+/nvptx-tools-a0c1fff6534a4df9fb17937c3c4a4b1071212029.tar.xz
+/gcc-15.2.1-20250924.tar.xz
+/gcc-15.2.1-20251022.tar.xz
+/gcc-15.2.1-20251111.tar.xz
+/gcc-15.2.1-20251211.tar.xz
+/gcc-16.0.0-20251218.tar.xz
+/gcc-16.0.0-20251220.tar.xz
+/gcc-16.0.0-20260103.tar.xz
+/gcc-16.0.0-20260110.tar.xz
+/gcc-16.0.0-20260112.tar.xz
+/gcc-16.0.1-20260112.tar.xz
+/gcc-16.0.1-20260113.tar.xz
+/gcc-16.0.1-20260115.tar.xz
diff --git a/gating.yaml b/gating.yaml
new file mode 100644
index 0000000..cb47dc6
--- /dev/null
+++ b/gating.yaml
@@ -0,0 +1,16 @@
+--- !Policy
+product_versions:
+ - fedora-*
+decision_context: bodhi_update_push_stable
+subject_type: koji_build
+rules:
+ - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
+ - !PassingTestCaseRule {test_case_name: baseos-qe.koji-build.scratch-build.validation}
+--- !Policy
+product_versions:
+ - rhel-9
+decision_context: osci_compose_gate
+rules:
+ - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1-gating.functional}
+ - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1-gating-p9.functional}
+ - !PassingTestCaseRule {test_case_name: baseos-qe.koji-build.scratch-build.validation}
diff --git a/gcc.spec b/gcc.spec
index e0c4f1f..71e5d1d 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,85 +1,127 @@
-%global DATE 20190109
-%global SVNREV 267776
-%global gcc_version 8.2.1
-%global gcc_major 8
+%global DATE 20260115
+%global gitrev 1a9a51aca25eaad91d80869c43859274fe5e1096
+%global gcc_version 16.0.1
+%global gcc_major 16
# 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 7
-%global nvptx_tools_gitrev c28050f60193b3b95a18866a96f03334e874e78f
-%global nvptx_newlib_gitrev aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24
+%global gcc_release 0
+%global nvptx_tools_gitrev a0c1fff6534a4df9fb17937c3c4a4b1071212029
+%global newlib_cygwin_gitrev d35cc82b5ec15bb8a5fe0fe11e183d1887992e99
%global _unpackaged_files_terminate_build 0
+%if 0%{?fedora:1}
%global _performance_build 1
# Hardening slows the compiler way too much.
%undefine _hardened_build
+%endif
+%undefine _auto_set_build_flags
%if 0%{?fedora} > 27 || 0%{?rhel} > 7
# Until annobin is fixed (#1519165).
%undefine _annotated_build
%endif
+# Strip will fail on nvptx-none *.a archives and the brp-* scripts will
+# fail randomly depending on what is stripped last.
+%if 0%{?__brp_strip_static_archive:1}
+%global __brp_strip_static_archive %{__brp_strip_static_archive} || :
+%endif
+%if 0%{?__brp_strip_lto:1}
+%global __brp_strip_lto %{__brp_strip_lto} || :
+%endif
+%if 0%{?rhel} > 0
+%define bugurl https://issues.redhat.com
+%else
+%define bugurl https://bugzilla.redhat.com/bugzilla
+%endif
+%{!?dist_bug_report_url: %global dist_bug_report_url %bugurl}
+
+%if 0%{?fedora} < 32 && 0%{?rhel} < 8
%global multilib_64_archs sparc64 ppc64 ppc64p7 s390x x86_64
+%else
+%global multilib_64_archs sparc64 ppc64 ppc64p7 x86_64
+%endif
%if 0%{?rhel} > 7
%global build_ada 0
%global build_objc 0
%global build_go 0
+%global build_d 0
+%global build_m2 0
+%global build_cobol 0
+%global build_algol68 0
%else
-%ifarch %{ix86} x86_64 ia64 ppc %{power64} alpha s390x %{arm} aarch64
+%ifarch %{ix86} x86_64 ia64 ppc %{power64} alpha s390x %{arm} aarch64 riscv64
%global build_ada 1
%else
%global build_ada 0
%endif
%global build_objc 1
-%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64 %{mips}
+%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64 %{mips} riscv64
%global build_go 1
%else
%global build_go 0
%endif
+%ifarch %{ix86} x86_64 %{arm} aarch64 %{mips} s390 s390x riscv64
+%global build_d 1
+%else
+%global build_d 0
+%endif
+%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64 %{mips} riscv64
+%global build_m2 1
+%else
+%global build_m2 0
+%endif
+%ifarch x86_64 aarch64 ppc64le
+%global build_cobol 1
+%else
+%global build_cobol 0
+%endif
+%global build_algol68 1
%endif
%ifarch %{ix86} x86_64 ia64 ppc64le
%global build_libquadmath 1
%else
%global build_libquadmath 0
%endif
-%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64
+%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64 riscv64
%global build_libasan 1
%else
%global build_libasan 0
%endif
-%ifarch x86_64 ppc64 ppc64le aarch64
+%ifarch x86_64 aarch64
+%global build_libhwasan 1
+%else
+%global build_libhwasan 0
+%endif
+%ifarch x86_64 ppc64 ppc64le aarch64 s390x riscv64
%global build_libtsan 1
%else
%global build_libtsan 0
%endif
-%ifarch x86_64 ppc64 ppc64le aarch64
+%ifarch x86_64 ppc64 ppc64le aarch64 s390x riscv64
%global build_liblsan 1
%else
%global build_liblsan 0
%endif
-%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64
+%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64 riscv64
%global build_libubsan 1
%else
%global build_libubsan 0
%endif
-%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64 %{mips}
+%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64 %{mips} riscv64
%global build_libatomic 1
%else
%global build_libatomic 0
%endif
-%ifarch %{ix86} x86_64 %{arm} alpha ppc ppc64 ppc64le ppc64p7 s390 s390x aarch64
+%ifarch %{ix86} x86_64 %{arm} alpha ppc ppc64 ppc64le ppc64p7 s390 s390x aarch64 riscv64
%global build_libitm 1
%else
%global build_libitm 0
%endif
-%if 0%{?rhel} > 7
-%global build_libmpx 0
+%if 0%{?rhel} > 8
+%global build_isl 0
%else
-%ifarch %{ix86} x86_64
-%global build_libmpx 1
-%else
-%global build_libmpx 0
-%endif
-%endif
%global build_isl 1
+%endif
%global build_libstdcxx_docs 1
-%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64 %{mips}
+%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64 %{mips} riscv64
%global attr_ifunc 1
%else
%global attr_ifunc 0
@@ -89,9 +131,16 @@
%else
%global build_offload_nvptx 0
%endif
+%ifarch x86_64
+%global build_offload_amdgcn 1
+%else
+%global build_offload_amdgcn 0
+%endif
+%if 0%{?fedora} < 32 && 0%{?rhel} < 8
%ifarch s390x
%global multilib_32_arch s390
%endif
+%endif
%ifarch sparc64
%global multilib_32_arch sparcv9
%endif
@@ -101,34 +150,48 @@
%ifarch x86_64
%global multilib_32_arch i686
%endif
+%if 0%{?fedora} >= 36 || 0%{?rhel} >= 10
+%global build_annobin_plugin 1
+%else
+%global build_annobin_plugin 0
+%endif
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
-Release: %{gcc_release}%{?dist}
-# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
-# GCC Runtime Exception.
-License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
-Group: Development/Languages
-# The source for this package was pulled from upstream's vcs. Use the
-# following commands to generate the tarball:
-# svn export svn://gcc.gnu.org/svn/gcc/branches/redhat/gcc-8-branch@%%{SVNREV} gcc-%%{version}-%%{DATE}
-# tar cf - gcc-%%{version}-%%{DATE} | xz -9e > gcc-%%{version}-%%{DATE}.tar.xz
+Release: %{gcc_release}.3%{?dist}
+# License notes for some of the less obvious ones:
+# gcc/doc/cppinternals.texi: Linux-man-pages-copyleft-2-para
+# isl: MIT, BSD-2-Clause
+# libcody: Apache-2.0
+# libphobos/src/etc/c/curl.d: curl
+# All of the remaining license soup is in newlib.
+License: GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
+# The source for this package was pulled from upstream's vcs.
+# %%{gitrev} is some commit from the
+# https://gcc.gnu.org/git/?p=gcc.git;h=refs/vendors/redhat/heads/gcc-%%{gcc_major}-branch
+# branch. Use the following command to generate the tarball:
+# ./update-gcc.sh %%{gitrev}
+# optionally if say /usr/src/gcc/.git/ is an existing gcc git clone
+# ./update-gcc.sh %%{gitrev} /usr/src/gcc/.git/
+# to speed up the clone operations. Note, %%{gitrev} macro in
+# gcc.spec shouldn't be updated before running the script, the script
+# will update it, fill in some %%changelog details etc.
Source0: gcc-%{version}-%{DATE}.tar.xz
# The source for nvptx-tools package was pulled from upstream's vcs. Use the
# following commands to generate the tarball:
-# git clone https://github.com/MentorEmbedded/nvptx-tools.git
-# cd nvptx-tools
-# git archive origin/master --prefix=nvptx-tools-%%{nvptx_tools_gitrev}/ | xz -9e > ../nvptx-tools-%%{nvptx_tools_gitrev}.tar.xz
-# cd ..; rm -rf nvptx-tools
+# git clone --depth 1 https://github.com/MentorEmbedded/nvptx-tools.git nvptx-tools-dir.tmp
+# git --git-dir=nvptx-tools-dir.tmp/.git fetch --depth 1 origin %%{nvptx_tools_gitrev}
+# git --git-dir=nvptx-tools-dir.tmp/.git archive --prefix=nvptx-tools-%%{nvptx_tools_gitrev}/ %%{nvptx_tools_gitrev} | xz -9e > nvptx-tools-%%{nvptx_tools_gitrev}.tar.xz
+# rm -rf nvptx-tools-dir.tmp
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 https://github.com/MentorEmbedded/nvptx-newlib.git
-# cd nvptx-newlib
-# git archive origin/master --prefix=nvptx-newlib-%%{nvptx_newlib_gitrev}/ | xz -9 > ../nvptx-newlib-%%{nvptx_newlib_gitrev}.tar.xz
-# cd ..; rm -rf nvptx-newlib
-Source2: nvptx-newlib-%{nvptx_newlib_gitrev}.tar.xz
-%global isl_version 0.16.1
+# 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
+%global isl_version 0.24
+Source3: https://gcc.gnu.org/pub/gcc/infrastructure/isl-%{isl_version}.tar.bz2
URL: http://gcc.gnu.org
# Need binutils with -pie support >= 2.14.90.0.4-4
# Need binutils which can omit dot symbols and overlap .opd on ppc64 >= 2.15.91.0.2-4
@@ -143,23 +206,23 @@ 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
-%if 0%{?fedora} >= 29 || 0%{?rhel} > 7
-BuildRequires: binutils >= 2.31
-%else
-BuildRequires: binutils >= 2.24
-%endif
+# Need binutils which support .base64 >= 2.43
+BuildRequires: binutils >= 2.43
# While gcc doesn't include statically linked binaries, during testing
# -static is used several times.
BuildRequires: glibc-static
BuildRequires: zlib-devel, gettext, dejagnu, bison, flex, sharutils
BuildRequires: texinfo, texinfo-tex, /usr/bin/pod2man
BuildRequires: systemtap-sdt-devel >= 1.3
-BuildRequires: gmp-devel >= 4.1.2-8, mpfr-devel >= 2.2.1, libmpc-devel >= 0.8.1
-BuildRequires: python2-devel, python3-devel
-BuildRequires: gcc, gcc-c++
+BuildRequires: gmp-devel >= 4.1.2-8, mpfr-devel >= 3.1.0, libmpc-devel >= 0.8.1
+BuildRequires: python3-devel, /usr/bin/python
+BuildRequires: gcc, gcc-c++, make
%if %{build_go}
BuildRequires: hostname, procps
%endif
+%if %{build_cobol}
+BuildRequires: libxml2-devel
+%endif
# For VTA guality testing
BuildRequires: gdb
# Make sure pthread.h doesn't contain __thread tokens
@@ -168,34 +231,35 @@ BuildRequires: gdb
BuildRequires: glibc-devel >= 2.4.90-13
BuildRequires: elfutils-devel >= 0.147
BuildRequires: elfutils-libelf-devel >= 0.147
+BuildRequires: libzstd-devel
%ifarch ppc ppc64 ppc64le ppc64p7 s390 s390x sparc sparcv9 alpha
# Make sure glibc supports TFmode long double
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
+%ifarch %{multilib_64_archs}
+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
BuildRequires: gcc-gnat >= 3.1, libgnat >= 3.1
%endif
+%if %{build_d}
+# D requires D to build
+BuildRequires: gcc-gdc >= 11.0.0, libgphobos-static >= 11.0.0
+%endif
%ifarch ia64
BuildRequires: libunwind >= 0.98
%endif
-%if %{build_isl}
-BuildRequires: isl = %{isl_version}
-BuildRequires: isl-devel = %{isl_version}
-%if 0%{?__isa_bits} == 64
-Requires: libisl.so.15()(64bit)
-%else
-Requires: libisl.so.15
-%endif
-%endif
%if %{build_libstdcxx_docs}
BuildRequires: doxygen >= 1.7.1
BuildRequires: graphviz, dblatex, texlive-collection-latex, docbook5-style-xsl
%endif
+%if %{build_offload_amdgcn}
+BuildRequires: llvm >= 15, lld >= 15
+%endif
Requires: cpp = %{version}-%{release}
# Need .eh_frame ld optimizations
# Need proper visibility support
@@ -213,11 +277,8 @@ Requires: cpp = %{version}-%{release}
# Need binutils that support -plugin
# Need binutils that support .loc view >= 2.30
# Need binutils which support --generate-missing-build-notes=yes >= 2.31
-%if 0%{?fedora} >= 29 || 0%{?rhel} > 7
-Requires: binutils >= 2.31
-%else
-Requires: binutils >= 2.24
-%endif
+# Need binutils that support .base64 >= 2.43
+Requires: binutils >= 2.43
# Make sure gdb will understand DW_FORM_strp
Conflicts: gdb < 5.1-2
Requires: glibc-devel >= 2.2.90-12
@@ -232,38 +293,40 @@ Requires: glibc >= 2.16
%endif
Requires: libgcc >= %{version}-%{release}
Requires: libgomp = %{version}-%{release}
+%if %{build_libatomic}
+Requires: libatomic = %{version}-%{release}
+Obsoletes: libatomic-static < %{version}-%{release}
+Provides: libatomic-static = %{version}-%{release}
+%endif
+# lto-wrapper invokes make
+Requires: make
%if !%{build_ada}
Obsoletes: gcc-gnat < %{version}-%{release}
%endif
Obsoletes: gcc-java < %{version}-%{release}
-%ifarch %{ix86} x86_64
-Obsoletes: libcilkrts
-Obsoletes: libcilkrts-static
-%endif
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
AutoReq: true
Provides: bundled(libiberty)
+Provides: bundled(libbacktrace)
+Provides: bundled(libffi)
Provides: gcc(major) = %{gcc_major}
-Patch0: gcc8-hack.patch
-Patch2: gcc8-i386-libgomp.patch
-Patch3: gcc8-sparc-config-detection.patch
-Patch4: gcc8-libgomp-omp_h-multilib.patch
-Patch5: gcc8-libtool-no-rpath.patch
-Patch6: gcc8-isl-dl.patch
-Patch7: gcc8-libstdc++-docs.patch
-Patch8: gcc8-no-add-needed.patch
-Patch9: gcc8-foffload-default.patch
-Patch10: gcc8-Wno-format-security.patch
-Patch11: gcc8-rh1512529-aarch64.patch
-Patch12: gcc8-mcet.patch
-Patch13: gcc8-rh1574936.patch
+Patch0: gcc16-hack.patch
+Patch2: gcc16-sparc-config-detection.patch
+Patch3: gcc16-libgomp-omp_h-multilib.patch
+Patch4: gcc16-libtool-no-rpath.patch
+Patch5: gcc16-isl-dl.patch
+Patch6: gcc16-isl-dl2.patch
+Patch7: gcc16-libstdc++-docs.patch
+Patch8: gcc16-no-add-needed.patch
+Patch9: gcc16-Wno-format-security.patch
+Patch10: gcc16-rh1574936.patch
+Patch11: gcc16-d-shared-libphobos.patch
+Patch12: gcc16-pr119006.patch
+Patch13: gcc16-pr123273.patch
-Patch1000: nvptx-tools-no-ptxas.patch
-Patch1001: nvptx-tools-build.patch
-Patch1002: nvptx-tools-glibc.patch
+Patch50: isl-rh2155127.patch
+Patch100: gcc16-fortran-fdec-duplicates.patch
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
@@ -285,7 +348,7 @@ Patch1002: nvptx-tools-glibc.patch
%if %{build_go}
# Avoid stripping these libraries and binaries.
%global __os_install_post \
-chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.13.* \
+chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.25.* \
chmod 644 %{buildroot}%{_prefix}/bin/go.gcc \
chmod 644 %{buildroot}%{_prefix}/bin/gofmt.gcc \
chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/cgo \
@@ -293,7 +356,7 @@ chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}
chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/test2json \
chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/vet \
%__os_install_post \
-chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgo.so.13.* \
+chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgo.so.25.* \
chmod 755 %{buildroot}%{_prefix}/bin/go.gcc \
chmod 755 %{buildroot}%{_prefix}/bin/gofmt.gcc \
chmod 755 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/cgo \
@@ -304,22 +367,27 @@ chmod 755 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}
%endif
%description
-The gcc package contains the GNU Compiler Collection version 8.
+The gcc package contains the GNU Compiler Collection version %{gcc_major}.
You'll need this package in order to compile C code.
%package -n libgcc
-Summary: GCC version 8 shared support library
-Group: System Environment/Libraries
+Summary: GCC version %{gcc_major} shared support library
Autoreq: false
%if !%{build_ada}
Obsoletes: libgnat < %{version}-%{release}
%endif
-Obsoletes: libmudflap
-Obsoletes: libmudflap-devel
-Obsoletes: libmudflap-static
+Obsoletes: libmudflap < %{version}-%{release}
+Obsoletes: libmudflap-devel < %{version}-%{release}
+Obsoletes: libmudflap-static < %{version}-%{release}
Obsoletes: libgcj < %{version}-%{release}
Obsoletes: libgcj-devel < %{version}-%{release}
Obsoletes: libgcj-src < %{version}-%{release}
+%ifarch %{ix86} x86_64
+Obsoletes: libcilkrts < %{version}-%{release}
+Obsoletes: libcilkrts-static < %{version}-%{release}
+Obsoletes: libmpx < %{version}-%{release}
+Obsoletes: libmpx-static < %{version}-%{release}
+%endif
%description -n libgcc
This package contains GCC shared support library which is needed
@@ -327,10 +395,11 @@ e.g. for exception handling support.
%package c++
Summary: C++ support for GCC
-Group: Development/Languages
Requires: gcc = %{version}-%{release}
Requires: libstdc++ = %{version}-%{release}
Requires: libstdc++-devel = %{version}-%{release}
+Provides: gcc-g++ = %{version}-%{release}
+Provides: g++ = %{version}-%{release}
Autoreq: true
%description c++
@@ -340,9 +409,14 @@ including templates and exception handling.
%package -n libstdc++
Summary: GNU Standard C++ Library
-Group: System Environment/Libraries
Autoreq: true
Requires: glibc >= 2.10.90-7
+BuildRequires: tzdata >= 2017c
+%if 0%{?fedora} > 38 || 0%{?rhel} > 9
+Recommends: tzdata >= 2017c
+%else
+Requires: tzdata >= 2017c
+%endif
%description -n libstdc++
The libstdc++ package contains a rewritten standard compliant GCC Standard
@@ -350,7 +424,6 @@ C++ Library.
%package -n libstdc++-devel
Summary: Header files and libraries for C++ development
-Group: Development/Libraries
Requires: libstdc++%{?_isa} = %{version}-%{release}
Autoreq: true
@@ -361,7 +434,6 @@ development. This includes rewritten implementation of STL.
%package -n libstdc++-static
Summary: Static libraries for the GNU standard C++ library
-Group: Development/Libraries
Requires: libstdc++-devel = %{version}-%{release}
Autoreq: true
@@ -370,7 +442,6 @@ Static libraries for the GNU standard C++ library.
%package -n libstdc++-docs
Summary: Documentation for the GNU standard C++ library
-Group: Development/Libraries
Autoreq: true
%description -n libstdc++-docs
@@ -379,7 +450,6 @@ for the GNU standard C++ library.
%package objc
Summary: Objective-C support for GCC
-Group: Development/Languages
Requires: gcc = %{version}-%{release}
Requires: libobjc = %{version}-%{release}
Autoreq: true
@@ -391,7 +461,6 @@ object-oriented derivative of the C language.
%package objc++
Summary: Objective-C++ support for GCC
-Group: Development/Languages
Requires: gcc-c++ = %{version}-%{release}, gcc-objc = %{version}-%{release}
Autoreq: true
@@ -400,7 +469,6 @@ gcc-objc++ package provides Objective-C++ support for the GCC.
%package -n libobjc
Summary: Objective-C runtime
-Group: System Environment/Libraries
Autoreq: true
%description -n libobjc
@@ -409,15 +477,14 @@ Objective-C dynamically linked programs.
%package gfortran
Summary: Fortran support
-Group: Development/Languages
Requires: gcc = %{version}-%{release}
Requires: libgfortran = %{version}-%{release}
%if %{build_libquadmath}
Requires: libquadmath = %{version}-%{release}
Requires: libquadmath-devel = %{version}-%{release}
%endif
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
+Provides: gcc-fortran = %{version}-%{release}
+Provides: gfortran = %{version}-%{release}
Autoreq: true
%description gfortran
@@ -426,11 +493,12 @@ programs with the GNU Compiler Collection.
%package -n libgfortran
Summary: Fortran runtime
-Group: System Environment/Libraries
Autoreq: true
+%if 0%{?fedora} < 28 && 0%{?rhel} < 8
%if %{build_libquadmath}
Requires: libquadmath = %{version}-%{release}
%endif
+%endif
%description -n libgfortran
This package contains Fortran shared library which is needed to run
@@ -438,7 +506,6 @@ Fortran dynamically linked programs.
%package -n libgfortran-static
Summary: Static Fortran libraries
-Group: Development/Libraries
Requires: libgfortran = %{version}-%{release}
Requires: gcc = %{version}-%{release}
%if %{build_libquadmath}
@@ -448,19 +515,124 @@ Requires: libquadmath-static = %{version}-%{release}
%description -n libgfortran-static
This package contains static Fortran libraries.
+%package gdc
+Summary: D support
+Requires: gcc = %{version}-%{release}
+Requires: libgphobos = %{version}-%{release}
+Provides: gcc-d = %{version}-%{release}
+Provides: gdc = %{version}-%{release}
+Autoreq: true
+
+%description gdc
+The gcc-gdc package provides support for compiling D
+programs with the GNU Compiler Collection.
+
+%package -n libgphobos
+Summary: D runtime
+Autoreq: true
+
+%description -n libgphobos
+This package contains D shared library which is needed to run
+D dynamically linked programs.
+
+%package -n libgphobos-static
+Summary: Static D libraries
+Requires: libgphobos = %{version}-%{release}
+Requires: gcc-gdc = %{version}-%{release}
+
+%description -n libgphobos-static
+This package contains static D libraries.
+
+%package gm2
+Summary: Modula-2 support
+Requires: gcc = %{version}-%{release}
+Requires: libgm2 = %{version}-%{release}
+Provides: gcc-m2 = %{version}-%{release}
+Provides: gm2 = %{version}-%{release}
+Autoreq: true
+
+%description gm2
+The gcc-gm2 package provides support for compiling Modula-2
+programs with the GNU Compiler Collection.
+
+%package -n libgm2
+Summary: Modula-2 runtime
+Autoreq: true
+
+%description -n libgm2
+This package contains Modula-2 shared libraries which are needed to run
+Modula-2 dynamically linked programs.
+
+%package -n libgm2-static
+Summary: Static Modula-2 libraries
+Requires: libgm2 = %{version}-%{release}
+Requires: gcc-gm2 = %{version}-%{release}
+
+%description -n libgm2-static
+This package contains static Modula-2 libraries.
+
+%package gcobol
+Summary: COBOL support
+Requires: gcc = %{version}-%{release}
+Requires: gcc-c++ = %{version}-%{release}
+Requires: libgcobol = %{version}-%{release}
+Autoreq: true
+
+%description gcobol
+The gcc-gcobol package provides support for compiling COBOL
+programs with the GNU Compiler Collection.
+
+%package -n libgcobol
+Summary: COBOL runtime
+Autoreq: true
+
+%description -n libgcobol
+This package contains COBOL shared libraries which are needed to run
+COBOL dynamically linked programs.
+
+%package -n libgcobol-static
+Summary: Static COBOL libraries
+Requires: libgcobol = %{version}-%{release}
+Requires: gcc-gcobol = %{version}-%{release}
+
+%description -n libgcobol-static
+This package contains static COBOL libraries.
+
+%package algol68
+Summary: Algol 68 support
+Requires: gcc = %{version}-%{release}
+Requires: libga68 = %{version}-%{release}
+Autoreq: true
+
+%description algol68
+The gcc-algol68 package provides support for compiling Algol 68
+programs with the GNU Compiler Collection.
+
+%package -n libga68
+Summary: Algol 68 runtime
+Autoreq: true
+
+%description -n libga68
+This package contains Algol 68 shared libraries which are needed to run
+Algol 68 dynamically linked programs.
+
+%package -n libga68-static
+Summary: Static Algol 68 libraries
+Requires: libga68 = %{version}-%{release}
+Requires: gcc-algol68 = %{version}-%{release}
+
+%description -n libga68-static
+This package contains static Algol 68 libraries.
+
%package -n libgomp
-Summary: GCC OpenMP v4.5 shared support library
-Group: System Environment/Libraries
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
+Summary: GCC OpenMP v5.2 shared support library
%description -n libgomp
This package contains GCC shared support library which is needed
-for OpenMP v4.5 support.
+for OpenMP v5.2 support.
%package -n libgomp-offload-nvptx
-Summary: GCC OpenMP v4.5 plugin for offloading to NVPTX
-Group: System Environment/Libraries
+Summary: GCC OpenMP v5.2 plugin for offloading to NVPTX
Requires: libgomp = %{version}-%{release}
%description -n libgomp-offload-nvptx
@@ -468,9 +640,19 @@ This package contains libgomp plugin for offloading to NVidia
PTX. The plugin needs libcuda.so.1 shared library that has to be
installed separately.
+%package -n libgomp-offload-amdgcn
+Summary: GCC OpenMP v5.2 plugin for offloading to AMD GCN
+Requires: libgomp = %{version}-%{release}
+%if 0%{?fedora:1}
+Requires: rocm-runtime >= 6.0.0
+%endif
+
+%description -n libgomp-offload-amdgcn
+This package contains libgomp plugin for offloading to AMD ROCm capable
+devices.
+
%package gdb-plugin
Summary: GCC plugin for GDB
-Group: Development/Debuggers
Requires: gcc = %{version}-%{release}
%description gdb-plugin
@@ -478,7 +660,6 @@ This package contains GCC plugin for GDB C expression evaluation.
%package -n libgccjit
Summary: Library for embedding GCC inside programs and libraries
-Group: System Environment/Libraries
Requires: gcc = %{version}-%{release}
%description -n libgccjit
@@ -486,24 +667,32 @@ This package contains shared library with GCC JIT front-end.
%package -n libgccjit-devel
Summary: Support for embedding GCC inside programs and libraries
-Group: Development/Libraries
%if 0%{?fedora} > 27 || 0%{?rhel} > 7
BuildRequires: python3-sphinx
%else
BuildRequires: python-sphinx
%endif
Requires: libgccjit = %{version}-%{release}
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
%description -n libgccjit-devel
This package contains header files and documentation for GCC JIT front-end.
+%package -n libgdiagnostics
+Summary: Library for emitting diagnostics
+
+%description -n libgdiagnostics
+This package contains libgdiagnostics shared library and sarif-replay program.
+
+%package -n libgdiagnostics-devel
+Summary: Support for emitting diagnostics
+Requires: libgdiagnostics = %{version}-%{release}
+
+%description -n libgdiagnostics-devel
+This package contains header files and documentation for the libgdiagnostics
+library.
+
%package -n libquadmath
Summary: GCC __float128 shared support library
-Group: System Environment/Libraries
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
%description -n libquadmath
This package contains GCC shared support library which is needed
@@ -511,7 +700,6 @@ for __float128 math support and for Fortran REAL*16 support.
%package -n libquadmath-devel
Summary: GCC __float128 support
-Group: Development/Libraries
Requires: libquadmath = %{version}-%{release}
Requires: gcc = %{version}-%{release}
@@ -521,7 +709,6 @@ REAL*16 and programs using __float128 math.
%package -n libquadmath-static
Summary: Static libraries for __float128 support
-Group: Development/Libraries
Requires: libquadmath-devel = %{version}-%{release}
%description -n libquadmath-static
@@ -530,9 +717,6 @@ using REAL*16 and programs using __float128 math.
%package -n libitm
Summary: The GNU Transactional Memory library
-Group: System Environment/Libraries
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
%description -n libitm
This package contains the GNU Transactional Memory library
@@ -540,7 +724,6 @@ which is a GCC transactional memory support runtime library.
%package -n libitm-devel
Summary: The GNU Transactional Memory support
-Group: Development/Libraries
Requires: libitm = %{version}-%{release}
Requires: gcc = %{version}-%{release}
@@ -550,7 +733,6 @@ GNU Transactional Memory library.
%package -n libitm-static
Summary: The GNU Transactional Memory static library
-Group: Development/Libraries
Requires: libitm-devel = %{version}-%{release}
%description -n libitm-static
@@ -558,28 +740,14 @@ This package contains GNU Transactional Memory static libraries.
%package -n libatomic
Summary: The GNU Atomic library
-Group: System Environment/Libraries
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
%description -n libatomic
This package contains the GNU Atomic library
which is a GCC support runtime library for atomic operations not supported
by hardware.
-%package -n libatomic-static
-Summary: The GNU Atomic static library
-Group: Development/Libraries
-Requires: libatomic = %{version}-%{release}
-
-%description -n libatomic-static
-This package contains GNU Atomic static libraries.
-
%package -n libasan
Summary: The Address Sanitizer runtime library
-Group: System Environment/Libraries
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
%description -n libasan
This package contains the Address Sanitizer library
@@ -587,17 +755,28 @@ which is used for -fsanitize=address instrumented programs.
%package -n libasan-static
Summary: The Address Sanitizer static library
-Group: Development/Libraries
Requires: libasan = %{version}-%{release}
%description -n libasan-static
This package contains Address Sanitizer static runtime library.
+%package -n libhwasan
+Summary: The Hardware-assisted Address Sanitizer runtime library
+
+%description -n libhwasan
+This package contains the Hardware-assisted Address Sanitizer library
+which is used for -fsanitize=hwaddress instrumented programs.
+
+%package -n libhwasan-static
+Summary: The Hardware-assisted Address Sanitizer static library
+Requires: libhwasan = %{version}-%{release}
+
+%description -n libhwasan-static
+This package contains Hardware-assisted Address Sanitizer static runtime
+library.
+
%package -n libtsan
Summary: The Thread Sanitizer runtime library
-Group: System Environment/Libraries
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
%description -n libtsan
This package contains the Thread Sanitizer library
@@ -605,7 +784,6 @@ which is used for -fsanitize=thread instrumented programs.
%package -n libtsan-static
Summary: The Thread Sanitizer static library
-Group: Development/Libraries
Requires: libtsan = %{version}-%{release}
%description -n libtsan-static
@@ -613,9 +791,6 @@ This package contains Thread Sanitizer static runtime library.
%package -n libubsan
Summary: The Undefined Behavior Sanitizer runtime library
-Group: System Environment/Libraries
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
%description -n libubsan
This package contains the Undefined Behavior Sanitizer library
@@ -623,7 +798,6 @@ which is used for -fsanitize=undefined instrumented programs.
%package -n libubsan-static
Summary: The Undefined Behavior Sanitizer static library
-Group: Development/Libraries
Requires: libubsan = %{version}-%{release}
%description -n libubsan-static
@@ -631,9 +805,6 @@ This package contains Undefined Behavior Sanitizer static runtime library.
%package -n liblsan
Summary: The Leak Sanitizer runtime library
-Group: System Environment/Libraries
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
%description -n liblsan
This package contains the Leak Sanitizer library
@@ -641,37 +812,15 @@ which is used for -fsanitize=leak instrumented programs.
%package -n liblsan-static
Summary: The Leak Sanitizer static library
-Group: Development/Libraries
Requires: liblsan = %{version}-%{release}
%description -n liblsan-static
This package contains Leak Sanitizer static runtime library.
-%package -n libmpx
-Summary: The Memory Protection Extensions runtime libraries
-Group: System Environment/Libraries
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
-
-%description -n libmpx
-This package contains the Memory Protection Extensions runtime libraries
-which is used for -fcheck-pointer-bounds -mmpx instrumented programs.
-
-%package -n libmpx-static
-Summary: The Memory Protection Extensions static libraries
-Group: Development/Libraries
-Requires: libmpx = %{version}-%{release}
-
-%description -n libmpx-static
-This package contains the Memory Protection Extensions static runtime libraries.
-
%package -n cpp
Summary: The C Preprocessor
-Group: Development/Languages
Requires: filesystem >= 3
Provides: /lib/cpp
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
Autoreq: true
%description -n cpp
@@ -698,11 +847,8 @@ macros.
%package gnat
Summary: Ada 83, 95, 2005 and 2012 support for GCC
-Group: Development/Languages
Requires: gcc = %{version}-%{release}
Requires: libgnat = %{version}-%{release}, libgnat-devel = %{version}-%{release}
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
Autoreq: true
%description gnat
@@ -711,7 +857,6 @@ development tools, the documents and Ada compiler.
%package -n libgnat
Summary: GNU Ada 83, 95, 2005 and 2012 runtime shared libraries
-Group: System Environment/Libraries
Autoreq: true
%description -n libgnat
@@ -720,7 +865,6 @@ shared libraries, which are required to run programs compiled with the GNAT.
%package -n libgnat-devel
Summary: GNU Ada 83, 95, 2005 and 2012 libraries
-Group: Development/Languages
Autoreq: true
%description -n libgnat-devel
@@ -729,7 +873,6 @@ libraries, which are required to compile with the GNAT.
%package -n libgnat-static
Summary: GNU Ada 83, 95, 2005 and 2012 static libraries
-Group: Development/Languages
Requires: libgnat-devel = %{version}-%{release}
Autoreq: true
@@ -739,14 +882,12 @@ static libraries.
%package go
Summary: Go support
-Group: Development/Languages
Requires: gcc = %{version}-%{release}
Requires: libgo = %{version}-%{release}
Requires: libgo-devel = %{version}-%{release}
-Requires(post): /sbin/install-info
-Requires(preun): /sbin/install-info
Requires(post): %{_sbindir}/update-alternatives
Requires(postun): %{_sbindir}/update-alternatives
+Provides: gccgo = %{version}-%{release}
Autoreq: true
%description go
@@ -755,7 +896,6 @@ with the GNU Compiler Collection.
%package -n libgo
Summary: Go runtime
-Group: System Environment/Libraries
Autoreq: true
%description -n libgo
@@ -764,7 +904,6 @@ Go dynamically linked programs.
%package -n libgo-devel
Summary: Go development libraries
-Group: Development/Languages
Requires: libgo = %{version}-%{release}
Autoreq: true
@@ -774,7 +913,6 @@ Go programs.
%package -n libgo-static
Summary: Static Go libraries
-Group: Development/Libraries
Requires: libgo = %{version}-%{release}
Requires: gcc = %{version}-%{release}
@@ -783,9 +921,8 @@ This package contains static Go libraries.
%package plugin-devel
Summary: Support for compiling GCC plugins
-Group: Development/Languages
Requires: gcc = %{version}-%{release}
-Requires: gmp-devel >= 4.1.2-8, mpfr-devel >= 2.2.1, libmpc-devel >= 0.8.1
+Requires: gmp-devel >= 4.1.2-8, mpfr-devel >= 3.1.0, libmpc-devel >= 0.8.1
%description plugin-devel
This package contains header files and other support files
@@ -794,7 +931,6 @@ not stable, so plugins must be rebuilt any time GCC is updated.
%package offload-nvptx
Summary: Offloading compiler to NVPTX
-Group: Group: Development/Languages
Requires: gcc = %{version}-%{release}
Requires: libgomp-offload-nvptx = %{version}-%{release}
@@ -804,47 +940,64 @@ NVidia PTX. OpenMP and OpenACC programs linked with -fopenmp will
by default add PTX code into the binaries, which can be offloaded
to NVidia PTX capable devices if available.
+%package offload-amdgcn
+Summary: Offloading compiler to AMD GCN
+Requires: gcc = %{version}-%{release}
+Requires: libgomp-offload-amdgcn = %{version}-%{release}
+Requires: llvm >= 15, lld >= 15
+
+%description offload-amdgcn
+The gcc-offload-amdgcn package provides offloading support for
+AMD GCN. OpenMP and OpenACC programs linked with -fopenmp will
+by default add GCN code into the binaries, which can be offloaded
+to AMD ROCm capable devices if available.
+
+%package plugin-annobin
+Summary: The annobin plugin for gcc, built by the installed version of gcc
+Requires: gcc = %{version}-%{release}
+%if %{build_annobin_plugin}
+BuildRequires: annobin-plugin-gcc >= 10.62, rpm-devel, binutils-devel, xz
+%endif
+
+%description plugin-annobin
+This package adds a version of the annobin plugin for gcc. This version
+of the plugin is explicitly built by the same version of gcc that is installed
+so that there cannot be any synchronization problems.
+
%prep
-%setup -q -n gcc-%{version}-%{DATE} -a 1 -a 2
-%patch0 -p0 -b .hack~
-%patch2 -p0 -b .i386-libgomp~
-%patch3 -p0 -b .sparc-config-detection~
-%patch4 -p0 -b .libgomp-omp_h-multilib~
-%patch5 -p0 -b .libtool-no-rpath~
+%setup -q -n gcc-%{version}-%{DATE} -a 1 -a 2 -a 3
+%autopatch -p0 -m 0 -M 4
%if %{build_isl}
-%patch6 -p0 -b .isl-dl~
+%autopatch -p0 -m 5 -M 6
%endif
%if %{build_libstdcxx_docs}
-%patch7 -p0 -b .libstdc++-docs~
-%endif
-%patch8 -p0 -b .no-add-needed~
-%patch9 -p0 -b .foffload-default~
-%patch10 -p0 -b .Wno-format-security~
-%patch11 -p0 -b .rh1512529-aarch64~
-%if 0%{?fedora} == 28
-%patch12 -p0 -b .mcet~
+%autopatch -p0 7
%endif
+%autopatch -p0 -m 8 -M 9
%if 0%{?fedora} >= 29 || 0%{?rhel} > 7
-%patch13 -p0 -b .rh1574936~
+%autopatch -p0 10
+%endif
+%autopatch -p0 -m 11 -M 99
+touch -r isl-0.24/m4/ax_prog_cxx_for_build.m4 isl-0.24/m4/ax_prog_cc_for_build.m4
+
+%if 0%{?rhel} >= 9
+%autopatch -p1 100
%endif
-cd nvptx-tools-%{nvptx_tools_gitrev}
-%patch1000 -p1 -b .nvptx-tools-no-ptxas~
-%patch1001 -p1 -b .nvptx-tools-build~
-%patch1002 -p1 -b .nvptx-tools-glibc~
-cd ..
+%ifarch %{arm}
+rm -f gcc/testsuite/go.test/test/fixedbugs/issue19182.go
+%endif
+rm -f libphobos/testsuite/libphobos.gc/forkgc2.d
+#rm -rf libphobos/testsuite/libphobos.gc
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
-cp -a libstdc++-v3/config/cpu/i{4,3}86/atomicity.h
-
-echo 'TM_H += $(srcdir)/config/rs6000/rs6000-modes.h' >> gcc/config/rs6000/t-rs6000
-
./contrib/gcc_update --touch
LC_ALL=C sed -i -e 's/\xa0/ /' gcc/doc/options.texi
sed -i -e 's/Common Driver Var(flag_report_bug)/& Init(1)/' gcc/common.opt
+sed -i -e 's/m_report_bug = false;/m_report_bug = true;/' gcc/diagnostics/context.cc
%ifarch ppc
if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then
@@ -873,10 +1026,15 @@ export CONFIG_SITE=NONE
CC=gcc
CXX=g++
-OPT_FLAGS=`echo %{optflags}|sed -e 's/\(-Wp,\)\?-D_FORTIFY_SOURCE=[12]//g'`
+OPT_FLAGS="%{optflags}"
+OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=[123]//g'`
+OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/\(-Wp,\)\?-D_FORTIFY_SOURCE=[123]//g'`
+OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/\(-Wp,\)\?-U_FORTIFY_SOURCE//g'`
+OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-flto=auto//g;s/-flto//g;s/-ffat-lto-objects//g'`
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-m64//g;s/-m32//g;s/-m31//g'`
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mfpmath=sse/-mfpmath=sse -msse2/g'`
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/ -pipe / /g'`
+OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-fno-omit-frame-pointer//g;s/-mbackchain//g;s/-mno-omit-leaf-frame-pointer//g'`
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-Werror=format-security/-Wformat-security/g'`
%ifarch sparc
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mcpu=ultrasparc/-mtune=ultrasparc/g;s/-mcpu=v[78]//g'`
@@ -905,7 +1063,7 @@ make %{?_smp_mflags}
make install prefix=${IROOT}%{_prefix}
cd ../..
-ln -sf nvptx-newlib-%{nvptx_newlib_gitrev}/newlib newlib
+ln -sf newlib-cygwin-%{newlib_cygwin_gitrev}/newlib newlib
rm -rf obj-offload-nvptx-none
mkdir obj-offload-nvptx-none
@@ -919,7 +1077,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://bugzilla.redhat.com/bugzilla \
+ --with-bugurl=%dist_bug_report_url \
--enable-checking=release --with-system-zlib \
--with-gcc-major-version-only --without-isl
make %{?_smp_mflags}
@@ -927,13 +1085,82 @@ cd ..
rm -f newlib
%endif
+%if %{build_offload_amdgcn}
+mkdir -p objia%{_prefix}/bin objia%{_prefix}/amdgcn-amdhsa/bin
+IAROOT=`pwd`/objia
+ln -sf %{_prefix}/bin/llvm-ar ${IAROOT}%{_prefix}/bin/amdgcn-amdhsa-ar
+ln -sf %{_prefix}/bin/llvm-ar ${IAROOT}%{_prefix}/bin/amdgcn-amdhsa-ranlib
+ln -sf %{_prefix}/bin/llvm-mc ${IAROOT}%{_prefix}/bin/amdgcn-amdhsa-as
+ln -sf %{_prefix}/bin/llvm-nm ${IAROOT}%{_prefix}/bin/amdgcn-amdhsa-nm
+ln -sf %{_prefix}/bin/lld ${IAROOT}%{_prefix}/bin/amdgcn-amdhsa-ld
+ln -sf ../../bin/amdgcn-amdhsa-ar ${IAROOT}%{_prefix}/amdgcn-amdhsa/bin/ar
+ln -sf ../../bin/amdgcn-amdhsa-ranlib ${IAROOT}%{_prefix}/amdgcn-amdhsa/bin/ranlib
+ln -sf ../../bin/amdgcn-amdhsa-as ${IAROOT}%{_prefix}/amdgcn-amdhsa/bin/as
+ln -sf ../../bin/amdgcn-amdhsa-nm ${IAROOT}%{_prefix}/amdgcn-amdhsa/bin/nm
+ln -sf ../../bin/amdgcn-amdhsa-ld ${IAROOT}%{_prefix}/amdgcn-amdhsa/bin/ld
+
+ln -sf newlib-cygwin-%{newlib_cygwin_gitrev}/newlib newlib
+rm -rf obj-offload-amdgcn-amdhsa
+mkdir obj-offload-amdgcn-amdhsa
+
+cd obj-offload-amdgcn-amdhsa
+CC="$CC" CXX="$CXX" CFLAGS="$OPT_FLAGS" \
+ CXXFLAGS="`echo " $OPT_FLAGS " | sed 's/ -Wall / /g;s/ -fexceptions / /g' \
+ | sed 's/ -Wformat-security / -Wformat -Wformat-security /'`" \
+ XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \
+ ../configure --disable-bootstrap --disable-sjlj-exceptions \
+ --with-build-time-tools=${IAROOT}%{_prefix}/amdgcn-amdhsa/bin \
+ --target amdgcn-amdhsa --enable-as-accelerator-for=%{gcc_target_platform} \
+ --enable-languages=c,c++,fortran,lto \
+ --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \
+ --with-bugurl=%dist_bug_report_url \
+ --enable-checking=release --with-system-zlib \
+ --with-gcc-major-version-only --without-isl --disable-libquadmath
+make %{?_smp_mflags}
+cd ..
+rm -f newlib
+%endif
+
rm -rf obj-%{gcc_target_platform}
mkdir obj-%{gcc_target_platform}
cd obj-%{gcc_target_platform}
+%if %{build_isl}
+mkdir isl-build isl-install
+%ifarch s390 s390x
+ISL_FLAG_PIC=-fPIC
+%else
+ISL_FLAG_PIC=-fpic
+%endif
+cd isl-build
+
+%ifarch riscv64
+# Update config.{sub,guess} scripts for riscv64 (the original ones are too old)
+cp -f -v /usr/lib/rpm/%{_vendor}/config.guess ../../isl-%{isl_version}/config.guess
+cp -f -v /usr/lib/rpm/%{_vendor}/config.sub ../../isl-%{isl_version}/config.sub
+%endif
+
+sed -i 's|libisl\([^-]\)|libgcc%{gcc_major}privateisl\1|g' \
+ ../../isl-%{isl_version}/Makefile.{am,in}
+../../isl-%{isl_version}/configure \
+ CC=/usr/bin/gcc CXX=/usr/bin/g++ \
+ CFLAGS="${CFLAGS:-%optflags} $ISL_FLAG_PIC" --prefix=`cd ..; pwd`/isl-install
+make %{?_smp_mflags} CFLAGS="${CFLAGS:-%optflags} $ISL_FLAG_PIC"
+make install
+cd ../isl-install/lib
+rm libgcc%{gcc_major}privateisl.so{,.23}
+mv libgcc%{gcc_major}privateisl.so.23.1.0 libisl.so.23
+ln -sf libisl.so.23 libisl.so
+cd ../..
+%endif
+
enablelgo=
enablelada=
enablelobjc=
+enableld=
+enablelm2=
+enablelcob=
+enablela68=
%if %{build_objc}
enablelobjc=,objc,obj-c++
%endif
@@ -943,36 +1170,61 @@ enablelada=,ada
%if %{build_go}
enablelgo=,go
%endif
+%if %{build_d}
+enableld=,d
+%endif
+%if %{build_m2}
+enablelm2=,m2
+%endif
+%if %{build_cobol}
+enablelcob=,cobol
+%endif
+%if %{build_algol68}
+enablela68=,algol68
+%endif
+offloadtgts=
+%if %{build_offload_nvptx}
+offloadtgts=nvptx-none
+%endif
+%if %{build_offload_amdgcn}
+offloadtgts=${offloadtgts:+${offloadtgts},}amdgcn-amdhsa
+%endif
CONFIGURE_OPTS="\
--prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \
- --with-bugurl=http://bugzilla.redhat.com/bugzilla \
+ --with-bugurl=%dist_bug_report_url \
--enable-shared --enable-threads=posix --enable-checking=release \
%ifarch ppc64le
--enable-targets=powerpcle-linux \
%endif
-%ifarch ppc64le %{mips} riscv64
+%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
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions \
--enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only \
+ --enable-libstdcxx-backtrace --with-libstdcxx-zoneinfo=%{_datadir}/zoneinfo \
%ifnarch %{mips}
--with-linker-hash-style=gnu \
%endif
--enable-plugin --enable-initfini-array \
%if %{build_isl}
- --with-isl \
+ --with-isl=`pwd`/isl-install \
%else
--without-isl \
%endif
-%if %{build_libmpx}
- --enable-libmpx \
-%else
- --disable-libmpx \
+%if %{build_offload_nvptx} || %{build_offload_amdgcn}
+ --enable-offload-targets=$offloadtgts --enable-offload-defaulted \
%endif
%if %{build_offload_nvptx}
- --enable-offload-targets=nvptx-none \
--without-cuda-driver \
%endif
%if 0%{?fedora} >= 21 || 0%{?rhel} >= 7
@@ -989,6 +1241,9 @@ CONFIGURE_OPTS="\
%ifarch sparc sparcv9 sparc64 ppc ppc64 ppc64le ppc64p7 s390 s390x alpha
--with-long-double-128 \
%endif
+%ifarch ppc64le
+ --with-long-double-format=ieee \
+%endif
%ifarch sparc
--disable-linux-futex \
%endif
@@ -1007,20 +1262,38 @@ CONFIGURE_OPTS="\
%endif
%endif
%ifarch ppc64le
+%if 0%{?rhel} >= 9
+%if 0%{?rhel} >= 10
+ --with-cpu-32=power9 --with-tune-32=power10 --with-cpu-64=power9 --with-tune-64=power10 \
+%else
+ --with-cpu-32=power9 --with-tune-32=power9 --with-cpu-64=power9 --with-tune-64=power9 \
+%endif
+%else
--with-cpu-32=power8 --with-tune-32=power8 --with-cpu-64=power8 --with-tune-64=power8 \
%endif
+%endif
%ifarch ppc
--build=%{gcc_target_platform} --target=%{gcc_target_platform} --with-cpu=default32
%endif
%ifarch %{ix86} x86_64
--enable-cet \
--with-tune=generic \
+%if 0%{?fedora} >= 44 || 0%{?rhel} >= 11
+ --with-tls=gnu2 \
+%endif
%endif
%if 0%{?rhel} >= 7
%ifarch %{ix86}
--with-arch=x86-64 \
%endif
%ifarch x86_64
+%if 0%{?rhel} > 8
+%if 0%{?rhel} > 9
+ --with-arch_64=x86-64-v3 \
+%else
+ --with-arch_64=x86-64-v2 \
+%endif
+%endif
--with-arch_32=x86-64 \
%endif
%else
@@ -1034,16 +1307,28 @@ CONFIGURE_OPTS="\
%ifarch s390 s390x
%if 0%{?rhel} >= 7
%if 0%{?rhel} > 7
- --with-arch=zEC12 --with-tune=z13 \
+%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} >= 38
+ --with-arch=z13 --with-tune=z14 \
+%else
%if 0%{?fedora} >= 26
--with-arch=zEC12 --with-tune=z13 \
%else
--with-arch=z9-109 --with-tune=z10 \
%endif
+%endif
%endif
--enable-decimal-float \
%endif
@@ -1057,8 +1342,29 @@ CONFIGURE_OPTS="\
%ifarch mips64 mips64el
--with-arch=mips64r2 --with-abi=64 \
%endif
+%ifarch riscv64
+ --with-arch=rv64gc --with-abi=lp64d --with-multilib-list=lp64d \
+%endif
%ifnarch sparc sparcv9 ppc
--build=%{gcc_target_platform} \
+%endif
+%if 0%{?fedora} >= 35 || 0%{?rhel} >= 9
+%ifnarch %{arm}
+ --with-build-config=bootstrap-lto --enable-link-serialization=1 \
+%endif
+%endif
+%if 0%{?rhel:1}
+ --enable-host-pie --enable-host-bind-now \
+%endif
+ --disable-libssp \
+%if %{build_libquadmath} == 0
+ --disable-libquadmath \
+%endif
+%if %{build_libatomic} == 0
+ --disable-libatomic \
+%endif
+%if %{build_libitm} == 0
+ --disable-libitm \
%endif
"
@@ -1067,13 +1373,13 @@ CC="$CC" CXX="$CXX" CFLAGS="$OPT_FLAGS" \
| sed 's/ -Wformat-security / -Wformat -Wformat-security /'`" \
XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \
../configure --enable-bootstrap \
- --enable-languages=c,c++,fortran${enablelobjc}${enablelada}${enablelgo},lto \
+ --enable-languages=c,c++,fortran${enablelobjc}${enablelada}${enablelgo}${enableld}${enablelm2}${enablelcob}${enablela68},lto \
$CONFIGURE_OPTS
%ifarch sparc sparcv9 sparc64
-make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" bootstrap
+make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" LDFLAGS_FOR_TARGET=-Wl,-z,relro,-z,now bootstrap
%else
-make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" profiledbootstrap
+make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" LDFLAGS_FOR_TARGET=-Wl,-z,relro,-z,now profiledbootstrap
%endif
CC="`%{gcc_target_platform}/libstdc++-v3/scripts/testsuite_flags --build-cc`"
@@ -1088,7 +1394,7 @@ CC="$CC" CXX="$CXX" CFLAGS="$OPT_FLAGS" \
| sed 's/ -Wformat-security / -Wformat -Wformat-security /'`" \
XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \
../../configure --disable-bootstrap --enable-host-shared \
- --enable-languages=jit $CONFIGURE_OPTS
+ --enable-languages=jit --enable-libgdiagnostics $CONFIGURE_OPTS
make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" all-gcc
cp -a gcc/libgccjit.so* ../gcc/
cd ../gcc/
@@ -1101,6 +1407,10 @@ make jit.sphinx.html
make jit.sphinx.install-html jit_htmldir=`pwd`/../../rpm.doc/libgccjit-devel/html
cd ..
+%if %{build_isl}
+cp -a isl-install/lib/libisl.so.23 gcc/
+%endif
+
# Make generated man pages even if Pod::Man is not new enough
perl -pi -e 's/head3/head2/' ../contrib/texi2pod.pl
for i in ../gcc/doc/*.texi; do
@@ -1119,11 +1429,11 @@ cd ../..
# Copy various doc files here and there
cd ..
-mkdir -p rpm.doc/gfortran rpm.doc/objc
+mkdir -p rpm.doc/{gfortran,objc,gdc,libphobos,gm2,libgm2,libgdiagnostics-devel,gcobol,libgcobol,algol68,libga68}
mkdir -p rpm.doc/go rpm.doc/libgo rpm.doc/libquadmath rpm.doc/libitm
-mkdir -p rpm.doc/changelogs/{gcc/cp,gcc/ada,gcc/jit,libstdc++-v3,libobjc,libgomp,libcc1,libatomic,libsanitizer,libmpx}
+mkdir -p rpm.doc/changelogs/{gcc/cp,gcc/ada,gcc/jit,libstdc++-v3,libobjc,libgomp,libcc1,libatomic,libsanitizer}
-for i in {gcc,gcc/cp,gcc/ada,gcc/jit,libstdc++-v3,libobjc,libgomp,libcc1,libatomic,libsanitizer,libmpx}/ChangeLog*; do
+for i in {gcc,gcc/cp,gcc/ada,gcc/jit,libstdc++-v3,libobjc,libgomp,libcc1,libatomic,libsanitizer}/ChangeLog*; do
cp -p $i rpm.doc/changelogs/$i
done
@@ -1138,10 +1448,45 @@ done)
cp -p $i ../rpm.doc/objc/$i.libobjc
done)
%endif
+%if %{build_d}
+(cd gcc/d; for i in ChangeLog*; do
+ cp -p $i ../../rpm.doc/gdc/$i.gdc
+done)
+(cd libphobos; for i in ChangeLog*; do
+ cp -p $i ../rpm.doc/libphobos/$i.libphobos
+done
+cp -a src/LICENSE*.txt libdruntime/LICENSE.txt ../rpm.doc/libphobos/)
+%endif
+%if %{build_m2}
+(cd gcc/m2; for i in ChangeLog*; do
+ cp -p $i ../../rpm.doc/gm2/$i.gm2
+done)
+(cd libgm2; for i in ChangeLog*; do
+ cp -p $i ../rpm.doc/libgm2/$i.libgm2
+done)
+%endif
+%if %{build_cobol}
+(cd gcc/cobol; for i in ChangeLog*; do
+ cp -p $i ../../rpm.doc/gcobol/$i.gcobol
+done)
+(cd libgcobol; for i in ChangeLog*; do
+ cp -p $i ../rpm.doc/libgcobol/$i.libgcobol
+done)
+%endif
+%if %{build_algol68}
+(cd gcc/algol68; for i in ChangeLog*; do
+ cp -p $i ../../rpm.doc/algol68/$i.algol68
+done)
+(cd libga68; for i in ChangeLog*; do
+ cp -p $i ../rpm.doc/libga68/$i.libga68
+done)
+%endif
%if %{build_libquadmath}
(cd libquadmath; for i in ChangeLog* COPYING.LIB; do
cp -p $i ../rpm.doc/libquadmath/$i.libquadmath
-done)
+done;
+sed -n '/==========/,/==========/{/==========/d;s/^ \* *//p}' math/cosq.c \
+ > ../rpm.doc/libquadmath/LICENSE.SunPro)
%endif
%if %{build_libitm}
(cd libitm; for i in ChangeLog*; do
@@ -1156,12 +1501,48 @@ done)
cp -p $i ../rpm.doc/libgo/$i.libgo
done)
%endif
+(cd gcc/doc/libgdiagnostics; make html; \
+mv _build/html ../../../rpm.doc/libgdiagnostics-devel/html )
rm -f rpm.doc/changelogs/gcc/ChangeLog.[1-9]
find rpm.doc -name \*ChangeLog\* | xargs bzip2 -9
+%if %{build_annobin_plugin}
+mkdir annobin-plugin
+cd annobin-plugin
+tar xf %{_usrsrc}/annobin/latest-annobin.tar.xz
+cd annobin*
+touch aclocal.m4 configure Makefile.in */configure */config.h.in */Makefile.in
+ANNOBIN_FLAGS=../../obj-%{gcc_target_platform}/%{gcc_target_platform}/libstdc++-v3/scripts/testsuite_flags
+ANNOBIN_CFLAGS1="%build_cflags -I %{_builddir}/gcc-%{version}-%{DATE}/gcc"
+ANNOBIN_CFLAGS1="$ANNOBIN_CFLAGS1 -I %{_builddir}/gcc-%{version}-%{DATE}/obj-%{gcc_target_platform}/gcc"
+ANNOBIN_CFLAGS2="-I %{_builddir}/gcc-%{version}-%{DATE}/include -I %{_builddir}/gcc-%{version}-%{DATE}/libcpp/include"
+ANNOBIN_LDFLAGS="%build_ldflags -L%{_builddir}/gcc-%{version}-%{DATE}/obj-%{gcc_target_platform}/%{gcc_target_platform}/libstdc++-v3/src/.libs"
+CC="`$ANNOBIN_FLAGS --build-cc`" CXX="`$ANNOBIN_FLAGS --build-cxx`" \
+ CFLAGS="$ANNOBIN_CFLAGS1 $ANNOBIN_CFLAGS2 $ANNOBIN_LDFLAGS" \
+ CXXFLAGS="$ANNOBIN_CFLAGS1 `$ANNOBIN_FLAGS --build-includes` $ANNOBIN_CFLAGS2 $ANNOBIN_LDFLAGS" \
+ ./configure --with-gcc-plugin-dir=%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin \
+ --without-annocheck --without-tests --without-docs --disable-rpath --without-debuginfod \
+ --without-clang-plugin --without-llvm-plugin
+make
+cd ../..
+%endif
+
%install
rm -rf %{buildroot}
+mkdir -p %{buildroot}
+
+# RISC-V ABI wants to install everything in /lib64/lp64d or /usr/lib64/lp64d.
+# Make these be symlinks to /lib64 or /usr/lib64 respectively. See:
+# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/DRHT5YTPK4WWVGL3GIN5BF2IKX2ODHZ3/
+%ifarch riscv64
+for d in %{buildroot}%{_libdir} %{buildroot}/%{_lib} \
+ %{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib} \
+ %{buildroot}%{_prefix}/include/c++/%{gcc_major}/%{gcc_target_platform}/%{_lib}; do
+ mkdir -p $d
+ (cd $d && ln -sf . lp64d)
+done
+%endif
%if %{build_offload_nvptx}
cd nvptx-tools-%{nvptx_tools_gitrev}
@@ -1169,11 +1550,12 @@ cd obj-%{gcc_target_platform}
make install prefix=%{buildroot}%{_prefix}
cd ../..
-ln -sf nvptx-newlib-%{nvptx_newlib_gitrev}/newlib newlib
+ln -sf newlib-cygwin-%{newlib_cygwin_gitrev}/newlib newlib
cd obj-offload-nvptx-none
make prefix=%{buildroot}%{_prefix} mandir=%{buildroot}%{_mandir} \
infodir=%{buildroot}%{_infodir} install
rm -rf %{buildroot}%{_prefix}/libexec/gcc/nvptx-none/%{gcc_major}/install-tools
+rm -rf %{buildroot}%{_prefix}/libexec/gcc/nvptx-none/%{gcc_major}/g++-mapper-server
rm -rf %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/accel/nvptx-none/{install-tools,plugin,cc1,cc1plus,f951}
rm -rf %{buildroot}%{_infodir} %{buildroot}%{_mandir}/man7 %{buildroot}%{_prefix}/share/locale
rm -rf %{buildroot}%{_prefix}/lib/gcc/nvptx-none/%{gcc_major}/{install-tools,plugin}
@@ -1189,6 +1571,44 @@ cd ..
rm -f newlib
%endif
+%if %{build_offload_amdgcn}
+mkdir -p %{buildroot}%{_prefix}/bin %{buildroot}%{_prefix}/amdgcn-amdhsa/bin
+ln -sf llvm-ar %{buildroot}%{_prefix}/bin/amdgcn-amdhsa-ar
+ln -sf llvm-ar %{buildroot}%{_prefix}/bin/amdgcn-amdhsa-ranlib
+ln -sf llvm-mc %{buildroot}%{_prefix}/bin/amdgcn-amdhsa-as
+ln -sf llvm-nm %{buildroot}%{_prefix}/bin/amdgcn-amdhsa-nm
+ln -sf lld %{buildroot}%{_prefix}/bin/amdgcn-amdhsa-ld
+ln -sf ../../bin/amdgcn-amdhsa-ar %{buildroot}%{_prefix}/amdgcn-amdhsa/bin/ar
+ln -sf ../../bin/amdgcn-amdhsa-ranlib %{buildroot}%{_prefix}/amdgcn-amdhsa/bin/ranlib
+ln -sf ../../bin/amdgcn-amdhsa-as %{buildroot}%{_prefix}/amdgcn-amdhsa/bin/as
+ln -sf ../../bin/amdgcn-amdhsa-nm %{buildroot}%{_prefix}/amdgcn-amdhsa/bin/nm
+ln -sf ../../bin/amdgcn-amdhsa-ld %{buildroot}%{_prefix}/amdgcn-amdhsa/bin/ld
+
+ln -sf newlib-cygwin-%{newlib_cygwin_gitrev}/newlib newlib
+cd obj-offload-amdgcn-amdhsa
+make prefix=%{buildroot}%{_prefix} mandir=%{buildroot}%{_mandir} \
+ infodir=%{buildroot}%{_infodir} install
+rm -rf %{buildroot}%{_prefix}/libexec/gcc/amdgcn-amdhsa/%{gcc_major}/install-tools
+rm -rf %{buildroot}%{_prefix}/libexec/gcc/amdgcn-amdhsa/%{gcc_major}/g++-mapper-server
+rm -rf %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/accel/amdgcn-amdhsa/{install-tools,plugin,cc1,cc1plus,f951}
+rm -rf %{buildroot}%{_infodir} %{buildroot}%{_mandir}/man7 %{buildroot}%{_prefix}/share/locale
+rm -rf %{buildroot}%{_prefix}/lib/gcc/amdgcn-amdhsa/%{gcc_major}/{install-tools,plugin}
+rm -rf %{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/accel/amdgcn-amdhsa/{install-tools,plugin,include-fixed}
+rm -rf %{buildroot}%{_prefix}/%{_lib}/libc[cp]1*
+mv -f %{buildroot}%{_prefix}/amdgcn-amdhsa/lib/*.{a,spec} %{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/accel/amdgcn-amdhsa/
+mv -f %{buildroot}%{_prefix}/lib/gcc/amdgcn-amdhsa/%{gcc_major}/*.a %{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/accel/amdgcn-amdhsa/
+pushd %{buildroot}%{_prefix}/amdgcn-amdhsa/lib
+for i in gfx*; do
+mv -f %{buildroot}%{_prefix}/amdgcn-amdhsa/lib/$i/*.{a,spec} %{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/accel/amdgcn-amdhsa/$i/
+mv -f %{buildroot}%{_prefix}/lib/gcc/amdgcn-amdhsa/%{gcc_major}/$i/*.a %{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/accel/amdgcn-amdhsa/$i/
+done
+popd
+find %{buildroot}%{_prefix}/lib/gcc/amdgcn-amdhsa %{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/accel/amdgcn-amdhsa \
+ %{buildroot}%{_prefix}/amdgcn-amdhsa/lib -name \*.la | xargs rm
+cd ..
+rm -f newlib
+%endif
+
cd obj-%{gcc_target_platform}
TARGET_PLATFORM=%{gcc_target_platform}
@@ -1205,6 +1625,10 @@ chmod 644 %{buildroot}%{_infodir}/gnat*
FULLPATH=%{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}
FULLEPATH=%{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}
+%if %{build_isl}
+cp -a isl-install/lib/libisl.so.23 $FULLPATH/
+%endif
+
# fix some things
ln -sf gcc %{buildroot}%{_prefix}/bin/cc
rm -f %{buildroot}%{_prefix}/lib/cpp
@@ -1212,7 +1636,9 @@ ln -sf ../bin/cpp %{buildroot}/%{_prefix}/lib/cpp
ln -sf gfortran %{buildroot}%{_prefix}/bin/f95
rm -f %{buildroot}%{_infodir}/dir
gzip -9 %{buildroot}%{_infodir}/*.info*
+%if %{build_ada}
ln -sf gcc %{buildroot}%{_prefix}/bin/gnatgcc
+%endif
mkdir -p %{buildroot}%{_fmoddir}
%if %{build_go}
@@ -1257,12 +1683,10 @@ for f in `find %{buildroot}%{_prefix}/include/c++/%{gcc_major}/%{gcc_target_plat
done
# Nuke bits/*.h.gch dirs
-# 1) there is no bits/*.h header installed, so when gch file can't be
-# used, compilation fails
-# 2) sometimes it is hard to match the exact options used for building
+# 1) sometimes it is hard to match the exact options used for building
# libstdc++-v3 or they aren't desirable
-# 3) there are multilib issues, conflicts etc. with this
-# 4) it is huge
+# 2) there are multilib issues, conflicts etc. with this
+# 3) it is huge
# People can always precompile on their own whatever they want, but
# shipping this for everybody is unnecessary.
rm -rf %{buildroot}%{_prefix}/include/c++/%{gcc_major}/%{gcc_target_platform}/bits/*.h.gch
@@ -1274,7 +1698,7 @@ cp -r -p ../libstdc++-v3/doc/html ../rpm.doc/libstdc++-v3/html
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
+find ../rpm.doc/libstdc++-v3 -name \*~ -o -name \*.orig | xargs rm -f
%endif
%ifarch sparcv9 sparc64
@@ -1303,50 +1727,74 @@ fi
find %{buildroot} -name \*.la | xargs rm -f
mv %{buildroot}%{_prefix}/%{_lib}/libgfortran.spec $FULLPATH/
+%if %{build_d}
+mv %{buildroot}%{_prefix}/%{_lib}/libgphobos.spec $FULLPATH/
+%endif
%if %{build_libitm}
mv %{buildroot}%{_prefix}/%{_lib}/libitm.spec $FULLPATH/
%endif
%if %{build_libasan}
mv %{buildroot}%{_prefix}/%{_lib}/libsanitizer.spec $FULLPATH/
%endif
-%if %{build_libmpx}
-mv %{buildroot}%{_prefix}/%{_lib}/libmpx.spec $FULLPATH/
+%if %{build_cobol}
+mv %{buildroot}%{_prefix}/%{_lib}/libgcobol.spec $FULLPATH/
+%endif
+%if %{build_algol68}
+mv %{buildroot}%{_prefix}/%{_lib}/libga68.spec $FULLPATH/
%endif
mkdir -p %{buildroot}/%{_lib}
mv -f %{buildroot}%{_prefix}/%{_lib}/libgcc_s.so.1 %{buildroot}/%{_lib}/libgcc_s-%{gcc_major}-%{DATE}.so.1
chmod 755 %{buildroot}/%{_lib}/libgcc_s-%{gcc_major}-%{DATE}.so.1
ln -sf libgcc_s-%{gcc_major}-%{DATE}.so.1 %{buildroot}/%{_lib}/libgcc_s.so.1
+%ifarch %{ix86} x86_64 ppc ppc64 ppc64p7 ppc64le %{arm} aarch64 riscv64
+rm -f $FULLPATH/libgcc_s.so
+echo '/* GNU ld script
+ Use the shared library, but some functions are only in
+ the static library, so try that secondarily. */
+OUTPUT_FORMAT('`gcc -Wl,--print-output-format -nostdlib -r -o /dev/null`')
+GROUP ( /%{_lib}/libgcc_s.so.1 libgcc.a )' > $FULLPATH/libgcc_s.so
+%else
ln -sf /%{_lib}/libgcc_s.so.1 $FULLPATH/libgcc_s.so
+%endif
+rm -f $FULLPATH/libgcc_s_asneeded.so
+echo '/* GNU ld script
+ Add DT_NEEDED entry for libgcc_s.so only if needed. */
+OUTPUT_FORMAT('`gcc -Wl,--print-output-format -nostdlib -r -o /dev/null`')
+INPUT ( AS_NEEDED ( -lgcc_s ) )' > $FULLPATH/libgcc_s_asneeded.so
%ifarch sparcv9 ppc
+%ifarch ppc
+rm -f $FULLPATH/64/libgcc_s.so
+echo '/* GNU ld script
+ Use the shared library, but some functions are only in
+ the static library, so try that secondarily. */
+OUTPUT_FORMAT('`gcc -m64 -Wl,--print-output-format -nostdlib -r -o /dev/null`')
+GROUP ( /lib64/libgcc_s.so.1 libgcc.a )' > $FULLPATH/64/libgcc_s.so
+%else
ln -sf /lib64/libgcc_s.so.1 $FULLPATH/64/libgcc_s.so
%endif
+rm -f $FULLPATH/64/libgcc_s_asneeded.so
+echo '/* GNU ld script
+ Add DT_NEEDED entry for libgcc_s.so only if needed. */
+OUTPUT_FORMAT('`gcc -m64 -Wl,--print-output-format -nostdlib -r -o /dev/null`')
+INPUT ( AS_NEEDED ( -lgcc_s ) )' > $FULLPATH/64/libgcc_s_asneeded.so
+%endif
%ifarch %{multilib_64_archs}
+%ifarch x86_64 ppc64 ppc64p7
+rm -f $FULLPATH/64/libgcc_s.so
+echo '/* GNU ld script
+ Use the shared library, but some functions are only in
+ the static library, so try that secondarily. */
+OUTPUT_FORMAT('`gcc -m32 -Wl,--print-output-format -nostdlib -r -o /dev/null`')
+GROUP ( /lib/libgcc_s.so.1 libgcc.a )' > $FULLPATH/32/libgcc_s.so
+%else
ln -sf /lib/libgcc_s.so.1 $FULLPATH/32/libgcc_s.so
%endif
-%ifarch ppc
-rm -f $FULLPATH/libgcc_s.so
+rm -f $FULLPATH/32/libgcc_s_asneeded.so
echo '/* GNU ld script
- Use the shared library, but some functions are only in
- the static library, so try that secondarily. */
-OUTPUT_FORMAT(elf32-powerpc)
-GROUP ( /lib/libgcc_s.so.1 libgcc.a )' > $FULLPATH/libgcc_s.so
-%endif
-%ifarch ppc64 ppc64p7
-rm -f $FULLPATH/32/libgcc_s.so
-echo '/* GNU ld script
- Use the shared library, but some functions are only in
- the static library, so try that secondarily. */
-OUTPUT_FORMAT(elf32-powerpc)
-GROUP ( /lib/libgcc_s.so.1 libgcc.a )' > $FULLPATH/32/libgcc_s.so
-%endif
-%ifarch %{arm}
-rm -f $FULLPATH/libgcc_s.so
-echo '/* GNU ld script
- Use the shared library, but some functions are only in
- the static library, so try that secondarily. */
-OUTPUT_FORMAT(elf32-littlearm)
-GROUP ( /lib/libgcc_s.so.1 libgcc.a )' > $FULLPATH/libgcc_s.so
+ Add DT_NEEDED entry for libgcc_s.so only if needed. */
+OUTPUT_FORMAT('`gcc -m32 -Wl,--print-output-format -nostdlib -r -o /dev/null`')
+INPUT ( AS_NEEDED ( -lgcc_s ) )' > $FULLPATH/32/libgcc_s_asneeded.so
%endif
mv -f %{buildroot}%{_prefix}/%{_lib}/libgomp.spec $FULLPATH/
@@ -1367,18 +1815,8 @@ fi
mkdir -p %{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}
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
-done
-touch -r hook.in %{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
- r=${f/$RPM_BUILD_ROOT/}
- %{__python3} -c 'import py_compile; py_compile.compile("'$f'", dfile="'$r'")'
- %{__python3} -O -c 'import py_compile; py_compile.compile("'$f'", dfile="'$r'")'
-done
+%py_byte_compile %{python3} %{buildroot}%{_prefix}/share/gcc-%{gcc_major}/python/
+%py_byte_compile %{python3} %{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/
rm -f $FULLEPATH/libgccjit.so
cp -a objlibgccjit/gcc/libgccjit.so* %{buildroot}%{_prefix}/%{_lib}/
@@ -1386,6 +1824,15 @@ cp -a ../gcc/jit/libgccjit*.h %{buildroot}%{_prefix}/include/
/usr/bin/install -c -m 644 objlibgccjit/gcc/doc/libgccjit.info %{buildroot}/%{_infodir}/
gzip -9 %{buildroot}/%{_infodir}/libgccjit.info
+rm -f $FULLEPATH/libgdiagnostics.so
+cp -a objlibgccjit/gcc/libgdiagnostics.so* %{buildroot}%{_prefix}/%{_lib}/
+cp -a ../gcc/libgdiagnostics*.h %{buildroot}%{_prefix}/include/
+cp -a objlibgccjit/gcc/sarif-replay %{buildroot}%{_prefix}/bin/
+
+sed -e 's,\.\./include/,../../../../include/,' \
+ %{buildroot}%{_prefix}/%{_lib}/libstdc++.modules.json \
+ > $FULLPATH/libstdc++.modules.json
+
pushd $FULLPATH
if [ "%{_lib}" = "lib" ]; then
%if %{build_objc}
@@ -1395,28 +1842,45 @@ ln -sf ../../../libstdc++.so.6.*[0-9] libstdc++.so
ln -sf ../../../libgfortran.so.5.* libgfortran.so
ln -sf ../../../libgomp.so.1.* libgomp.so
%if %{build_go}
-ln -sf ../../../libgo.so.13.* libgo.so
+ln -sf ../../../libgo.so.25.* libgo.so
%endif
%if %{build_libquadmath}
ln -sf ../../../libquadmath.so.0.* libquadmath.so
%endif
+%if %{build_d}
+ln -sf ../../../libgdruntime.so.6.* libgdruntime.so
+ln -sf ../../../libgphobos.so.6.* libgphobos.so
+%endif
+%if %{build_m2}
+for i in cor iso log min pim; do
+ ln -sf ../../../libm2$i.so.21.* libm2$i.so
+done
+%endif
+%if %{build_cobol}
+ln -sf ../../../libgcobol.so.2.* libgcobol.so
+%endif
+%if %{build_algol68}
+ln -sf ../../../libga68.so.2.* libga68.so
+%endif
%if %{build_libitm}
ln -sf ../../../libitm.so.1.* libitm.so
%endif
%if %{build_libatomic}
ln -sf ../../../libatomic.so.1.* libatomic.so
+rm -f libatomic_asneeded.so libatomic_asneeded.a
+echo '/* GNU ld script
+ Add DT_NEEDED entry for -latomic only if needed. */
+OUTPUT_FORMAT('`gcc -Wl,--print-output-format -nostdlib -r -o /dev/null`')
+INPUT ( AS_NEEDED ( -latomic ) )' > libatomic_asneeded.so
+ln -sf libatomic.a libatomic_asneeded.a
%endif
%if %{build_libasan}
-ln -sf ../../../libasan.so.5.* libasan.so
+ln -sf ../../../libasan.so.8.* libasan.so
mv ../../../libasan_preinit.o libasan_preinit.o
%endif
%if %{build_libubsan}
ln -sf ../../../libubsan.so.1.* libubsan.so
%endif
-%if %{build_libmpx}
-ln -sf ../../../libmpx.so.2.* libmpx.so
-ln -sf ../../../libmpxwrappers.so.2.* libmpxwrappers.so
-%endif
else
%if %{build_objc}
ln -sf ../../../../%{_lib}/libobjc.so.4 libobjc.so
@@ -1425,33 +1889,55 @@ ln -sf ../../../../%{_lib}/libstdc++.so.6.*[0-9] libstdc++.so
ln -sf ../../../../%{_lib}/libgfortran.so.5.* libgfortran.so
ln -sf ../../../../%{_lib}/libgomp.so.1.* libgomp.so
%if %{build_go}
-ln -sf ../../../../%{_lib}/libgo.so.13.* libgo.so
+ln -sf ../../../../%{_lib}/libgo.so.25.* libgo.so
%endif
%if %{build_libquadmath}
ln -sf ../../../../%{_lib}/libquadmath.so.0.* libquadmath.so
%endif
+%if %{build_d}
+ln -sf ../../../../%{_lib}/libgdruntime.so.6.* libgdruntime.so
+ln -sf ../../../../%{_lib}/libgphobos.so.6.* libgphobos.so
+%endif
+%if %{build_m2}
+for i in cor iso log min pim; do
+ ln -sf ../../../../%{_lib}/libm2$i.so.21.* libm2$i.so
+done
+%endif
+%if %{build_cobol}
+ln -sf ../../../../%{_lib}/libgcobol.so.2.* libgcobol.so
+%endif
+%if %{build_algol68}
+ln -sf ../../../../%{_lib}/libga68.so.2.* libga68.so
+%endif
%if %{build_libitm}
ln -sf ../../../../%{_lib}/libitm.so.1.* libitm.so
%endif
%if %{build_libatomic}
ln -sf ../../../../%{_lib}/libatomic.so.1.* libatomic.so
+rm -f libatomic_asneeded.so libatomic_asneeded.a
+echo '/* GNU ld script
+ Add DT_NEEDED entry for -latomic only if needed. */
+OUTPUT_FORMAT('`gcc -Wl,--print-output-format -nostdlib -r -o /dev/null`')
+INPUT ( AS_NEEDED ( -latomic ) )' > libatomic_asneeded.so
+ln -sf libatomic.a libatomic_asneeded.a
%endif
%if %{build_libasan}
-ln -sf ../../../../%{_lib}/libasan.so.5.* libasan.so
+ln -sf ../../../../%{_lib}/libasan.so.8.* libasan.so
mv ../../../../%{_lib}/libasan_preinit.o libasan_preinit.o
%endif
%if %{build_libubsan}
ln -sf ../../../../%{_lib}/libubsan.so.1.* libubsan.so
%endif
-%if %{build_libmpx}
-ln -sf ../../../../%{_lib}/libmpx.so.2.* libmpx.so
-ln -sf ../../../../%{_lib}/libmpxwrappers.so.2.* libmpxwrappers.so
-%endif
%if %{build_libtsan}
rm -f libtsan.so
-echo 'INPUT ( %{_prefix}/%{_lib}/'`echo ../../../../%{_lib}/libtsan.so.0.* | sed 's,^.*libt,libt,'`' )' > libtsan.so
+echo 'INPUT ( %{_prefix}/%{_lib}/'`echo ../../../../%{_lib}/libtsan.so.2.* | sed 's,^.*libt,libt,'`' )' > libtsan.so
mv ../../../../%{_lib}/libtsan_preinit.o libtsan_preinit.o
%endif
+%if %{build_libhwasan}
+rm -f libhwasan.so
+echo 'INPUT ( %{_prefix}/%{_lib}/'`echo ../../../../%{_lib}/libhwasan.so.0.* | sed 's,^.*libh,libh,'`' )' > libhwasan.so
+mv ../../../../%{_lib}/libhwasan_preinit.o libhwasan_preinit.o
+%endif
%if %{build_liblsan}
rm -f liblsan.so
echo 'INPUT ( %{_prefix}/%{_lib}/'`echo ../../../../%{_lib}/liblsan.so.0.* | sed 's,^.*libl,libl,'`' )' > liblsan.so
@@ -1460,6 +1946,7 @@ mv ../../../../%{_lib}/liblsan_preinit.o liblsan_preinit.o
fi
mv -f %{buildroot}%{_prefix}/%{_lib}/libstdc++.*a $FULLLPATH/
mv -f %{buildroot}%{_prefix}/%{_lib}/libstdc++fs.*a $FULLLPATH/
+mv -f %{buildroot}%{_prefix}/%{_lib}/libstdc++exp.*a $FULLLPATH/
mv -f %{buildroot}%{_prefix}/%{_lib}/libsupc++.*a $FULLLPATH/
mv -f %{buildroot}%{_prefix}/%{_lib}/libgfortran.*a $FULLLPATH/
%if %{build_objc}
@@ -1469,11 +1956,29 @@ mv -f %{buildroot}%{_prefix}/%{_lib}/libgomp.*a .
%if %{build_libquadmath}
mv -f %{buildroot}%{_prefix}/%{_lib}/libquadmath.*a $FULLLPATH/
%endif
+%if %{build_d}
+mv -f %{buildroot}%{_prefix}/%{_lib}/libgdruntime.*a $FULLLPATH/
+mv -f %{buildroot}%{_prefix}/%{_lib}/libgphobos.*a $FULLLPATH/
+%endif
+%if %{build_m2}
+for i in cor iso log min pim; do
+ mv -f %{buildroot}%{_prefix}/%{_lib}/libm2$i.*a $FULLLPATH/
+ rm -f m2/m2$i/*.{a,la}
+ ln -sf ../../libm2$i.so m2/m2$i/
+ ln -sf ../../libm2$i.a m2/m2$i/
+done
+%endif
+%if %{build_cobol}
+mv -f %{buildroot}%{_prefix}/%{_lib}/libgcobol.*a $FULLLPATH/
+%endif
+%if %{build_algol68}
+mv -f %{buildroot}%{_prefix}/%{_lib}/libga68.*a $FULLLPATH/
+%endif
%if %{build_libitm}
mv -f %{buildroot}%{_prefix}/%{_lib}/libitm.*a $FULLLPATH/
%endif
%if %{build_libatomic}
-mv -f %{buildroot}%{_prefix}/%{_lib}/libatomic.*a $FULLLPATH/
+mv -f %{buildroot}%{_prefix}/%{_lib}/libatomic.*a $FULLPATH/
%endif
%if %{build_libasan}
mv -f %{buildroot}%{_prefix}/%{_lib}/libasan.*a $FULLLPATH/
@@ -1481,13 +1986,12 @@ mv -f %{buildroot}%{_prefix}/%{_lib}/libasan.*a $FULLLPATH/
%if %{build_libubsan}
mv -f %{buildroot}%{_prefix}/%{_lib}/libubsan.*a $FULLLPATH/
%endif
-%if %{build_libmpx}
-mv -f %{buildroot}%{_prefix}/%{_lib}/libmpx.*a $FULLLPATH/
-mv -f %{buildroot}%{_prefix}/%{_lib}/libmpxwrappers.*a $FULLLPATH/
-%endif
%if %{build_libtsan}
mv -f %{buildroot}%{_prefix}/%{_lib}/libtsan.*a $FULLPATH/
%endif
+%if %{build_libhwasan}
+mv -f %{buildroot}%{_prefix}/%{_lib}/libhwasan.*a $FULLPATH/
+%endif
%if %{build_liblsan}
mv -f %{buildroot}%{_prefix}/%{_lib}/liblsan.*a $FULLPATH/
%endif
@@ -1509,28 +2013,28 @@ mv -f $FULLPATH/ada{include,lib} $FULLLPATH/
pushd $FULLLPATH/adalib
if [ "%{_lib}" = "lib" ]; then
ln -sf ../../../../../libgnarl-*.so libgnarl.so
-ln -sf ../../../../../libgnarl-*.so libgnarl-8.so
+ln -sf ../../../../../libgnarl-*.so libgnarl-%{gcc_major}.so
ln -sf ../../../../../libgnat-*.so libgnat.so
-ln -sf ../../../../../libgnat-*.so libgnat-8.so
+ln -sf ../../../../../libgnat-*.so libgnat-%{gcc_major}.so
else
ln -sf ../../../../../../%{_lib}/libgnarl-*.so libgnarl.so
-ln -sf ../../../../../../%{_lib}/libgnarl-*.so libgnarl-8.so
+ln -sf ../../../../../../%{_lib}/libgnarl-*.so libgnarl-%{gcc_major}.so
ln -sf ../../../../../../%{_lib}/libgnat-*.so libgnat.so
-ln -sf ../../../../../../%{_lib}/libgnat-*.so libgnat-8.so
+ln -sf ../../../../../../%{_lib}/libgnat-*.so libgnat-%{gcc_major}.so
fi
popd
else
pushd $FULLPATH/adalib
if [ "%{_lib}" = "lib" ]; then
ln -sf ../../../../libgnarl-*.so libgnarl.so
-ln -sf ../../../../libgnarl-*.so libgnarl-8.so
+ln -sf ../../../../libgnarl-*.so libgnarl-%{gcc_major}.so
ln -sf ../../../../libgnat-*.so libgnat.so
-ln -sf ../../../../libgnat-*.so libgnat-8.so
+ln -sf ../../../../libgnat-*.so libgnat-%{gcc_major}.so
else
ln -sf ../../../../../%{_lib}/libgnarl-*.so libgnarl.so
-ln -sf ../../../../../%{_lib}/libgnarl-*.so libgnarl-8.so
+ln -sf ../../../../../%{_lib}/libgnarl-*.so libgnarl-%{gcc_major}.so
ln -sf ../../../../../%{_lib}/libgnat-*.so libgnat.so
-ln -sf ../../../../../%{_lib}/libgnat-*.so libgnat-8.so
+ln -sf ../../../../../%{_lib}/libgnat-*.so libgnat-%{gcc_major}.so
fi
popd
fi
@@ -1545,14 +2049,41 @@ ln -sf ../`echo ../../../../lib/libgfortran.so.5.* | sed s~/lib/~/lib64/~` 64/li
ln -sf ../`echo ../../../../lib/libgomp.so.1.* | sed s~/lib/~/lib64/~` 64/libgomp.so
%if %{build_go}
rm -f libgo.so
-echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libgo.so.13.* | sed 's,^.*libg,libg,'`' )' > libgo.so
-echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgo.so.13.* | sed 's,^.*libg,libg,'`' )' > 64/libgo.so
+echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libgo.so.25.* | sed 's,^.*libg,libg,'`' )' > libgo.so
+echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgo.so.25.* | sed 's,^.*libg,libg,'`' )' > 64/libgo.so
%endif
%if %{build_libquadmath}
rm -f libquadmath.so
echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libquadmath.so.0.* | sed 's,^.*libq,libq,'`' )' > libquadmath.so
echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libquadmath.so.0.* | sed 's,^.*libq,libq,'`' )' > 64/libquadmath.so
%endif
+%if %{build_d}
+rm -f libgdruntime.so libgphobos.so
+echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libgdruntime.so.6.* | sed 's,^.*libg,libg,'`' )' > libgdruntime.so
+echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgdruntime.so.6.* | sed 's,^.*libg,libg,'`' )' > 64/libgdruntime.so
+echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libgphobos.so.6.* | sed 's,^.*libg,libg,'`' )' > libgphobos.so
+echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgphobos.so.6.* | sed 's,^.*libg,libg,'`' )' > 64/libgphobos.so
+%endif
+%if %{build_m2}
+for i in cor iso log min pim; do
+ rm -f libm2$i.so
+ echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libm2$i.so.21.* | sed 's,^.*libm,libm,'`' )' > libm2$i.so
+ echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libm2$i.so.21.* | sed 's,^.*libm,libm,'`' )' > 64/libm2$i.so
+ rm -f 64/m2/m2$i/*.{a,la}
+ ln -sf ../../libm2$i.so 64/m2/m2$i/
+ ln -sf ../../libm2$i.a 64/m2/m2$i/
+done
+%endif
+%if %{build_cobol}
+rm -f libgcobol.so
+echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libgcobol.so.2.* | sed 's,^.*libg,libg,'`' )' > libgcobol.so
+echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libgcobol.so.2.* | sed 's,^.*libg,libg,'`' )' > 64/libgcobol.so
+%endif
+%if %{build_algol68}
+rm -f libga68.so
+echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libga68.so.2.* | sed 's,^.*libg,libg,'`' )' > libga68.so
+echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libga68.so.2.* | sed 's,^.*libg,libg,'`' )' > 64/libga68.so
+%endif
%if %{build_libitm}
rm -f libitm.so
echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libitm.so.1.* | sed 's,^.*libi,libi,'`' )' > libitm.so
@@ -1562,11 +2093,23 @@ echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libitm.so.1.* | sed 's,^.*
rm -f libatomic.so
echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libatomic.so.1.* | sed 's,^.*liba,liba,'`' )' > libatomic.so
echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libatomic.so.1.* | sed 's,^.*liba,liba,'`' )' > 64/libatomic.so
+mv -f %{buildroot}%{_prefix}/lib64/libatomic.*a 64/
+rm -f libatomic_asneeded.so libatomic_asneeded.a 64/libatomic_asneeded.so 64/libatomic_asneeded.a
+echo '/* GNU ld script
+ Add DT_NEEDED entry for -latomic only if needed. */
+OUTPUT_FORMAT('`gcc -Wl,--print-output-format -nostdlib -r -o /dev/null`')
+INPUT ( AS_NEEDED ( -latomic ) )' > libatomic_asneeded.so
+ln -sf libatomic.a libatomic_asneeded.a
+echo '/* GNU ld script
+ Add DT_NEEDED entry for -latomic only if needed. */
+OUTPUT_FORMAT('`gcc -m64 -Wl,--print-output-format -nostdlib -r -o /dev/null`')
+INPUT ( AS_NEEDED ( -latomic ) )' > 64/libatomic_asneeded.so
+ln -sf libatomic.a 64/libatomic_asneeded.a
%endif
%if %{build_libasan}
rm -f libasan.so
-echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libasan.so.5.* | sed 's,^.*liba,liba,'`' )' > libasan.so
-echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libasan.so.5.* | sed 's,^.*liba,liba,'`' )' > 64/libasan.so
+echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libasan.so.8.* | sed 's,^.*liba,liba,'`' )' > libasan.so
+echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libasan.so.8.* | sed 's,^.*liba,liba,'`' )' > 64/libasan.so
mv ../../../../lib64/libasan_preinit.o 64/libasan_preinit.o
%endif
%if %{build_libubsan}
@@ -1574,14 +2117,6 @@ rm -f libubsan.so
echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libubsan.so.1.* | sed 's,^.*libu,libu,'`' )' > libubsan.so
echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libubsan.so.1.* | sed 's,^.*libu,libu,'`' )' > 64/libubsan.so
%endif
-%if %{build_libmpx}
-rm -f libmpx.so
-echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libmpx.so.2.* | sed 's,^.*libm,libm,'`' )' > libmpx.so
-echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libmpx.so.2.* | sed 's,^.*libm,libm,'`' )' > 64/libmpx.so
-rm -f libmpxwrappers.so
-echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib/libmpxwrappers.so.2.* | sed 's,^.*libm,libm,'`' )' > libmpxwrappers.so
-echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib/libmpxwrappers.so.2.* | sed 's,^.*libm,libm,'`' )' > 64/libmpxwrappers.so
-%endif
ln -sf lib32/libgfortran.a libgfortran.a
ln -sf ../lib64/libgfortran.a 64/libgfortran.a
%if %{build_objc}
@@ -1592,20 +2127,38 @@ ln -sf lib32/libstdc++.a libstdc++.a
ln -sf ../lib64/libstdc++.a 64/libstdc++.a
ln -sf lib32/libstdc++fs.a libstdc++fs.a
ln -sf ../lib64/libstdc++fs.a 64/libstdc++fs.a
+ln -sf lib32/libstdc++exp.a libstdc++exp.a
+ln -sf ../lib64/libstdc++exp.a 64/libstdc++exp.a
ln -sf lib32/libsupc++.a libsupc++.a
ln -sf ../lib64/libsupc++.a 64/libsupc++.a
%if %{build_libquadmath}
ln -sf lib32/libquadmath.a libquadmath.a
ln -sf ../lib64/libquadmath.a 64/libquadmath.a
%endif
+%if %{build_d}
+ln -sf lib32/libgdruntime.a libgdruntime.a
+ln -sf ../lib64/libgdruntime.a 64/libgdruntime.a
+ln -sf lib32/libgphobos.a libgphobos.a
+ln -sf ../lib64/libgphobos.a 64/libgphobos.a
+%endif
+%if %{build_m2}
+for i in cor iso log min pim; do
+ ln -sf lib32/libm2$i.a libm2$i.a
+ ln -sf ../lib64/libm2$i.a 64/libm2$i.a
+done
+%endif
+%if %{build_cobol}
+ln -sf lib32/libgcobol.a libgcobol.a
+ln -sf ../lib64/libgcobol.a 64/libgcobol.a
+%endif
+%if %{build_algol68}
+ln -sf lib32/libga68.a libga68.a
+ln -sf ../lib64/libga68.a 64/libga68.a
+%endif
%if %{build_libitm}
ln -sf lib32/libitm.a libitm.a
ln -sf ../lib64/libitm.a 64/libitm.a
%endif
-%if %{build_libatomic}
-ln -sf lib32/libatomic.a libatomic.a
-ln -sf ../lib64/libatomic.a 64/libatomic.a
-%endif
%if %{build_libasan}
ln -sf lib32/libasan.a libasan.a
ln -sf ../lib64/libasan.a 64/libasan.a
@@ -1614,12 +2167,6 @@ ln -sf ../lib64/libasan.a 64/libasan.a
ln -sf lib32/libubsan.a libubsan.a
ln -sf ../lib64/libubsan.a 64/libubsan.a
%endif
-%if %{build_libmpx}
-ln -sf lib32/libmpx.a libmpx.a
-ln -sf ../lib64/libmpx.a 64/libmpx.a
-ln -sf lib32/libmpxwrappers.a libmpxwrappers.a
-ln -sf ../lib64/libmpxwrappers.a 64/libmpxwrappers.a
-%endif
%if %{build_go}
ln -sf lib32/libgo.a libgo.a
ln -sf ../lib64/libgo.a 64/libgo.a
@@ -1645,14 +2192,41 @@ ln -sf ../`echo ../../../../lib64/libgfortran.so.5.* | sed s~/../lib64/~/~` 32/l
ln -sf ../`echo ../../../../lib64/libgomp.so.1.* | sed s~/../lib64/~/~` 32/libgomp.so
%if %{build_go}
rm -f libgo.so
-echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgo.so.13.* | sed 's,^.*libg,libg,'`' )' > libgo.so
-echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgo.so.13.* | sed 's,^.*libg,libg,'`' )' > 32/libgo.so
+echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgo.so.25.* | sed 's,^.*libg,libg,'`' )' > libgo.so
+echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgo.so.25.* | sed 's,^.*libg,libg,'`' )' > 32/libgo.so
%endif
%if %{build_libquadmath}
rm -f libquadmath.so
echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libquadmath.so.0.* | sed 's,^.*libq,libq,'`' )' > libquadmath.so
echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libquadmath.so.0.* | sed 's,^.*libq,libq,'`' )' > 32/libquadmath.so
%endif
+%if %{build_d}
+rm -f libgdruntime.so libgphobos.so
+echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgdruntime.so.6.* | sed 's,^.*libg,libg,'`' )' > libgdruntime.so
+echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgdruntime.so.6.* | sed 's,^.*libg,libg,'`' )' > 32/libgdruntime.so
+echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgphobos.so.6.* | sed 's,^.*libg,libg,'`' )' > libgphobos.so
+echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgphobos.so.6.* | sed 's,^.*libg,libg,'`' )' > 32/libgphobos.so
+%endif
+%if %{build_m2}
+for i in cor iso log min pim; do
+ rm -f libm2$i.so
+ echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libm2$i.so.21.* | sed 's,^.*libm,libm,'`' )' > libm2$i.so
+ echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libm2$i.so.21.* | sed 's,^.*libm,libm,'`' )' > 32/libm2$i.so
+ rm -f 32/m2/m2$i/*.{a,la}
+ ln -sf ../../libm2$i.so 32/m2/m2$i/
+ ln -sf ../../libm2$i.a 32/m2/m2$i/
+done
+%endif
+%if %{build_cobol}
+rm -f libgcobol.so
+echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libgcobol.so.2.* | sed 's,^.*libg,libg,'`' )' > libgcobol.so
+#echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libgcobol.so.2.* | sed 's,^.*libg,libg,'`' )' > 32/libgcobol.so
+%endif
+%if %{build_algol68}
+rm -f libga68.so
+echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libga68.so.2.* | sed 's,^.*libg,libg,'`' )' > libga68.so
+echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libga68.so.2.* | sed 's,^.*libg,libg,'`' )' > 32/libga68.so
+%endif
%if %{build_libitm}
rm -f libitm.so
echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libitm.so.1.* | sed 's,^.*libi,libi,'`' )' > libitm.so
@@ -1662,11 +2236,23 @@ echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libitm.so.1.* | sed 's,^.*
rm -f libatomic.so
echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libatomic.so.1.* | sed 's,^.*liba,liba,'`' )' > libatomic.so
echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libatomic.so.1.* | sed 's,^.*liba,liba,'`' )' > 32/libatomic.so
+mv -f %{buildroot}%{_prefix}/lib/libatomic.*a 32/
+rm -f libatomic_asneeded.so libatomic_asneeded.a 32/libatomic_asneeded.so 32/libatomic_asneeded.a
+echo '/* GNU ld script
+ Add DT_NEEDED entry for -latomic only if needed. */
+OUTPUT_FORMAT('`gcc -Wl,--print-output-format -nostdlib -r -o /dev/null`')
+INPUT ( AS_NEEDED ( -latomic ) )' > libatomic_asneeded.so
+ln -sf libatomic.a libatomic_asneeded.a
+echo '/* GNU ld script
+ Add DT_NEEDED entry for -latomic only if needed. */
+OUTPUT_FORMAT('`gcc -m32 -Wl,--print-output-format -nostdlib -r -o /dev/null`')
+INPUT ( AS_NEEDED ( -latomic ) )' > 32/libatomic_asneeded.so
+ln -sf libatomic.a 32/libatomic_asneeded.a
%endif
%if %{build_libasan}
rm -f libasan.so
-echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libasan.so.5.* | sed 's,^.*liba,liba,'`' )' > libasan.so
-echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libasan.so.5.* | sed 's,^.*liba,liba,'`' )' > 32/libasan.so
+echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libasan.so.8.* | sed 's,^.*liba,liba,'`' )' > libasan.so
+echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libasan.so.8.* | sed 's,^.*liba,liba,'`' )' > 32/libasan.so
mv ../../../../lib/libasan_preinit.o 32/libasan_preinit.o
%endif
%if %{build_libubsan}
@@ -1674,14 +2260,6 @@ rm -f libubsan.so
echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libubsan.so.1.* | sed 's,^.*libu,libu,'`' )' > libubsan.so
echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libubsan.so.1.* | sed 's,^.*libu,libu,'`' )' > 32/libubsan.so
%endif
-%if %{build_libmpx}
-rm -f libmpx.so
-echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libmpx.so.2.* | sed 's,^.*libm,libm,'`' )' > libmpx.so
-echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libmpx.so.2.* | sed 's,^.*libm,libm,'`' )' > 32/libmpx.so
-rm -f libmpxwrappers.so
-echo 'INPUT ( %{_prefix}/lib64/'`echo ../../../../lib64/libmpxwrappers.so.2.* | sed 's,^.*libm,libm,'`' )' > libmpxwrappers.so
-echo 'INPUT ( %{_prefix}/lib/'`echo ../../../../lib64/libmpxwrappers.so.2.* | sed 's,^.*libm,libm,'`' )' > 32/libmpxwrappers.so
-%endif
%if %{build_objc}
mv -f %{buildroot}%{_prefix}/lib/libobjc.*a 32/
%endif
@@ -1694,20 +2272,38 @@ ln -sf ../lib32/libstdc++.a 32/libstdc++.a
ln -sf lib64/libstdc++.a libstdc++.a
ln -sf ../lib32/libstdc++fs.a 32/libstdc++fs.a
ln -sf lib64/libstdc++fs.a libstdc++fs.a
+ln -sf ../lib32/libstdc++exp.a 32/libstdc++exp.a
+ln -sf lib64/libstdc++exp.a libstdc++exp.a
ln -sf ../lib32/libsupc++.a 32/libsupc++.a
ln -sf lib64/libsupc++.a libsupc++.a
%if %{build_libquadmath}
ln -sf ../lib32/libquadmath.a 32/libquadmath.a
ln -sf lib64/libquadmath.a libquadmath.a
%endif
+%if %{build_d}
+ln -sf ../lib32/libgdruntime.a 32/libgdruntime.a
+ln -sf lib64/libgdruntime.a libgdruntime.a
+ln -sf ../lib32/libgphobos.a 32/libgphobos.a
+ln -sf lib64/libgphobos.a libgphobos.a
+%endif
+%if %{build_m2}
+for i in cor iso log min pim; do
+ ln -sf ../lib32/libm2$i.a 32/libm2$i.a
+ ln -sf lib64/libm2$i.a libm2$i.a
+done
+%endif
+%if %{build_cobol}
+ln -sf ../lib32/libgcobol.a 32/libgcobol.a
+ln -sf lib64/libgcobol.a libgcobol.a
+%endif
+%if %{build_algol68}
+ln -sf ../lib32/libga68.a 32/libga68.a
+ln -sf lib64/libga68.a libga68.a
+%endif
%if %{build_libitm}
ln -sf ../lib32/libitm.a 32/libitm.a
ln -sf lib64/libitm.a libitm.a
%endif
-%if %{build_libatomic}
-ln -sf ../lib32/libatomic.a 32/libatomic.a
-ln -sf lib64/libatomic.a libatomic.a
-%endif
%if %{build_libasan}
ln -sf ../lib32/libasan.a 32/libasan.a
ln -sf lib64/libasan.a libasan.a
@@ -1716,12 +2312,6 @@ ln -sf lib64/libasan.a libasan.a
ln -sf ../lib32/libubsan.a 32/libubsan.a
ln -sf lib64/libubsan.a libubsan.a
%endif
-%if %{build_libmpx}
-ln -sf ../lib32/libmpx.a 32/libmpx.a
-ln -sf lib64/libmpx.a libmpx.a
-ln -sf ../lib32/libmpxwrappers.a 32/libmpxwrappers.a
-ln -sf lib64/libmpxwrappers.a libmpxwrappers.a
-%endif
%if %{build_go}
ln -sf ../lib32/libgo.a 32/libgo.a
ln -sf lib64/libgo.a libgo.a
@@ -1741,26 +2331,35 @@ ln -sf lib64/adalib adalib
ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/libgfortran.a 32/libgfortran.a
ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/libstdc++.a 32/libstdc++.a
ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/libstdc++fs.a 32/libstdc++fs.a
+ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/libstdc++exp.a 32/libstdc++exp.a
ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/libsupc++.a 32/libsupc++.a
%if %{build_libquadmath}
ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/libquadmath.a 32/libquadmath.a
%endif
+%if %{build_d}
+ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/libgdruntime.a 32/libgdruntime.a
+ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/libgphobos.a 32/libgphobos.a
+%endif
+%if %{build_m2}
+for i in cor iso log min pim; do
+ ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/libm2$i.a 32/libm2$i.a
+done
+%endif
+%if %{build_cobol}
+#ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/libgcobol.a 32/libgcobol.a
+%endif
+%if %{build_algol68}
+ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/libga68.a 32/libga68.a
+%endif
%if %{build_libitm}
ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/libitm.a 32/libitm.a
%endif
-%if %{build_libatomic}
-ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/libatomic.a 32/libatomic.a
-%endif
%if %{build_libasan}
ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/libasan.a 32/libasan.a
%endif
%if %{build_libubsan}
ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/libubsan.a 32/libubsan.a
%endif
-%if %{build_libmpx}
-ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/libmpx.a 32/libmpx.a
-ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/libmpxwrappers.a 32/libmpxwrappers.a
-%endif
%if %{build_go}
ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/libgo.a 32/libgo.a
ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/libgobegin.a 32/libgobegin.a
@@ -1775,7 +2374,8 @@ ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}/%{gcc_major}/adalib
# If we are building a debug package then copy all of the static archives
# into the debug directory to keep them as unstripped copies.
-%if 0%{?_enable_debug_packages}
+# if 0%{?_enable_debug_packages}
+%if 0
for d in . $FULLLSUBDIR; do
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/$d
for f in `find $d -maxdepth 1 -a \
@@ -1786,10 +2386,10 @@ for d in . $FULLLSUBDIR; do
-o -name libgo.a -o -name libgobegin.a \
-o -name libgolibbegin.a -o -name libgomp.a \
-o -name libitm.a -o -name liblsan.a \
- -o -name libmpx.a -o -name libmpxwrappers.a \
- -o -name libobjc.a \
- -o -name libquadmath.a -o -name libstdc++.a \
- -o -name libstdc++fs.a -o -name libsupc++.a \
+ -o -name libobjc.a -o -name libgdruntime.a -o -name libgphobos.a \
+ -o -name libm2\*.a -o -name libquadmath.a -o -name libstdc++.a \
+ -o -name libstdc++fs.a -o -name libstdc++exp.a \
+ -o -name libsupc++.a -o -name libgcobol.a \
-o -name libtsan.a -o -name libubsan.a \) -a -type f`; do
cp -a $f $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/$d/
done
@@ -1799,10 +2399,11 @@ done
# Strip debug info from Fortran/ObjC/Java static libraries
strip -g `find . \( -name libgfortran.a -o -name libobjc.a -o -name libgomp.a \
-o -name libgcc.a -o -name libgcov.a -o -name libquadmath.a \
+ -o -name libgdruntime.a -o -name libgphobos.a -o -name libm2\*.a \
-o -name libitm.a -o -name libgo.a -o -name libcaf\*.a \
-o -name libatomic.a -o -name libasan.a -o -name libtsan.a \
- -o -name libubsan.a -o -name liblsan.a \
- -o -name libmpx.a -o -name libmpxwrappers.a -o -name libcc1.a \) \
+ -o -name libubsan.a -o -name liblsan.a -o -name libcc1.a \
+ -o -name libgcobol.a \) \
-a -type f`
popd
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgfortran.so.5.*
@@ -1811,6 +2412,21 @@ chmod 755 %{buildroot}%{_prefix}/%{_lib}/libcc1.so.0.*
%if %{build_libquadmath}
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libquadmath.so.0.*
%endif
+%if %{build_d}
+chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgdruntime.so.6.*
+chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgphobos.so.6.*
+%endif
+%if %{build_m2}
+for i in cor iso log min pim; do
+ chmod 755 %{buildroot}%{_prefix}/%{_lib}/libm2$i.so.21.*
+done
+%endif
+%if %{build_cobol}
+chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgcobol.so.2.*
+%endif
+%if %{build_algol68}
+chmod 755 %{buildroot}%{_prefix}/%{_lib}/libga68.so.2.*
+%endif
%if %{build_libitm}
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libitm.so.1.*
%endif
@@ -1818,24 +2434,23 @@ chmod 755 %{buildroot}%{_prefix}/%{_lib}/libitm.so.1.*
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libatomic.so.1.*
%endif
%if %{build_libasan}
-chmod 755 %{buildroot}%{_prefix}/%{_lib}/libasan.so.5.*
+chmod 755 %{buildroot}%{_prefix}/%{_lib}/libasan.so.8.*
%endif
%if %{build_libubsan}
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libubsan.so.1.*
%endif
-%if %{build_libmpx}
-chmod 755 %{buildroot}%{_prefix}/%{_lib}/libmpx.so.2.*
-chmod 755 %{buildroot}%{_prefix}/%{_lib}/libmpxwrappers.so.2.*
-%endif
%if %{build_libtsan}
-chmod 755 %{buildroot}%{_prefix}/%{_lib}/libtsan.so.0.*
+chmod 755 %{buildroot}%{_prefix}/%{_lib}/libtsan.so.2.*
+%endif
+%if %{build_libhwasan}
+chmod 755 %{buildroot}%{_prefix}/%{_lib}/libhwasan.so.0.*
%endif
%if %{build_liblsan}
chmod 755 %{buildroot}%{_prefix}/%{_lib}/liblsan.so.0.*
%endif
%if %{build_go}
# Avoid stripping these libraries and binaries.
-chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.13.*
+chmod 644 %{buildroot}%{_prefix}/%{_lib}/libgo.so.25.*
chmod 644 %{buildroot}%{_prefix}/bin/go.gcc
chmod 644 %{buildroot}%{_prefix}/bin/gofmt.gcc
chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/cgo
@@ -1852,8 +2467,6 @@ chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgnarl*so*
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgnat*so*
%endif
-mv $FULLPATH/include-fixed/syslimits.h $FULLPATH/include/syslimits.h
-mv $FULLPATH/include-fixed/limits.h $FULLPATH/include/limits.h
for h in `find $FULLPATH/include -name \*.h`; do
if grep -q 'It has been auto-edited by fixincludes from' $h; then
rh=`grep -A2 'It has been auto-edited by fixincludes from' $h | tail -1 | sed 's|^.*"\(.*\)".*$|\1|'`
@@ -1897,15 +2510,18 @@ cd ..
rm -f %{buildroot}%{_prefix}/%{_lib}/{libffi*,libiberty.a} || :
rm -f $FULLEPATH/install-tools/{mkheaders,fixincl}
rm -f %{buildroot}%{_prefix}/lib/{32,64}/libiberty.a
-rm -f %{buildroot}%{_prefix}/%{_lib}/libssp*
rm -f %{buildroot}%{_prefix}/%{_lib}/libvtv* || :
-rm -f %{buildroot}%{_prefix}/bin/gappletviewer || :
rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gfortran || :
rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gccgo || :
rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcj || :
rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-ar || :
rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-nm || :
rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcc-ranlib || :
+rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gdc || :
+rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gm2 || :
+rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcobc || :
+rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gcobol || :
+rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-ga68 || :
%ifarch %{multilib_64_archs}
# Remove libraries for the other arch on multilib arches
@@ -1929,23 +2545,96 @@ rm -rf %{buildroot}%{_prefix}/lib64/go/%{gcc_major}/%{gcc_target_platform}
%endif
%endif
-rm -f %{buildroot}%{mandir}/man3/ffi*
+rm -f %{buildroot}%{_prefix}/lib*/lib*.spec || :
+rm -f %{buildroot}%{_prefix}/lib*/libstdc++.modules.json || :
+rm -f %{buildroot}%{_prefix}/%{_lib}/lib{asan,atomic,gcc_s,gcobol,ga68,gdruntime,gfortran,go,gomp-plugin-*,gomp,gphobos,hwasan}.so || :
+rm -f %{buildroot}%{_prefix}/%{_lib}/lib{itm,lsan,m2{cor,iso,log,min,pim},objc,quadmath,stdc++,tsan,ubsan,gcc_s_asneeded,atomic_asneeded}.so || :
+rm -f %{buildroot}%{_prefix}/%{_lib}/libatomic_asneeded.a || :
+rm -f %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/install-tools/{fixinc.sh,mkinstalldirs} || :
+rm -f %{buildroot}%{_prefix}/share/locale/*/LC_MESSAGES/libstdc++.mo || :
+rm -f %{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include-fixed/README || :
+rm -rf %{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/ssp || :
+rm -rf %{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/install-tools || :
+%ifarch ppc ppc64 ppc64le ppc64p7
+rm -f %{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/{e,n}crt{i,n}.o || :
+%endif
+
+%if %{build_offload_nvptx}
+rm -f %{buildroot}%{_mandir}/man1/*-accel-*nvptx*
+find %{buildroot}%{_prefix}/nvptx-none/lib -name libstdc++.a-gdb.py | xargs rm -f || :
+find %{buildroot}%{_prefix}/nvptx-none/lib -name libstdc++.modules.json | xargs rm -f || :
+%endif
+%if %{build_offload_amdgcn}
+rm -f %{buildroot}%{_mandir}/man1/*-accel-*amdgcn*
+find %{buildroot}%{_prefix}/amdgcn-amdhsa/lib -name libstdc++.a-gdb.py | xargs rm -f || :
+find %{buildroot}%{_prefix}/amdgcn-amdhsa/lib -name libstdc++.modules.json | xargs rm -f || :
+%endif
+rm -f %{buildroot}%{_mandir}/man7/{gpl,gfdl,fsf-funding}.7*
# Help plugins find out nvra.
echo gcc-%{version}-%{release}.%{_arch} > $FULLPATH/rpmver
+# Add symlink to lto plugin in the binutils plugin directory.
+%{__mkdir_p} %{buildroot}%{_libdir}/bfd-plugins/
+ln -s ../../libexec/gcc/%{gcc_target_platform}/%{gcc_major}/liblto_plugin.so \
+ %{buildroot}%{_libdir}/bfd-plugins/
+
+%if %{build_annobin_plugin}
+mkdir -p $FULLPATH/plugin
+rm -f $FULLPATH/plugin/gcc-annobin*
+cp -a %{_builddir}/gcc-%{version}-%{DATE}/annobin-plugin/annobin*/gcc-plugin/.libs/annobin.so.0.0.0 \
+ $FULLPATH/plugin/gcc-annobin.so.0.0.0
+ln -sf gcc-annobin.so.0.0.0 $FULLPATH/plugin/gcc-annobin.so.0
+ln -sf gcc-annobin.so.0.0.0 $FULLPATH/plugin/gcc-annobin.so
+%endif
+
%check
cd obj-%{gcc_target_platform}
# run the tests.
-make %{?_smp_mflags} -k check ALT_CC_UNDER_TEST=gcc ALT_CXX_UNDER_TEST=g++ \
+LC_ALL=C make %{?_smp_mflags} -k check ALT_CC_UNDER_TEST=gcc ALT_CXX_UNDER_TEST=g++ \
%if 0%{?fedora} >= 20 || 0%{?rhel} > 7
- RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector-strong}'" || :
+ RUNTESTFLAGS="--target_board=unix/'{-foffload=disable,-fstack-protector-strong/-foffload=disable}'" || :
%else
- RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector}'" || :
+ RUNTESTFLAGS="--target_board=unix/'{-foffload=disable,-fstack-protector/-foffload=disable}'" || :
+%endif
+%if !%{build_annobin_plugin}
+if [ -f %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/annobin.so ]; then
+ # Test whether current annobin plugin won't fail miserably with the newly built gcc.
+ echo -e '#include \nint main () { printf ("Hello, world!\\n"); return 0; }' > annobin-test.c
+ echo -e '#include \nint main () { std::cout << "Hello, world!" << std::endl; return 0; }' > annobin-test.C
+ `%{gcc_target_platform}/libstdc++-v3/scripts/testsuite_flags --build-cc` \
+ -O2 -g -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS \
+ -fexceptions -fstack-protector-strong -grecord-gcc-switches -o annobin-test{c,.c} \
+ -Wl,-rpath,%{gcc_target_platform}/libgcc/ \
+ -fplugin=%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/annobin.so \
+ 2> ANNOBINOUT1 || echo Annobin test 1 FAIL > ANNOBINOUT2;
+ `%{gcc_target_platform}/libstdc++-v3/scripts/testsuite_flags --build-cxx` \
+ `%{gcc_target_platform}/libstdc++-v3/scripts/testsuite_flags --build-includes` \
+ -O2 -g -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS \
+ -fexceptions -fstack-protector-strong -grecord-gcc-switches -o annobin-test{C,.C} \
+ -Wl,-rpath,%{gcc_target_platform}/libgcc/:%{gcc_target_platform}/libstdc++-v3/src/.libs/ \
+ -fplugin=%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/annobin.so \
+ -B %{gcc_target_platform}/libstdc++-v3/src/.libs/ \
+ 2> ANNOBINOUT3 || echo Annobin test 2 FAIL > ANNOBINOUT4;
+ [ -f ./annobin-testc ] || echo Annobin test 1 MISSING > ANNOBINOUT5;
+ [ -f ./annobin-testc ] && \
+ ( ./annobin-testc > ANNOBINRES1 2>&1 || echo Annobin test 1 RUNFAIL > ANNOBINOUT6 );
+ [ -f ./annobin-testC ] || echo Annobin test 2 MISSING > ANNOBINOUT7;
+ [ -f ./annobin-testC ] && \
+ ( ./annobin-testC > ANNOBINRES2 2>&1 || echo Annobin test 2 RUNFAIL > ANNOBINOUT8 );
+ cat ANNOBINOUT[1-8] > ANNOBINOUT
+ touch ANNOBINRES1 ANNOBINRES2
+ [ -s ANNOBINOUT ] && echo Annobin testing FAILed > ANNOBINRES
+ cat ANNOBINOUT ANNOBINRES[12] >> ANNOBINRES
+ rm -f ANNOBINOUT* ANNOBINRES[12] annobin-test{c,C}
+fi
%endif
echo ====================TESTING=========================
( LC_ALL=C ../contrib/test_summary || : ) 2>&1 | sed -n '/^cat.*EOF/,/^EOF/{/^cat.*EOF/d;/^EOF/d;/^LAST_UPDATED:/d;p;}'
+%if !%{build_annobin_plugin}
+[ -f ANNOBINRES ] && cat ANNOBINRES
+%endif
echo ====================TESTING END=====================
mkdir testlogs-%{_target_platform}-%{version}-%{release}
for i in `find . -name \*.log | grep -F testsuite/ | grep -v 'config.log\|acats.*/tests/'`; do
@@ -1955,62 +2644,6 @@ tar cf - testlogs-%{_target_platform}-%{version}-%{release} | xz -9e \
| uuencode testlogs-%{_target_platform}.tar.xz || :
rm -rf testlogs-%{_target_platform}-%{version}-%{release}
-%post
-if [ -f %{_infodir}/gcc.info.gz ]; then
- /sbin/install-info \
- --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
-fi
-
-%preun
-if [ $1 = 0 -a -f %{_infodir}/gcc.info.gz ]; then
- /sbin/install-info --delete \
- --info-dir=%{_infodir} %{_infodir}/gcc.info.gz || :
-fi
-
-%post -n cpp
-if [ -f %{_infodir}/cpp.info.gz ]; then
- /sbin/install-info \
- --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
-fi
-
-%preun -n cpp
-if [ $1 = 0 -a -f %{_infodir}/cpp.info.gz ]; then
- /sbin/install-info --delete \
- --info-dir=%{_infodir} %{_infodir}/cpp.info.gz || :
-fi
-
-%post gfortran
-if [ -f %{_infodir}/gfortran.info.gz ]; then
- /sbin/install-info \
- --info-dir=%{_infodir} %{_infodir}/gfortran.info.gz || :
-fi
-
-%preun gfortran
-if [ $1 = 0 -a -f %{_infodir}/gfortran.info.gz ]; then
- /sbin/install-info --delete \
- --info-dir=%{_infodir} %{_infodir}/gfortran.info.gz || :
-fi
-
-%post gnat
-if [ -f %{_infodir}/gnat_rm.info.gz ]; then
- /sbin/install-info \
- --info-dir=%{_infodir} %{_infodir}/gnat_rm.info.gz || :
- /sbin/install-info \
- --info-dir=%{_infodir} %{_infodir}/gnat_ugn.info.gz || :
- /sbin/install-info \
- --info-dir=%{_infodir} %{_infodir}/gnat-style.info.gz || :
-fi
-
-%preun gnat
-if [ $1 = 0 -a -f %{_infodir}/gnat_rm.info.gz ]; then
- /sbin/install-info --delete \
- --info-dir=%{_infodir} %{_infodir}/gnat_rm.info.gz || :
- /sbin/install-info --delete \
- --info-dir=%{_infodir} %{_infodir}/gnat_ugn.info.gz || :
- /sbin/install-info --delete \
- --info-dir=%{_infodir} %{_infodir}/gnat-style.info.gz || :
-fi
-
%post go
%{_sbindir}/update-alternatives --install \
%{_prefix}/bin/go go %{_prefix}/bin/go.gcc 92 \
@@ -2021,137 +2654,58 @@ if [ $1 = 0 ]; then
%{_sbindir}/update-alternatives --remove go %{_prefix}/bin/go.gcc
fi
+%{?ldconfig:
# Because glibc Prereq's libgcc and /sbin/ldconfig
# comes from glibc, it might not exist yet when
# libgcc is installed
%post -n libgcc -p
-if posix.access ("/sbin/ldconfig", "x") then
- local pid = posix.fork ()
- if pid == 0 then
- posix.exec ("/sbin/ldconfig")
- elseif pid ~= -1 then
- posix.wait (pid)
- end
+if posix.access ("%ldconfig", "x") then
+ rpm.execute ("%ldconfig")
end
%postun -n libgcc -p
-if posix.access ("/sbin/ldconfig", "x") then
- local pid = posix.fork ()
- if pid == 0 then
- posix.exec ("/sbin/ldconfig")
- elseif pid ~= -1 then
- posix.wait (pid)
- end
+if posix.access ("%ldconfig", "x") then
+ rpm.execute ("%ldconfig")
end
+}
-%post -n libstdc++ -p /sbin/ldconfig
+%ldconfig_scriptlets -n libstdc++
-%postun -n libstdc++ -p /sbin/ldconfig
+%ldconfig_scriptlets -n libobjc
-%post -n libobjc -p /sbin/ldconfig
+%ldconfig_scriptlets -n libgfortran
-%postun -n libobjc -p /sbin/ldconfig
+%ldconfig_scriptlets -n libgphobos
-%post -n libgfortran -p /sbin/ldconfig
+%ldconfig_scriptlets -n libgm2
-%postun -n libgfortran -p /sbin/ldconfig
+%ldconfig_scriptlets -n libgnat
-%post -n libgnat -p /sbin/ldconfig
+%ldconfig_scriptlets -n libgomp
-%postun -n libgnat -p /sbin/ldconfig
+%ldconfig_scriptlets gdb-plugin
-%post -n libgomp
-/sbin/ldconfig
-if [ -f %{_infodir}/libgomp.info.gz ]; then
- /sbin/install-info \
- --info-dir=%{_infodir} %{_infodir}/libgomp.info.gz || :
-fi
+%ldconfig_scriptlets -n libgccjit
-%preun -n libgomp
-if [ $1 = 0 -a -f %{_infodir}/libgomp.info.gz ]; then
- /sbin/install-info --delete \
- --info-dir=%{_infodir} %{_infodir}/libgomp.info.gz || :
-fi
+%ldconfig_scriptlets -n libgdiagnostics
-%postun -n libgomp -p /sbin/ldconfig
+%ldconfig_scriptlets -n libquadmath
-%post gdb-plugin -p /sbin/ldconfig
+%ldconfig_scriptlets -n libitm
-%postun gdb-plugin -p /sbin/ldconfig
+%ldconfig_scriptlets -n libatomic
-%post -n libgccjit -p /sbin/ldconfig
+%ldconfig_scriptlets -n libasan
-%postun -n libgccjit -p /sbin/ldconfig
+%ldconfig_scriptlets -n libubsan
-%post -n libgccjit-devel
-if [ -f %{_infodir}/libgccjit.info.gz ]; then
- /sbin/install-info \
- --info-dir=%{_infodir} %{_infodir}/libgccjit.info.gz || :
-fi
+%ldconfig_scriptlets -n libtsan
-%preun -n libgccjit-devel
-if [ $1 = 0 -a -f %{_infodir}/libgccjit.info.gz ]; then
- /sbin/install-info --delete \
- --info-dir=%{_infodir} %{_infodir}/libgccjit.info.gz || :
-fi
+%ldconfig_scriptlets -n liblsan
-%post -n libquadmath
-/sbin/ldconfig
-if [ -f %{_infodir}/libquadmath.info.gz ]; then
- /sbin/install-info \
- --info-dir=%{_infodir} %{_infodir}/libquadmath.info.gz || :
-fi
+%ldconfig_scriptlets -n libhwasan
-%preun -n libquadmath
-if [ $1 = 0 -a -f %{_infodir}/libquadmath.info.gz ]; then
- /sbin/install-info --delete \
- --info-dir=%{_infodir} %{_infodir}/libquadmath.info.gz || :
-fi
-
-%postun -n libquadmath -p /sbin/ldconfig
-
-%post -n libitm
-/sbin/ldconfig
-if [ -f %{_infodir}/libitm.info.gz ]; then
- /sbin/install-info \
- --info-dir=%{_infodir} %{_infodir}/libitm.info.gz || :
-fi
-
-%preun -n libitm
-if [ $1 = 0 -a -f %{_infodir}/libitm.info.gz ]; then
- /sbin/install-info --delete \
- --info-dir=%{_infodir} %{_infodir}/libitm.info.gz || :
-fi
-
-%postun -n libitm -p /sbin/ldconfig
-
-%post -n libatomic -p /sbin/ldconfig
-
-%postun -n libatomic -p /sbin/ldconfig
-
-%post -n libasan -p /sbin/ldconfig
-
-%postun -n libasan -p /sbin/ldconfig
-
-%post -n libubsan -p /sbin/ldconfig
-
-%postun -n libubsan -p /sbin/ldconfig
-
-%post -n libtsan -p /sbin/ldconfig
-
-%postun -n libtsan -p /sbin/ldconfig
-
-%post -n liblsan -p /sbin/ldconfig
-
-%postun -n liblsan -p /sbin/ldconfig
-
-%post -n libmpx -p /sbin/ldconfig
-
-%postun -n libmpx -p /sbin/ldconfig
-
-%post -n libgo -p /sbin/ldconfig
-
-%postun -n libgo -p /sbin/ldconfig
+%ldconfig_scriptlets -n libgo
%files -f %{name}.lang
%{_prefix}/bin/cc
@@ -2164,6 +2718,7 @@ fi
%{_prefix}/bin/gcc-ar
%{_prefix}/bin/gcc-nm
%{_prefix}/bin/gcc-ranlib
+%{_prefix}/bin/lto-dump
%ifarch ppc
%{_prefix}/bin/%{_target_platform}-gcc
%endif
@@ -2179,6 +2734,7 @@ fi
%{_mandir}/man1/gcov.1*
%{_mandir}/man1/gcov-tool.1*
%{_mandir}/man1/gcov-dump.1*
+%{_mandir}/man1/lto-dump.1*
%{_infodir}/gcc*
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
@@ -2190,6 +2746,7 @@ fi
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/lto1
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/lto-wrapper
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/liblto_plugin.so*
+%{_libdir}/bfd-plugins/liblto_plugin.so
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/rpmver
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/stddef.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/stdarg.h
@@ -2203,12 +2760,15 @@ fi
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/unwind.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/omp.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/openacc.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/acc_prof.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/stdint.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/stdint-gcc.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/stdalign.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/stdnoreturn.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/stdatomic.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/gcov.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/stdckdint.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/stdcountof.h
%ifarch %{ix86} x86_64
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/mmintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/xmmintrin.h
@@ -2244,9 +2804,7 @@ fi
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/xsaveintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/xsaveoptintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512cdintrin.h
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512erintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512fintrin.h
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512pfintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/shaintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/mm_malloc.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/mm3dnow.h
@@ -2268,8 +2826,6 @@ fi
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/xsavesintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/clzerointrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/pkuintrin.h
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx5124fmapsintrin.h
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx5124vnniwintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512vpopcntdqintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/sgxintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/gfniintrin.h
@@ -2286,6 +2842,53 @@ fi
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/pconfigintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/wbnoinvdintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/movdirintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/waitpkgintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/cldemoteintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512bf16vlintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512bf16intrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/enqcmdintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512vp2intersectintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512vp2intersectvlintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/serializeintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/tsxldtrkintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/amxtileintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/amxint8intrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/amxbf16intrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/x86gprintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/uintrintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/hresetintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/keylockerintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avxvnniintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/mwaitintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512fp16intrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512fp16vlintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avxifmaintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avxvnniint8intrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avxneconvertintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/cmpccxaddintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/amxfp16intrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/prfchiintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/raointintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/amxcomplexintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512bitalgvlintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avxvnniint16intrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/sha512intrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/sm3intrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/sm4intrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/usermsrintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/amxavx512intrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/amxfp8intrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/amxmovrsintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/amxtf32intrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2bf16intrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2convertintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2copyintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2mediaintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2minmaxintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2satcvtintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/movrsintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512bmmintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512bmmvlintrin.h
%endif
%ifarch ia64
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/ia64intrin.h
@@ -2293,7 +2896,6 @@ fi
%ifarch ppc ppc64 ppc64le ppc64p7
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/ppc-asm.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/altivec.h
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/paired.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/ppu_intrinsics.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/si2vmx.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/spu2vmx.h
@@ -2307,7 +2909,14 @@ fi
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/emmintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/mmintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/x86intrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/pmmintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/tmmintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/smmintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/amo.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/nmmintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/immintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/x86gprintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/rs6000-vecdefines.h
%endif
%ifarch %{arm}
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/unwind-arm-common.h
@@ -2316,11 +2925,18 @@ fi
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_acle.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_cmse.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_fp16.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_bf16.h
%endif
%ifarch aarch64
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_neon.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_acle.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_fp16.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_bf16.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_sve.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_sme.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_neon_sve_bridge.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_private_fp8.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_private_neon_types.h
%endif
%ifarch sparc sparcv9 sparc64
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/visintrin.h
@@ -2331,8 +2947,13 @@ fi
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/htmxlintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/vecintrin.h
%endif
-%if %{build_libmpx}
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libmpx.spec
+%ifarch riscv64
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/riscv_vector.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/riscv_crypto.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/riscv_bitmanip.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/riscv_th_vector.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/sifive_vector.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/andes_vector.h
%endif
%if %{build_libasan}
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/sanitizer
@@ -2343,6 +2964,7 @@ fi
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgcov.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgcc_eh.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgcc_s.so
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgcc_s_asneeded.so
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgomp.spec
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgomp.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgomp.so
@@ -2352,6 +2974,9 @@ fi
%if %{build_libasan}
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libsanitizer.spec
%endif
+%if %{build_isl}
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libisl.so.*
+%endif
%ifarch sparcv9 ppc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/crt*.o
@@ -2359,6 +2984,7 @@ fi
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libgcov.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libgcc_eh.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libgcc_s.so
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libgcc_s_asneeded.so
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libgomp.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libgomp.so
%if %{build_libquadmath}
@@ -2372,6 +2998,8 @@ fi
%if %{build_libatomic}
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libatomic.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libatomic.so
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libatomic_asneeded.a
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libatomic_asneeded.so
%endif
%if %{build_libasan}
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libasan.a
@@ -2382,12 +3010,6 @@ fi
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libubsan.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libubsan.so
%endif
-%if %{build_libmpx}
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libmpx.a
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libmpx.so
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libmpxwrappers.a
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libmpxwrappers.so
-%endif
%endif
%ifarch %{multilib_64_archs}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32
@@ -2396,6 +3018,7 @@ fi
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libgcov.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libgcc_eh.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libgcc_s.so
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libgcc_s_asneeded.so
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libgomp.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libgomp.so
%if %{build_libquadmath}
@@ -2409,6 +3032,8 @@ fi
%if %{build_libatomic}
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libatomic.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libatomic.so
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libatomic_asneeded.a
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libatomic_asneeded.so
%endif
%if %{build_libasan}
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libasan.a
@@ -2419,12 +3044,6 @@ fi
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libubsan.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libubsan.so
%endif
-%if %{build_libmpx}
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libmpx.a
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libmpx.so
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libmpxwrappers.a
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libmpxwrappers.so
-%endif
%endif
%ifarch sparcv9 sparc64 ppc ppc64 ppc64p7
%if %{build_libquadmath}
@@ -2438,6 +3057,8 @@ fi
%if %{build_libatomic}
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libatomic.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libatomic.so
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libatomic_asneeded.a
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libatomic_asneeded.so
%endif
%if %{build_libasan}
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libasan.a
@@ -2448,15 +3069,12 @@ fi
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libubsan.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libubsan.so
%endif
-%if %{build_libmpx}
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libmpx.a
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libmpx.so
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libmpxwrappers.a
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libmpxwrappers.so
-%endif
%else
%if %{build_libatomic}
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libatomic.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libatomic.so
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libatomic_asneeded.a
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libatomic_asneeded.so
%endif
%if %{build_libasan}
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libasan.so
@@ -2465,21 +3083,21 @@ fi
%if %{build_libubsan}
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libubsan.so
%endif
-%if %{build_libmpx}
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libmpx.so
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libmpxwrappers.so
-%endif
%endif
%if %{build_libtsan}
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libtsan.so
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libtsan_preinit.o
%endif
+%if %{build_libhwasan}
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libhwasan.so
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libhwasan_preinit.o
+%endif
%if %{build_liblsan}
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/liblsan.so
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/liblsan_preinit.o
%endif
%{_prefix}/libexec/getconf/default
-%doc gcc/README* rpm.doc/changelogs/gcc/ChangeLog*
+%doc gcc/README* rpm.doc/changelogs/gcc/ChangeLog*
%{!?_licensedir:%global license %%doc}
%license gcc/COPYING* COPYING.RUNTIME
@@ -2511,11 +3129,13 @@ fi
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/cc1plus
+%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/g++-mapper-server
%ifarch sparcv9 ppc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libstdc++.so
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libstdc++.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libstdc++fs.a
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libstdc++exp.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libsupc++.a
%endif
%ifarch %{multilib_64_archs}
@@ -2523,6 +3143,7 @@ fi
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libstdc++.so
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libstdc++.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libstdc++fs.a
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libstdc++exp.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libsupc++.a
%endif
%ifarch sparcv9 ppc %{multilib_64_archs}
@@ -2531,6 +3152,7 @@ fi
%ifarch sparcv9 sparc64 ppc ppc64 ppc64p7
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libstdc++.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libstdc++fs.a
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libstdc++exp.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libsupc++.a
%endif
%doc rpm.doc/changelogs/gcc/cp/ChangeLog*
@@ -2541,6 +3163,10 @@ fi
%dir %{_datadir}/gdb/auto-load
%dir %{_datadir}/gdb/auto-load/%{_prefix}
%dir %{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/
+# Package symlink to keep compatibility
+%ifarch riscv64
+%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/lp64d
+%endif
%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/libstdc*gdb.py*
%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/__pycache__
%dir %{_prefix}/share/gcc-%{gcc_major}
@@ -2556,16 +3182,20 @@ fi
%ifnarch sparcv9 ppc %{multilib_64_archs}
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libstdc++.so
%endif
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libstdc++.modules.json
%ifarch sparcv9 ppc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib32
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib32/libstdc++fs.a
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib32/libstdc++exp.a
%endif
%ifarch sparc64 ppc64 ppc64p7
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib64
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib64/libstdc++fs.a
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib64/libstdc++exp.a
%endif
%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libstdc++fs.a
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libstdc++exp.a
%endif
%doc rpm.doc/changelogs/libstdc++-v3/ChangeLog* libstdc++-v3/README*
@@ -2641,7 +3271,9 @@ fi
%dir %{_prefix}/libexec/gcc
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/finclude
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/ISO_Fortran_binding.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/finclude/omp_lib.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/finclude/omp_lib.f90
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/finclude/omp_lib.mod
@@ -2696,6 +3328,195 @@ fi
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgfortran.a
%endif
+%if %{build_d}
+%files gdc
+%{_prefix}/bin/gdc
+%{_mandir}/man1/gdc.1*
+%{_infodir}/gdc*
+%dir %{_prefix}/lib/gcc
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}
+%dir %{_prefix}/libexec/gcc
+%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}
+%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/d
+%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/d21
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgphobos.spec
+%ifarch sparcv9 sparc64 ppc ppc64 ppc64p7
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgdruntime.a
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgphobos.a
+%endif
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgdruntime.so
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgphobos.so
+%ifarch sparcv9 ppc
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libgdruntime.a
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libgphobos.a
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libgdruntime.so
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libgphobos.so
+%endif
+%ifarch %{multilib_64_archs}
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libgdruntime.a
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libgphobos.a
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libgdruntime.so
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libgphobos.so
+%endif
+%doc rpm.doc/gdc/*
+
+%files -n libgphobos
+%{_prefix}/%{_lib}/libgdruntime.so.6*
+%{_prefix}/%{_lib}/libgphobos.so.6*
+%doc rpm.doc/libphobos/*
+
+%files -n libgphobos-static
+%dir %{_prefix}/lib/gcc
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}
+%ifarch sparcv9 ppc
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib32
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib32/libgdruntime.a
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib32/libgphobos.a
+%endif
+%ifarch sparc64 ppc64 ppc64p7
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib64
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib64/libgdruntime.a
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib64/libgphobos.a
+%endif
+%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgdruntime.a
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgphobos.a
+%endif
+%endif
+
+%if %{build_m2}
+%files gm2
+%{_prefix}/bin/gm2
+%{_mandir}/man1/gm2.1*
+%{_infodir}/m2*
+%dir %{_prefix}/lib/gcc
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}
+%dir %{_prefix}/libexec/gcc
+%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}
+%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/m2
+%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/cc1gm2
+%ifarch sparcv9 sparc64 ppc ppc64 ppc64p7
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libm2*.a
+%endif
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libm2*.so
+%ifarch sparcv9 ppc
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/m2
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libm2*.a
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libm2*.so
+%endif
+%ifarch %{multilib_64_archs}
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/m2
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libm2*.a
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libm2*.so
+%endif
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/m2rte.so
+%doc rpm.doc/gm2/*
+
+%files -n libgm2
+%{_prefix}/%{_lib}/libm2*.so.21*
+%doc rpm.doc/libgm2/*
+
+%files -n libgm2-static
+%dir %{_prefix}/lib/gcc
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}
+%ifarch sparcv9 ppc
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib32
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib32/libm2*.a
+%endif
+%ifarch sparc64 ppc64 ppc64p7
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib64
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib64/libm2*.a
+%endif
+%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libm2*.a
+%endif
+%endif
+
+%if %{build_cobol}
+%files gcobol
+%{_prefix}/bin/gcobol
+%{_prefix}/bin/gcobc
+%{_mandir}/man1/gcobol.1*
+%{_mandir}/man3/gcobol-io.3*
+%dir %{_prefix}/libexec/gcc
+%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}
+%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}
+%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/cobol1
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgcobol.spec
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgcobol.so
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/cobol
+%doc rpm.doc/gcobol/*
+
+%files -n libgcobol
+%{_prefix}/%{_lib}/libgcobol.so.2*
+%doc rpm.doc/libgcobol/*
+
+%files -n libgcobol-static
+%dir %{_prefix}/lib/gcc
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgcobol.a
+%endif
+
+%if %{build_algol68}
+%files algol68
+%{_prefix}/bin/ga68
+%{_mandir}/man1/ga68.1*
+%dir %{_prefix}/libexec/gcc
+%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}
+%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}
+%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/a681
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libga68.spec
+%ifarch sparcv9 sparc64 ppc ppc64 ppc64p7
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libga68.a
+%endif
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libga68.so
+%ifarch sparcv9 ppc
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libga68.a
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libga68.so
+%endif
+%ifarch %{multilib_64_archs}
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libga68.a
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libga68.so
+%endif
+%{_infodir}/ga68*
+%doc rpm.doc/algol68/*
+
+%files -n libga68
+%{_prefix}/%{_lib}/libga68.so.2*
+%doc rpm.doc/libga68/*
+
+%files -n libga68-static
+%dir %{_prefix}/lib/gcc
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}
+%ifarch sparcv9 ppc
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib32
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib32/libga68.a
+%endif
+%ifarch sparc64 ppc64 ppc64p7
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib64
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib64/libga68.a
+%endif
+%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libga68.a
+%endif
+%endif
+
%if %{build_ada}
%files gnat
%{_prefix}/bin/gnat
@@ -2711,16 +3532,19 @@ fi
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/adainclude
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/adalib
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/ada_target_properties
%endif
%ifarch %{multilib_64_archs}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/adainclude
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/adalib
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/ada_target_properties
%endif
%ifarch sparcv9 sparc64 ppc ppc64 ppc64p7
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/adainclude
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/adalib
%endif
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/ada_target_properties
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/gnat1
%doc rpm.doc/changelogs/gcc/ada/ChangeLog*
@@ -2854,28 +3678,12 @@ fi
%if %{build_libatomic}
%files -n libatomic
%{_prefix}/%{_lib}/libatomic.so.1*
-
-%files -n libatomic-static
-%dir %{_prefix}/lib/gcc
-%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
-%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}
-%ifarch sparcv9 ppc
-%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib32
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib32/libatomic.a
-%endif
-%ifarch sparc64 ppc64 ppc64p7
-%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib64
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib64/libatomic.a
-%endif
-%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libatomic.a
-%endif
%doc rpm.doc/changelogs/libatomic/ChangeLog*
%endif
%if %{build_libasan}
%files -n libasan
-%{_prefix}/%{_lib}/libasan.so.5*
+%{_prefix}/%{_lib}/libasan.so.8*
%files -n libasan-static
%dir %{_prefix}/lib/gcc
@@ -2923,7 +3731,7 @@ fi
%if %{build_libtsan}
%files -n libtsan
-%{_prefix}/%{_lib}/libtsan.so.0*
+%{_prefix}/%{_lib}/libtsan.so.2*
%files -n libtsan-static
%dir %{_prefix}/lib/gcc
@@ -2935,6 +3743,20 @@ fi
%license libsanitizer/LICENSE.TXT
%endif
+%if %{build_libhwasan}
+%files -n libhwasan
+%{_prefix}/%{_lib}/libhwasan.so.0*
+
+%files -n libhwasan-static
+%dir %{_prefix}/lib/gcc
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libhwasan.a
+%doc rpm.doc/changelogs/libsanitizer/ChangeLog*
+%{!?_licensedir:%global license %%doc}
+%license libsanitizer/LICENSE.TXT
+%endif
+
%if %{build_liblsan}
%files -n liblsan
%{_prefix}/%{_lib}/liblsan.so.0*
@@ -2949,32 +3771,6 @@ fi
%license libsanitizer/LICENSE.TXT
%endif
-%if %{build_libmpx}
-%files -n libmpx
-%{_prefix}/%{_lib}/libmpx.so.2*
-%{_prefix}/%{_lib}/libmpxwrappers.so.2*
-
-%files -n libmpx-static
-%dir %{_prefix}/lib/gcc
-%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
-%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}
-%ifarch sparcv9 ppc
-%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib32
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib32/libmpx.a
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib32/libmpxwrappers.a
-%endif
-%ifarch sparc64 ppc64 ppc64p7
-%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib64
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib64/libmpx.a
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib64/libmpxwrappers.a
-%endif
-%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libmpx.a
-%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libmpxwrappers.a
-%endif
-%doc rpm.doc/changelogs/libmpx/ChangeLog*
-%endif
-
%if %{build_go}
%files go
%ghost %{_prefix}/bin/go
@@ -3021,7 +3817,8 @@ fi
%doc rpm.doc/go/*
%files -n libgo
-%attr(755,root,root) %{_prefix}/%{_lib}/libgo.so.13*
+%{_prefix}/%{_lib}/libgo.so.25
+%attr(755,root,root) %{_prefix}/%{_lib}/libgo.so.25.*
%doc rpm.doc/libgo/*
%files -n libgo-devel
@@ -3082,6 +3879,15 @@ fi
%doc rpm.doc/libgccjit-devel/*
%doc gcc/jit/docs/examples
+%files -n libgdiagnostics
+%{_prefix}/bin/sarif-replay
+%{_prefix}/%{_lib}/libgdiagnostics.so.*
+
+%files -n libgdiagnostics-devel
+%{_prefix}/%{_lib}/libgdiagnostics.so
+%{_prefix}/include/libgdiagnostics*.h
+%doc rpm.doc/libgdiagnostics-devel/*
+
%files plugin-devel
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
@@ -3108,6 +3914,7 @@ fi
%files offload-nvptx
%{_prefix}/bin/nvptx-none-*
%{_prefix}/bin/%{gcc_target_platform}-accel-nvptx-none-gcc
+%{_prefix}/bin/%{gcc_target_platform}-accel-nvptx-none-lto-dump
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}
@@ -3127,513 +3934,130 @@ fi
%{_prefix}/%{_lib}/libgomp-plugin-nvptx.so.*
%endif
+%if %{build_offload_amdgcn}
+%files offload-amdgcn
+%{_prefix}/bin/amdgcn-amdhsa-*
+%{_prefix}/bin/%{gcc_target_platform}-accel-amdgcn-amdhsa-gcc
+%{_prefix}/bin/%{gcc_target_platform}-accel-amdgcn-amdhsa-lto-dump
+%dir %{_prefix}/lib/gcc
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/accel
+%dir %{_prefix}/libexec/gcc
+%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}
+%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}
+%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/accel
+%{_prefix}/lib/gcc/amdgcn-amdhsa
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/accel/amdgcn-amdhsa
+%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/accel/amdgcn-amdhsa
+%dir %{_prefix}/amdgcn-amdhsa
+%{_prefix}/amdgcn-amdhsa/bin
+%{_prefix}/amdgcn-amdhsa/include
+
+%files -n libgomp-offload-amdgcn
+%{_prefix}/%{_lib}/libgomp-plugin-gcn.so.*
+%endif
+
+%if %{build_annobin_plugin}
+%files plugin-annobin
+%dir %{_prefix}/lib/gcc
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}
+%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/gcc-annobin.so
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/gcc-annobin.so.0
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/gcc-annobin.so.0.0.0
+%endif
+
%changelog
-* Wed Jan 9 2019 Jakub Jelinek 8.2.1-7
-- update from the 8 branch
- - PRs c++/60994, c++/82294, c++/86669, c++/86900, c++/87380, c++/87436,
- c++/87506, c++/87539, c++/87934, c++/88103, c++/88122, c++/88180,
- c++/88181, c++/88215, c++/88410, debug/85550, debug/87039,
- debug/88644, fortran/77325, fortran/77703, fortran/85544,
- fortran/85798, fortran/87359, fortran/88116, fortran/88138,
- fortran/88169, fortran/88377, fortran/88463, fortran/88467,
- inline-asm/55681, ipa/88561, libstdc++/64883, libstdc++/87855,
- lto/86517, lto/88130, lto/88185, middle-end/82564, middle-end/85594,
- middle-end/88553, rtl-optimization/87475, rtl-optimization/88018,
- rtl-optimization/88253, rtl-optimization/88416,
- rtl-optimization/88470, rtl-optimization/88563, sanitizer/88426,
- target/60563, target/78444, target/81210, target/81693, target/84010,
- target/85593, target/85644, target/86832, target/87598, target/88213,
- target/88234, target/88343, target/88418, target/88522, target/88541,
- target/88594, target/88620, testsuite/67974, tree-optimization/68356,
- tree-optimization/71109, tree-optimization/85794,
- tree-optimization/87320, tree-optimization/87360,
- tree-optimization/87895, tree-optimization/87898,
- tree-optimization/88071
-- include forgotten ppc* intrinsic headers
+* Thu Jan 15 2026 Jakub Jelinek 16.0.1-0.3
+- update from trunk
+ - PRs c/123309, c++/120775, c++/122634, c++/123081, c++/123551,
+ debug/121045, driver/108865, driver/123504, ipa/122852, ipa/123542,
+ middle-end/123115, middle-end/123392, middle-end/123573,
+ rtl-optimization/123312, rtl-optimization/123544, target/38118,
+ target/114528, target/120250, target/121240, target/123092,
+ testsuite/122522, tree-optimization/119402, tree-optimization/120322,
+ tree-optimization/123109, tree-optimization/123190,
+ tree-optimization/123530
-* Sat Dec 15 2018 Jakub Jelinek 8.2.1-6
-- update from the 8 branch
- - PRs c++/86246, c++/87531, c++/87989, c++/88120, debug/87462, debug/88006,
- fortran/87922, fortran/88025, fortran/88048, fortran/88073,
- fortran/88143, fortran/88155, fortran/88205, fortran/88206,
- fortran/88228, fortran/88249, fortran/88269, fortran/97922,
- gcov-profile/88045, libfortran/78351, libfortran/88137,
- libstdc++/70694, libstdc++/87520, libstdc++/88199, lto/88077,
- middle-end/58372, rtl-optimization/85925, rtl-optimization/88001,
- target/81685, target/85968, target/87496, target/87853, target/87867,
- target/87928, target/88051, target/88224, testsuite/78544,
- tree-optimization/79351, tree-optimization/87288,
- tree-optimization/88229
+* Tue Jan 13 2026 Jakub Jelinek 16.0.1-0.2
+- update from trunk
+ - PRs fortran/91960, fortran/112460, libstdc++/123396,
+ rtl-optimization/123444, rtl-optimization/123501, target/117581,
+ target/123484, testsuite/123098, tree-optimization/122843,
+ tree-optimization/122845, tree-optimization/123301,
+ tree-optimization/123525, tree-optimization/123539
-* Mon Nov 5 2018 Jakub Jelinek 8.2.1-5
-- update from the 8 branch
- - PRs ada/81878, bootstrap/81033, c++/86288, debug/86687, debug/87362,
- debug/87428, fortran/87597, fortran/87725, libstdc++/70966,
- libstdc++/77854, libstdc++/78595, libstdc++/86751, libstdc++/87061,
- libstdc++/87641, libstdc++/87704, libstdc++/87749, libstdc++/87809,
- libstdc++/87822, middle-end/63155, middle-end/85488, middle-end/87087,
- middle-end/87610, middle-end/87623, middle-end/87645,
- middle-end/87647, middle-end/87649, other/86198, sanitizer/87837,
- target/52795, target/81733, target/85669, target/87511,
- tree-optimization/63155, tree-optimization/87465,
- tree-optimization/87473, tree-optimization/87665,
- tree-optimization/87700, tree-optimization/87745
- - fix store merging regression (PR tree-optimization/87859, #1645400)
+* Mon Jan 12 2026 Jakub Jelinek 16.0.1-0.1
+- update from trunk
+ - PRs c++/81337, c++/115163, c++/123526, fortran/77415, ipa/122458,
+ ipa/123543, libfortran/123012, middle-end/123175,
+ rtl-optimization/123523, target/123415, testsuite/121752,
+ testsuite/123129, tree-optimization/122824, tree-optimization/122830,
+ tree-optimization/123417, tree-optimization/123528
-* Thu Oct 11 2018 Jakub Jelinek 8.2.1-4
-- update from the 8 branch
- - PRs bootstrap/87225, c++/84940, c++/85070, c++/86881, c++/87093,
- c++/87137, c++/87185, c++/87582, fortran/83999, fortran/85395,
- fortran/85954, fortran/86111, fortran/86116, fortran/86372,
- fortran/86830, fortran/87277, fortran/87284, gcov-profile/85871,
- gcov-profile/86109, libstdc++/87278, libstdc++/87538,
- middle-end/87188, middle-end/87248, other/87353,
- rtl-optimization/86771, rtl-optimization/86882, sanitizer/85774,
- target/82699, target/85666, target/86731, target/86989, target/87033,
- target/87224, target/87370, target/87414, target/87467, target/87517,
- target/87522, target/87550, tree-optimization/86844
+* Sat Jan 10 2026 Jakub Jelinek 16.0.0-0.5
+- update from trunk
+ - PRs ada/123003, ada/123371, ada/123490, c/117687, c/121081, c/121507,
+ c/123212, c/123435, c/123463, c/123475, c++/123331, c++/123347,
+ c++/123393, debug/123259, fortran/90218, fortran/123012,
+ fortran/123029, fortran/123071, fortran/123321, fortran/123352,
+ fortran/123483, gcov-profile/123019, ipa/123383, libstdc++/122878,
+ libstdc++/123100, libstdc++/123183, libstdc++/123326,
+ libstdc++/123378, libstdc++/123406, middle-end/111817,
+ middle-end/123107, rtl-optimization/119291, rtl-optimization/121675,
+ rtl-optimization/121773, rtl-optimization/123121,
+ rtl-optimization/123491, target/119430, target/121192, target/121290,
+ target/121535, target/121778, target/122846, target/123010,
+ target/123017, target/123268, target/123269, target/123317,
+ target/123320, target/123390, target/123403, target/123457,
+ target/123489, target/123492, testsuite/123353, testsuite/123377,
+ tree-optimization/42196, tree-optimization/102486,
+ tree-optimization/102954, tree-optimization/122103,
+ tree-optimization/122608, tree-optimization/122793,
+ tree-optimization/123197, tree-optimization/123200,
+ tree-optimization/123221, tree-optimization/123298,
+ tree-optimization/123300, tree-optimization/123310,
+ tree-optimization/123315, tree-optimization/123316,
+ tree-optimization/123319, tree-optimization/123351,
+ tree-optimization/123372, tree-optimization/123374,
+ tree-optimization/123382, tree-optimization/123414,
+ tree-optimization/123431
+- fix ICE on friend with noexcept (PR c++/123189)
+- fix -E -fdirectives-only comment handling (PR preprocessor/123273)
+- provide libatomic-static from gcc subpackage
-* Wed Sep 5 2018 Jakub Jelinek 8.2.1-3
-- update from the 8 branch
- - PRs c++/86190, c++/86706, c++/86728, c++/86738, c++/86763, c++/86767,
- c++/86836, c++/87095, c++/87122, c++/87155, fortran/86328,
- fortran/86760, fortran/86837, fortran/86906, gcov-profile/86817,
- libfortran/86704, libstdc++/60555, libstdc++/84535, libstdc++/86597,
- libstdc++/86861, libstdc++/86874, libstdc++/87116, lto/86456,
- middle-end/86505, middle-end/86705, middle-end/87024,
- middle-end/87099, middle-end/87138, other/86992,
- rtl-optimization/87065, sanitizer/86022, target/86386, target/86640,
- target/86662, target/86820, target/87014, target/87198,
- testsuite/86153, tree-optimization/80925, tree-optimization/85859,
- tree-optimization/86816, tree-optimization/86835,
- tree-optimization/86871, tree-optimization/86914,
- tree-optimization/86927, tree-optimization/86945,
- tree-optimization/87074
+* Sat Jan 3 2026 Jakub Jelinek 16.0.0-0.4
+- update from trunk
+ - PRs ada/123060, ada/123088, ada/123185, ada/123289, ada/123302,
+ ada/123306, ada/15605, c++/117518, c++/119097, c++/120005, c++/121864,
+ c++/122550, c++/122690, c++/122712, c++/122819, c++/122958,
+ c++/122994, c++/123080, c++/123261, c++/123277, fortran/101399,
+ fortran/121472, fortran/121475, fortran/122957, fortran/123201,
+ fortran/123253, libfortran/119136, middle-end/123067,
+ middle-end/123222, other/122243, rtl-optimization/123114,
+ rtl-optimization/123267, rtl-optimization/123276,
+ rtl-optimization/123295, rtl-optimization/123308, target/121485,
+ target/122769, target/123216, target/123217, target/123274,
+ target/123278, target/123283, target/123318, testsuite/123299,
+ testsuite/123334, tree-optimization/123089
+- require libatomic package from gcc package as -latomic is now linked
+ as-needed by default
+- remove libatomic-static package, move libatomic.a into gcc package
-* Wed Aug 1 2018 Jakub Jelinek 8.2.1-2
-- update from the 8 branch
- - PRs bootstrap/86724, c/85704, c/86617, libstdc++/84654, libstdc++/85672,
- libstdc++/86734, sanitizer/86759, target/86511, target/86612,
- target/86651
+* Sat Dec 20 2025 Jakub Jelinek 16.0.0-0.3
+- update from trunk
+ - PRs bootstrap/12407, c/123156, c++/91388, c++/117034, c++/122070,
+ c++/122509, c++/122690, c++/122712, c++/122772, c++/122834,
+ c++/122922, c++/122995, c++/123030, c++/123044, c++/123186,
+ debug/122968, fortran/71565, fortran/92613, libstdc++/112591,
+ libstdc++/123147, libstdc++/123180, rtl-optimization/123223,
+ target/55212, target/122970, target/123171, target/123216,
+ target/123217, tree-optimization/122734, tree-optimization/123097,
+ tree-optimization/123117, tree-optimization/123118,
+ tree-optimization/123152, tree-optimization/123153,
+ tree-optimization/123192, tree-optimization/123205
-* Thu Jul 26 2018 Jakub Jelinek 8.2.1-1
-- update from the 8 branch
- - GCC 8.2 release
- - PRs c++/3698, c++/86208, c++/86374, c++/86480, c/86453, debug/86452,
- debug/86457, fortran/83183, fortran/83184, fortran/86325,
- fortran/86417, fortran/86421, middle-end/85602, middle-end/85974,
- middle-end/86076, middle-end/86202, middle-end/86539,
- middle-end/86542, middle-end/86627, middle-end/86660, target/84829,
- target/86414, tree-optimization/85935, tree-optimization/86274,
- tree-optimization/86514
-- add annobin notes to crt*.o and libgcc (#1574936)
-- drop -mcet option alias hack for f29+
-
-* Thu Jul 12 2018 Jakub Jelinek 8.1.1-5
-- update from the 8 branch
- - PRs c++/86320, c++/86378, c++/86398, c++/86400, debug/86064,
- fortran/82865, fortran/82969, fortran/86242, hsa/86371,
- libstdc++/83982, libstdc++/84087, libstdc++/85098, libstdc++/85671,
- libstdc++/86127, libstdc++/86272, libstdc++/86292, libstdc++/86398,
- sanitizer/86406, target/85904, target/86285, tree-optimization/86492
-
-* Fri Jun 29 2018 Jakub Jelinek 8.1.1-4
-- make sure rs6000-modes.h is installed for plugins (#1596407)
-
-* Tue Jun 26 2018 Jakub Jelinek 8.1.1-3
-- update from the 8 branch
- - PRs c++/86182, c++/86219, c++/86291, fortran/82972, fortran/83088,
- fortran/83118, fortran/85851, libgcc/86213, libstdc++/81092,
- libstdc++/86112, libstdc++/86138, rtl-optimization/85645,
- target/85358, target/85657, target/85994, target/86197, target/86222,
- target/86314, tree-optimization/85989
-
-* Wed Jun 20 2018 Jakub Jelinek 8.1.1-2
-- update from the 8 branch
- - PRs ada/85540, ada/85635, bootstrap/85921, c++/61806, c++/80485,
- c++/81060, c++/81420, c++/85305, c++/85618, c++/85634, c++/85646,
- c++/85659, c++/85662, c++/85695, c++/85706, c++/85710, c++/85731,
- c++/85739, c++/85761, c++/85764, c++/85765, c++/85782, c++/85792,
- c++/85807, c++/85815, c++/85842, c++/85847, c++/85864, c++/85866,
- c++/85873, c++/85912, c++/85952, c++/85963, c++/85976, c++/86025,
- c++/86060, c++/86094, c++/86147, c++/86200, c++/86210, c/82063,
- c/85623, c/85696, c/86093, debug/86194, fortran/38351, fortran/44491,
- fortran/49636, fortran/63514, fortran/66694, fortran/68846,
- fortran/70864, fortran/70870, fortran/78278, fortran/78571,
- fortran/80657, fortran/82275, fortran/82617, fortran/82923,
- fortran/85138, fortran/85507, fortran/85521, fortran/85542,
- fortran/85543, fortran/85631, fortran/85641, fortran/85687,
- fortran/85701, fortran/85702, fortran/85703, fortran/85742,
- fortran/85779, fortran/85780, fortran/85786, fortran/85816,
- fortran/85895, fortran/85975, fortran/85981, fortran/85996,
- fortran/86045, fortran/86051, fortran/86059, fortran/86110, go/85630,
- ipa/85655, libgfortran/85840, libgfortran/85906, libgfortran/86070,
- libstdc++/67554, libstdc++/82644, libstdc++/82966, libstdc++/83891,
- libstdc++/84159, libstdc++/85632, libstdc++/85642, libstdc++/85812,
- libstdc++/85818, libstdc++/85930, libstdc++/85951, libstdc++/86008,
- libstdc++/86169, middle-end/85567, middle-end/85588, middle-end/85627,
- middle-end/85643, middle-end/85874, middle-end/85878,
- middle-end/86095, middle-end/86122, middle-end/86123,
- middle-end/86139, other/77609, rtl-optimization/85638,
- rtl-optimization/86108, sanitizer/85556, sanitizer/85835,
- sanitizer/86012, target/63177, target/81497, target/85345,
- target/85591, target/85606, target/85658, target/85683, target/85684,
- target/85698, target/85733, target/85755, target/85756, target/85829,
- target/85900, target/85903, target/85945, target/85950, target/85984,
- target/86003, target/86048, testsuite/85586, tree-optimization/85597,
- tree-optimization/85615, tree-optimization/85712,
- tree-optimization/85793, tree-optimization/85814,
- tree-optimization/85822, tree-optimization/85863,
- tree-optimization/85934, tree-optimization/85964,
- tree-optimization/86038, tree-optimization/86114,
- tree-optimization/86231
-
-* Tue Jun 19 2018 Miro Hrončok 8.1.1-1.1
-- rebuilt for Python 3.7
-
-* Wed May 2 2018 Jakub Jelinek 8.1.1-1
-- update from the 8 branch
- - GCC 8.1 release
- - PRs c++/85545, c++/85553, c++/85580, c++/85587, ipa/85549, libgcc/85532,
- target/85473, target/85519, tree-optimization/85529,
- tree-optimization/85586, web/85578
-
-* Wed Apr 25 2018 Jakub Jelinek 8.0.1-0.23
-- update from the trunk and 8 branch
- - GCC 8.1 rc1
- - PR bootstrap/85490, c++/49171, c++/85437, fortran/85520, target/85512
-- include movdirintrin.h header on x86 (#1571808)
-
-* Tue Apr 24 2018 Jakub Jelinek 8.0.1-0.22
-- update from the trunk
- - PRs c++/69560, c++/70808, c++/80290, c++/84463, c++/84611, c++/84630,
- c++/85032, c++/85039, c++/85112, c++/85258, c++/85356, c++/85385,
- c++/85462, c++/85464, c++/85470, c/85365, debug/83157, debug/84637,
- debug/85302, fortran/81773, fortran/83606, fortran/85387, ipa/84149,
- ipa/85329, ipa/85391, ipa/85421, jit/85384, libgcc/85334,
- libgcc/85379, libgomp/85463, libstdc++/84442, libstdc++/85442,
- lto/71991, lto/81968, lto/85339, lto/85371, lto/85391, lto/85405,
- middle-end/81657, middle-end/84955, middle-end/85414,
- middle-end/85455, middle-end/85475, middle-end/85496, objc/85476,
- rtl-optimization/79916, rtl-optimization/83852,
- rtl-optimization/84566, rtl-optimization/84659,
- rtl-optimization/85342, rtl-optimization/85354,
- rtl-optimization/85376, rtl-optimization/85393,
- rtl-optimization/85423, rtl-optimization/85431, sanitizer/85230,
- sanitizer/85389, target/81084, target/83402, target/83660,
- target/84301, target/84331, target/85080, target/85238, target/85261,
- target/85281, target/85287, target/85291, target/85293, target/85296,
- target/85321, target/85328, target/85347, target/85388, target/85397,
- target/85403, target/85404, target/85417, target/85424, target/85430,
- target/85445, target/85456, target/85469, target/85485, target/85489,
- target/85491, target/85503, target/85508, target/85511,
- testsuite/85326, testsuite/85346, testsuite/85483,
- tree-optimization/82965, tree-optimization/83991,
- tree-optimization/84737, tree-optimization/85331,
- tree-optimization/85446, tree-optimization/85467,
- tree-optimization/85478
-- temporarily readd -mcet as alias to -mshstk
-
-* Tue Apr 10 2018 Jakub Jelinek 8.0.1-0.21
-- update from the trunk
- - PRs c++/24314, c++/64095, c++/65923, c++/80026, c++/80956, c++/82152,
- c++/83808, c++/84221, c++/84269, c++/84606, c++/84632, c++/84665,
- c++/84768, c++/84791, c++/84792, c++/84936, c++/84938, c++/84943,
- c++/84968, c++/84973, c++/84979, c++/85006, c++/85021, c++/85027,
- c++/85028, c++/85049, c++/85060, c++/85061, c++/85062, c++/85067,
- c++/85068, c++/85076, c++/85077, c++/85092, c++/85093, c++/85108,
- c++/85110, c++/85113, c++/85118, c++/85133, c++/85134, c++/85135,
- c++/85136, c++/85140, c++/85141, c++/85146, c++/85147, c++/85148,
- c++/85149, c++/85194, c++/85200, c++/85208, c++/85209, c++/85210,
- c++/85214, c++/85215, c++/85227, c++/85228, c++/85240, c++/85242,
- c++/85256, c++/85262, c++/85264, c++/85277, c++/85279, c++/85285,
- c++/85312, c/85094, debug/65821, debug/85252, fortran/42651,
- fortran/51260, fortran/66709, fortran/69497, fortran/70068,
- fortran/83064, fortran/84924, fortran/85083, fortran/85084,
- fortran/85102, fortran/85111, fortran/85130, fortran/85313, gas/22318,
- inline-asm/84985, inline-asm/85172, ipa/84947, libfortran/85166,
- libfortran/85253, libstdc++/85183, libstdc++/85222, lto/84995,
- lto/85078, lto/85176, lto/85248, middle-end/82976, middle-end/84067,
- middle-end/85090, middle-end/85180, middle-end/85195,
- middle-end/85244, other/84819, other/85161, rtl-optimization/80463,
- rtl-optimization/83480, rtl-optimization/83530,
- rtl-optimization/83913, rtl-optimization/83962,
- rtl-optimization/83972, rtl-optimization/84058,
- rtl-optimization/84872, rtl-optimization/84878,
- rtl-optimization/85167, sanitizer/85081, sanitizer/85174,
- sanitizer/85213, target/80546, target/81863, target/83009,
- target/83315, target/83822, target/84041, target/84413, target/84912,
- target/84914, target/85044, target/85056, target/85073, target/85095,
- target/85100, target/85126, target/85169, target/85173, target/85177,
- target/85193, target/85196, target/85203, target/85204, target/85255,
- testsuite/82847, testsuite/83462, testsuite/84004, testsuite/85066,
- testsuite/85154, testsuite/85189, testsuite/85190, testsuite/85191,
- tree-optimization/80021, tree-optimization/82004,
- tree-optimization/84005, tree-optimization/84818,
- tree-optimization/85063, tree-optimization/85082,
- tree-optimization/85156, tree-optimization/85168,
- tree-optimization/85257, tree-optimization/85284,
- tree-optimization/85286
-- fix combine ICE with -g (PR rtl-optimization/85300)
-
-* Sat Mar 24 2018 Jakub Jelinek 8.0.1-0.20
-- update from the trunk
- - PRs ada/85007, ada/85036, bootstrap/84856, c++/71251, c++/71638,
- c++/71834, c++/71965, c++/78489, c++/81311, c++/84610, c++/84642,
- c++/84729, c++/84789, c++/84804, c++/84812, c++/84835, c++/84836,
- c++/84850, c++/84854, c++/84892, c++/84925, c++/84927, c++/84937,
- c++/84942, c++/84961, c++/84962, c++/84970, c++/84972, c++/84978,
- c++/84994, c++/85008, c++/85015, c++/85033, c++/85045, c/80778,
- c/84953, c/84999, debug/84875, debug/85020, fortran/65453,
- fortran/77414, fortran/79929, fortran/84615, fortran/84922,
- fortran/84931, fortran/84957, fortran/85001, inline-asm/84941,
- inline-asm/85022, inline-asm/85030, inline-asm/85034, ipa/84825,
- ipa/84963, libstdc++/77691, libstdc++/84998, rtl-optimization/84635,
- rtl-optimization/84643, rtl-optimization/84989, sanitizer/78651,
- sanitizer/84761, sanitizer/85018, sanitizer/85029, target/81647,
- target/82518, target/82989, target/83789, target/84760, target/84826,
- target/84838, target/84845, target/84945, target/84952, target/84954,
- target/84986, target/84988, target/84990, target/85025, target/85026,
- tree-optimization/83126, tree-optimization/84811,
- tree-optimization/84859, tree-optimization/84913,
- tree-optimization/84929, tree-optimization/84933,
- tree-optimization/84946, tree-optimization/84956,
- tree-optimization/84960, tree-optimization/84969,
- tree-optimization/84982
- - fix std::less etc. (#1559171, PR libstdc++/85040)
-
-* Sat Mar 17 2018 Jakub Jelinek 8.0.1-0.19
-- update from the trunk
- - PRs ada/82813, c++/79085, c++/79937, c++/80227, c++/81236, c++/82336,
- c++/82410, c++/82565, c++/83911, c++/83916, c++/83937, c++/84222,
- c++/84720, c++/84798, c++/84801, c++/84820, c++/84839, c++/84843,
- c++/84874, c++/84906, c/46921, c/84852, c/84853, c/84873, c/84909,
- c/84910, fortran/61775, fortran/69395, fortran/78741, ipa/84658,
- ipa/84722, ipa/84805, ipa/84833, libgfortran/84880, libstdc++/78420,
- libstdc++/83662, libstdc++/84773, lto/84805, middle-end/84831,
- middle-end/84834, sanitizer/83392, target/68256, target/78090,
- target/83451, target/84574, target/84711, target/84743, target/84827,
- target/84828, target/84844, target/84860, target/84876, target/84899,
- target/84902, tree-optimization/84725, tree-optimization/84830,
- tree-optimization/84841
-
-* Mon Mar 12 2018 Jakub Jelinek 8.0.1-0.18
-- update from the trunk
- - PRs c++/84355, c++/84802, c++/84813, debug/58150, fortran/83939,
- fortran/84546, rtl-optimization/84780, tree-optimization/83456,
- tree-optimization/84777, tree-optimization/84803
-- add pconfigintrin.h and wbnoinvdintrin.h headers (#1554279)
-- fix -march=knl from emitting AVX512VL instructions (PR target/84786)
-- fix C++ constexpr RANGE_EXPR splitting (PR c++/84808)
-
-* Sat Mar 10 2018 Jakub Jelinek 8.0.1-0.17
-- update from the trunk
- - PRs c++/61135, c++/61358, c++/67370, c++/70468, c++/71169, c++/71464,
- c++/71546, c++/71569, c++/71784, c++/71832, c++/79410, c++/80598,
- c++/81812, c++/82022, c++/83503, c++/83692, c++/83871, c++/84015,
- c++/84076, c++/84171, c++/84231, c++/84294, c++/84325, c++/84424,
- c++/84426, c++/84434, c++/84441, c++/84447, c++/84489, c++/84492,
- c++/84493, c++/84497, c++/84520, c++/84533, c++/84537, c++/84540,
- c++/84551, c++/84556, c++/84557, c++/84558, c++/84559, c++/84560,
- c++/84578, c++/84582, c++/84590, c++/84593, c++/84596, c++/84602,
- c++/84609, c++/84618, c++/84639, c++/84662, c++/84663, c++/84664,
- c++/84684, c++/84686, c++/84694, c++/84702, c++/84704, c++/84707,
- c++/84708, c++/84724, c++/84726, c++/84733, c++/84752, c++/84767,
- c++/84770, c++/84785, c/84721, debug/83917, debug/84404, debug/84408,
- debug/84456, debug/84545, debug/84620, debug/84645, fortran/30792,
- fortran/32957, fortran/51434, fortran/56667, fortran/59781,
- fortran/64107, fortran/64124, fortran/66128, fortran/70409,
- fortran/71085, fortran/78238, fortran/80965, fortran/83148,
- fortran/83149, fortran/83633, fortran/83901, fortran/84219,
- fortran/84346, fortran/84506, fortran/84509, fortran/84511,
- fortran/84519, fortran/84523, fortran/84538, fortran/84565,
- fortran/84697, fortran/84734, gcov-profile/84548, gcov-profile/84735,
- inline-asm/84625, inline-asm/84683, inline-asm/84742, ipa/83983,
- ipa/84628, jit/64089, jit/84288, libstdc++/84532, libstdc++/84601,
- libstdc++/84671, libstdc++/84769, middle-end/84552, middle-end/84607,
- middle-end/84723, preprocessor/84517, rtl-optimization/81611,
- rtl-optimization/83327, rtl-optimization/83496,
- rtl-optimization/84528, rtl-optimization/84682, sanitizer/70875,
- sanitizer/82484, target/52991, target/56540, target/81572,
- target/82005, target/82411, target/82851, target/83193, target/83335,
- target/83399, target/83712, target/83969, target/84039, target/84176,
- target/84264, target/84277, target/84521, target/84524, target/84530,
- target/84534, target/84564, target/84575, target/84614, target/84700,
- target/84710, target/84748, target/84763, target/84772, target/84807,
- testsuite/80551, testsuite/84597, testsuite/84617, translation/84207,
- tree-optimization/83519, tree-optimization/84114,
- tree-optimization/84178, tree-optimization/84427,
- tree-optimization/84466, tree-optimization/84468,
- tree-optimization/84480, tree-optimization/84486,
- tree-optimization/84512, tree-optimization/84526,
- tree-optimization/84584, tree-optimization/84634,
- tree-optimization/84650, tree-optimization/84670,
- tree-optimization/84687, tree-optimization/84739,
- tree-optimization/84740, tree-optimization/84746,
- tree-optimization/84775
-- for f29+ require binutils >= 2.30 (#1552529)
-
-* Thu Feb 22 2018 Jakub Jelinek 8.0.1-0.16
-- update from the trunk
- - PRs c++/77655, c++/84454, c++/84496, c/84229, target/84502
- - fix store-merging (#1547495, PR tree-optimization/84503)
-
-* Tue Feb 20 2018 Jakub Jelinek 8.0.1-0.15
-- update from the trunk
- - PRs c++/84348, c++/84429, c++/84430, c++/84444, c++/84445, c++/84446,
- c++/84448, c++/84449, c++/84455, c++/84488, c/81272, c/84310,
- driver/83193, fortran/35339, fortran/48890, fortran/83823,
- middle-end/79257, middle-end/82004, middle-end/82123,
- middle-end/84095, middle-end/84406, other/80589, sanitizer/82183,
- target/79747, target/84148, target/84460, tree-optimization/81592,
- tree-optimization/82491, tree-optimization/84419,
- tree-optimization/84452
-- fix strlen value range computation (#1546964, PR tree-optimization/84478)
-
-* Sun Feb 18 2018 Jakub Jelinek 8.0.1-0.14
-- update from the trunk
- - PRs ada/84277, bootstrap/82939, bootstrap/84405, c++/79064, c++/79626,
- c++/81853, c++/82468, c++/82664, c++/82764, c++/83227, c++/83835,
- c++/83990, c++/84045, c++/84080, c++/84151, c++/84192, c++/84263,
- c++/84281, c++/84314, c++/84330, c++/84333, c++/84338, c++/84341,
- c++/84350, c++/84364, c++/84368, c++/84375, c++/84376, c++/84420,
- c++/84421, c/82210, c/84108, c/84305, debug/84319, debug/84342,
- fortran/35299, fortran/54223, fortran/68746, fortran/80945,
- fortran/84074, fortran/84270, fortran/84273, fortran/84276,
- fortran/84313, fortran/84354, fortran/84381, fortran/84385,
- fortran/84389, fortran/84409, fortran/84418, ipa/84425,
- libgfortran/84389, libgfortran/84412, libstdc++/81797,
- middle-end/83665, middle-end/84309, other/82368, preprocessor/83063,
- preprocessor/83708, rtl-optimization/70023, rtl-optimization/81443,
- rtl-optimization/83723, rtl-optimization/84169, sanitizer/84307,
- sanitizer/84340, target/79242, target/81535, target/82862,
- target/83758, target/83760, target/83831, target/83984, target/84220,
- target/84239, target/84266, target/84272, target/84279, target/84335,
- target/84336, target/84359, target/84365, target/84370, target/84372,
- tree-optimization/83698, tree-optimization/84016,
- tree-optimization/84190, tree-optimization/84321,
- tree-optimization/84334, tree-optimization/84339,
- tree-optimization/84357, tree-optimization/84383,
- tree-optimization/84399, tree-optimization/84417
-
-* Sat Feb 10 2018 Jakub Jelinek 8.0.1-0.13
-- update from the trunk
- - PRs c++/77522, c++/80567, c++/81610, c++/81917, c++/83204, c++/83659,
- c++/83806, c++/84082, c++/84182, c++/84296, c/84293, fortran/56691,
- fortran/68560, fortran/82049, fortran/82994, lto/84212, lto/84213,
- middle-end/84237, rtl-optimization/57193, rtl-optimization/83459,
- rtl-optimization/84068, rtl-optimization/84308, sanitizer/84285,
- target/81143, target/83008, target/83926, target/84113, target/84226,
- target/84300, target/PR84295, tree-optimization/84037,
- tree-optimization/84136, tree-optimization/84224,
- tree-optimization/84232, tree-optimization/84233,
- tree-optimization/84238, tree-optimization/84265,
- tree-optimization/84278
-- temporarily revert LVU stuff, until it settles down
-
-* Wed Feb 7 2018 Jakub Jelinek 8.0.1-0.12
-- update from the trunk
- - PRs c++/71662, c++/82782, c++/83796, c++/84059, c++/84125, c++/84126,
- c++/84160, c++/84181, c/81779, fortran/83344, fortran/83705,
- fortran/83975, fortran/84094, fortran/84115, fortran/84141,
- fortran/84155, gcov-profile/83879, gcov-profile/84137, libgomp/84217,
- lto/81004, middle-end/79966, rtl-optimization/84123,
- rtl-optimization/84157, target/56010, target/79975, target/82641,
- target/83370, target/83743, target/84066, target/84089, target/84145,
- target/84154, target/84209, target/84243, target/84248, tearget/83845,
- testsuite/52641, testsuite/83846, testsuite/84243,
- tree-optimization/81635, tree-optimization/81661,
- tree-optimization/83369, tree-optimization/84117,
- tree-optimization/84204, tree-optimization/84205,
- tree-optimization/84223, tree-optimization/84225,
- tree-optimization/84228,
- - fix dom2 floating point miscompilation (#1542124,
- PR tree-optimization/84235)
-- fix go provides/requires (#1541639)
-- fix var-tracking ICE on aarch64 (#1541670, PR debug/84252)
-
-* Tue Feb 6 2018 Florian Weimer - 8.0.1-0.11
-- use generic tuning for armhfp
-
-* Mon Feb 5 2018 Richard W.M. Jones 8.0.1-0.10
-- disable multilib on riscv64.
-
-* Thu Feb 1 2018 Jeff Law 8.0.1-0.9
-- fix -fstack-clash-protection codegen issue on 32 bit x86
- (#1540221, PR target/84128)
-
-* Wed Jan 31 2018 Jakub Jelinek 8.0.1-0.8
-- update from the trunk
- - PRs c++/83993, c++/84092, c++/84138, c/84100, fortran/84088,
- fortran/84116, fortran/84134, lto/84105, preprocessor/69869,
- rtl-optimization/84071, target/82444, target/83618, target/84064,
- tree-optimization/64946, tree-optimization/84132
-- fix ICE with CET and -g (PR target/84146)
-
-* Tue Jan 30 2018 Jakub Jelinek 8.0.1-0.7
-- update from the trunk
- - PRs bootstrap/80867, bootstrap/84017, c++/68810, c++/83924, c++/83942,
- c++/83996, c++/84091, c++/84098, c/83966, fortran/84073,
- fortran/84133, ipa/81360, ipa/83179, libgomp/84096, libstdc++/83658,
- lto/83954, rtl-optimization/83986, target/40411, target/58684,
- target/83828, target/84112, testsuite/81010, tree-optimization/81611,
- tree-optimization/83008, tree-optimization/84057,
- tree-optimization/84086, tree-optimization/84111
-- fix fortran debuginfo (PR debug/84131)
-
-* Sat Jan 27 2018 Jakub Jelinek 8.0.1-0.6
-- update from the trunk
- - PRs c++/82249, c++/82514, c++/83921, c++/83947, c++/83956, c++/83974,
- c++/84031, c++/84036, c/83989, diagnostic/84034, fortran/37577,
- fortran/83866, fortran/83898, fortran/83998, fortran/84065, jit/81672,
- jit/82846, libstdc++/81076, middle-end/83055, middle-end/83977,
- middle-end/84000, middle-end/84040, other/68239,
- rtl-optimization/83985, rtl-optimization/84003, sanitizer/83987,
- target/68467, target/81352, target/81550, target/81763, target/83013,
- target/83589, target/83905, target/83994, target/84014, target/84028,
- target/84033, testsuite/83889, tree-optimization/81082,
- tree-optimization/82819, tree-optimization/83176,
- tree-optimization/83979
-
-* Tue Jan 23 2018 Jakub Jelinek 8.0.1-0.5
-- update from the trunk
- - PRs c++/81933, c++/82882, c++/83720, c++/83895, c++/83918, c++/83958,
- c++/83978, c++/83988, fortran/78534, fortran/83704, lto/81440,
- lto/83452, target/80870, target/83862, target/83946, testsuite/77734,
- testsuite/83888, tree-optimization/69452, tree-optimization/82604,
- tree-optimization/83081, tree-optimization/83510,
- tree-optimization/83940, tree-optimization/83957,
- tree-optimization/83963, tree-optimization/83965
-- fix strlen pass ICE (PR tree-optimization/83896)
-
-* Sat Jan 20 2018 Jakub Jelinek 8.0.1-0.4
-- update from the trunk
- - PRs c++/78344, c++/81013, c++/81054, c++/81167, c++/82461, c++/83160,
- c++/83287, c++/83824, c++/83897, c++/83919, c/61240, debug/81570,
- debug/83728, fortran/80768, fortran/83864, fortran/83874,
- fortran/83900, ipa/82256, ipa/83051, ipa/83619, middle-end/83945,
- middle_end/79538, other/70268, rtl-optimization/83147,
- sanitizer/81715, sanitizer/82825, target/65578, target/83790,
- target/83920, target/83930, testsuite/83882, testsuite/83883,
- testsuite/83934, tree-optimization/83887, tree-optimization/83914,
- tree-optimization/83922
-- aarch64 -fstack-clash-protection support
-
-* Wed Jan 17 2018 Jakub Jelinek 8.0.1-0.3
-- update from the trunk
- - PRs c++/72801, c++/81067, c++/81843, c++/83714, c++/83739, c++/83799,
- c++/83814, c++/83902, lto/83121, middle-end/83884,
- rtl-optimization/80481, rtl-optimization/83771, target/79041,
- target/82964, target/83546, testsuite/77734, tree-optimization/81184
-
-* Tue Jan 16 2018 Jakub Jelinek 8.0.1-0.2
-- update from the trunk
- - PRs c++/83588, c++/83817, c++/83825, c/83844, fortran/54613,
- fortran/82257, libgomp/83590, libstdc++/83833, libstdc++/83834,
- middle-end/83837, rtl-optimization/83213, rtl-optimization/86620,
- target/83839, target/83858, testsuite/82132, testsuite/83869,
- tree-optimization/83843, tree-optimization/83847,
- tree-optimization/83857, tree-optimization/83867
-
-* Mon Jan 15 2018 Jakub Jelinek 8.0.1-0.1
+* Thu Dec 18 2025 Jakub Jelinek 16.0.0-0.2
- new package
diff --git a/gcc16-Wno-format-security.patch b/gcc16-Wno-format-security.patch
new file mode 100644
index 0000000..2a4f0f3
--- /dev/null
+++ b/gcc16-Wno-format-security.patch
@@ -0,0 +1,66 @@
+2022-01-07 Jakub Jelinek
+
+ * Makefile.tpl (GOCFLAGS, GDCFLAGS): Filter out -Wformat-security.
+ * Makefile.in: Regenerated.
+
+2017-02-25 Jakub Jelinek
+
+ * configure.ac: When adding -Wno-format, also add -Wno-format-security.
+ * configure: Regenerated.
+
+--- gcc/configure.ac.jj 2017-02-13 12:20:53.000000000 +0100
++++ gcc/configure.ac 2024-11-30 13:34:11.100296256 +0100
+@@ -592,7 +592,7 @@ AC_ARG_ENABLE(build-format-warnings,
+ AS_HELP_STRING([--disable-build-format-warnings],[don't use -Wformat while building GCC]),
+ [],[enable_build_format_warnings=yes])
+ AS_IF([test $enable_build_format_warnings = no],
+- [wf_opt=-Wno-format],[wf_opt=])
++ [wf_opt="-Wno-format -Wno-format-security"],[wf_opt=])
+ ACX_PROG_CXX_WARNING_OPTS(
+ m4_quote(m4_do([-W -Wall -Wno-error=narrowing -Wwrite-strings ],
+ [-Wcast-qual $wf_opt])),
+--- gcc/configure.jj 2017-02-13 12:20:52.000000000 +0100
++++ gcc/configure 2017-02-25 12:42:50.041946391 +0100
+@@ -7077,7 +7077,7 @@ else
+ fi
+
+ if test $enable_build_format_warnings = no; then :
+- wf_opt=-Wno-format
++ wf_opt="-Wno-format -Wno-format-security"
+ else
+ wf_opt=
+ fi
+--- Makefile.tpl.jj 2023-11-29 13:21:41.680292662 +0100
++++ Makefile.tpl 2024-11-30 13:35:29.303196246 +0100
+@@ -450,10 +450,10 @@ LDFLAGS = @LDFLAGS@
+ LIBCFLAGS = $(CFLAGS)
+ CXXFLAGS = @CXXFLAGS@
+ LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
+-GOCFLAGS = $(CFLAGS)
+-A68FLAGS = @A68FLAGS@
+-GDCFLAGS = @GDCFLAGS@
+-GM2FLAGS = $(CFLAGS)
++GOCFLAGS = $(filter-out -Wformat-security,$(CFLAGS))
++A68FLAGS = $(filter-out -Wformat-security,@A68FLAGS@)
++GDCFLAGS = $(filter-out -Wformat-security,@GDCFLAGS@)
++GM2FLAGS = $(filter-out -Wformat-security,$(CFLAGS))
+
+ CRAB1_LIBS = @CRAB1_LIBS@
+
+--- Makefile.in.jj 2023-11-29 13:21:41.691292507 +0100
++++ Makefile.in 2024-11-30 13:36:12.113594079 +0100
+@@ -447,10 +447,10 @@ LDFLAGS = @LDFLAGS@
+ LIBCFLAGS = $(CFLAGS)
+ CXXFLAGS = @CXXFLAGS@
+ LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
+-GOCFLAGS = $(CFLAGS)
+-A68FLAGS = @A68FLAGS@
+-GDCFLAGS = @GDCFLAGS@
+-GM2FLAGS = $(CFLAGS)
++GOCFLAGS = $(filter-out -Wformat-security,$(CFLAGS))
++A68FLAGS = $(filter-out -Wformat-security,@A68FLAGS@)
++GDCFLAGS = $(filter-out -Wformat-security,@GDCFLAGS@)
++GM2FLAGS = $(filter-out -Wformat-security,$(CFLAGS))
+
+ CRAB1_LIBS = @CRAB1_LIBS@
+
diff --git a/gcc16-d-shared-libphobos.patch b/gcc16-d-shared-libphobos.patch
new file mode 100644
index 0000000..6384bbb
--- /dev/null
+++ b/gcc16-d-shared-libphobos.patch
@@ -0,0 +1,20 @@
+2019-01-17 Jakub Jelinek
+
+ * d-spec.cc (lang_specific_driver): Make -shared-libphobos
+ the default rather than -static-libphobos.
+
+--- gcc/d/d-spec.cc.jj 2019-01-01 12:37:49.502444257 +0100
++++ gcc/d/d-spec.cc 2019-01-17 17:09:45.364949246 +0100
+@@ -408,9 +408,9 @@ lang_specific_driver (cl_decoded_option
+ /* Add `-lgphobos' if we haven't already done so. */
+ if (phobos_library != PHOBOS_NOLINK)
+ {
+- /* Default to static linking. */
+- if (phobos_library != PHOBOS_DYNAMIC)
+- phobos_library = PHOBOS_STATIC;
++ /* Default to shared linking. */
++ if (phobos_library != PHOBOS_STATIC)
++ phobos_library = PHOBOS_DYNAMIC;
+
+ #ifdef HAVE_LD_STATIC_DYNAMIC
+ if (phobos_library == PHOBOS_STATIC && !static_link)
diff --git a/gcc16-fortran-fdec-duplicates.patch b/gcc16-fortran-fdec-duplicates.patch
new file mode 100644
index 0000000..5298baa
--- /dev/null
+++ b/gcc16-fortran-fdec-duplicates.patch
@@ -0,0 +1,215 @@
+From 23b1fcb104c666429451ffaf936f8da5fcd3d43a Mon Sep 17 00:00:00 2001
+From: Mark Eggleston
+Date: Fri, 22 Jan 2021 12:29:47 +0000
+Subject: [PATCH 01/10] Allow duplicate declarations.
+
+Enabled by -fdec-duplicates and -fdec.
+
+Some fixes by Jim MacArthur
+Addition of -fdec-duplicates by Mark Eggleston
+---
+ gcc/fortran/lang.opt | 4 ++++
+ gcc/fortran/options.cc | 1 +
+ gcc/fortran/symbol.cc | 21 +++++++++++++++++--
+ .../gfortran.dg/duplicate_type_4.f90 | 13 ++++++++++++
+ .../gfortran.dg/duplicate_type_5.f90 | 13 ++++++++++++
+ .../gfortran.dg/duplicate_type_6.f90 | 13 ++++++++++++
+ .../gfortran.dg/duplicate_type_7.f90 | 13 ++++++++++++
+ .../gfortran.dg/duplicate_type_8.f90 | 12 +++++++++++
+ .../gfortran.dg/duplicate_type_9.f90 | 12 +++++++++++
+ 9 files changed, 100 insertions(+), 2 deletions(-)
+ create mode 100644 gcc/testsuite/gfortran.dg/duplicate_type_4.f90
+ create mode 100644 gcc/testsuite/gfortran.dg/duplicate_type_5.f90
+ create mode 100644 gcc/testsuite/gfortran.dg/duplicate_type_6.f90
+ create mode 100644 gcc/testsuite/gfortran.dg/duplicate_type_7.f90
+ create mode 100644 gcc/testsuite/gfortran.dg/duplicate_type_8.f90
+ create mode 100644 gcc/testsuite/gfortran.dg/duplicate_type_9.f90
+
+diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt
+index 2b1977c523b..52bd522051e 100644
+--- a/gcc/fortran/lang.opt
++++ b/gcc/fortran/lang.opt
+@@ -469,6 +469,10 @@ Fortran Var(flag_dec_char_conversions)
+ Enable the use of character literals in assignments and data statements
+ for non-character variables.
+
++fdec-duplicates
++Fortran Var(flag_dec_duplicates)
++Allow varibles to be duplicated in the type specification matches.
++
+ fdec-include
+ Fortran Var(flag_dec_include)
+ Enable legacy parsing of INCLUDE as statement.
+diff --git a/gcc/fortran/options.cc b/gcc/fortran/options.cc
+index 3a0b98bf1ec..f19ba87f8a0 100644
+--- a/gcc/fortran/options.cc
++++ b/gcc/fortran/options.cc
+@@ -77,6 +77,7 @@ set_dec_flags (int value)
+ SET_BITFLAG (flag_dec_format_defaults, value, value);
+ SET_BITFLAG (flag_dec_blank_format_item, value, value);
+ SET_BITFLAG (flag_dec_char_conversions, value, value);
++ SET_BITFLAG (flag_dec_duplicates, value, value);
+ }
+
+ /* Finalize DEC flags. */
+diff --git a/gcc/fortran/symbol.cc b/gcc/fortran/symbol.cc
+index 3b988d1be22..9843175cc2a 100644
+--- a/gcc/fortran/symbol.cc
++++ b/gcc/fortran/symbol.cc
+@@ -1995,6 +1995,8 @@ gfc_add_type (gfc_symbol *sym, gfc_typespec *ts, locus *where)
+ if (sym->attr.result && type == BT_UNKNOWN && sym->ns->proc_name)
+ type = sym->ns->proc_name->ts.type;
+
++ flavor = sym->attr.flavor;
++
+ if (type != BT_UNKNOWN && !(sym->attr.function && sym->attr.implicit_type)
+ && !(gfc_state_stack->previous && gfc_state_stack->previous->previous
+ && gfc_state_stack->previous->previous->state == COMP_SUBMODULE)
+@@ -2007,6 +2009,23 @@ gfc_add_type (gfc_symbol *sym, gfc_typespec *ts, locus *where)
+ else if (sym->attr.function && sym->attr.result)
+ gfc_error ("Symbol %qs at %L already has basic type of %s",
+ sym->ns->proc_name->name, where, gfc_basic_typename (type));
++ else if (flag_dec_duplicates)
++ {
++ /* Ignore temporaries and class/procedure names */
++ if (sym->ts.type == BT_DERIVED || sym->ts.type == BT_CLASS
++ || sym->ts.type == BT_PROCEDURE)
++ return false;
++
++ if (gfc_compare_types (&sym->ts, ts)
++ && (flavor == FL_UNKNOWN || flavor == FL_VARIABLE
++ || flavor == FL_PROCEDURE))
++ {
++ return gfc_notify_std (GFC_STD_LEGACY,
++ "Symbol '%qs' at %L already has "
++ "basic type of %s", sym->name, where,
++ gfc_basic_typename (type));
++ }
++ }
+ else
+ gfc_error ("Symbol %qs at %L already has basic type of %s", sym->name,
+ where, gfc_basic_typename (type));
+@@ -2020,8 +2039,6 @@ gfc_add_type (gfc_symbol *sym, gfc_typespec *ts, locus *where)
+ return false;
+ }
+
+- flavor = sym->attr.flavor;
+-
+ if (flavor == FL_PROGRAM || flavor == FL_BLOCK_DATA || flavor == FL_MODULE
+ || flavor == FL_LABEL
+ || (flavor == FL_PROCEDURE && sym->attr.subroutine)
+diff --git a/gcc/testsuite/gfortran.dg/duplicate_type_4.f90 b/gcc/testsuite/gfortran.dg/duplicate_type_4.f90
+new file mode 100644
+index 00000000000..cdd29ea8846
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/duplicate_type_4.f90
+@@ -0,0 +1,13 @@
++! { dg-do compile }
++! { dg-options "-std=f95" }
++
++! PR fortran/30239
++! Check for errors when a symbol gets declared a type twice, even if it
++! is the same.
++
++INTEGER FUNCTION foo ()
++ IMPLICIT NONE
++ INTEGER :: x
++ INTEGER :: x ! { dg-error "basic type of" }
++ x = 42
++END FUNCTION foo
+diff --git a/gcc/testsuite/gfortran.dg/duplicate_type_5.f90 b/gcc/testsuite/gfortran.dg/duplicate_type_5.f90
+new file mode 100644
+index 00000000000..00f931809aa
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/duplicate_type_5.f90
+@@ -0,0 +1,13 @@
++! { dg-do run }
++! { dg-options "-fdec" }
++!
++! Test case contributed by Mark Eggleston
++!
++
++program test
++ implicit none
++ integer :: x
++ integer :: x
++ x = 42
++ if (x /= 42) stop 1
++end program test
+diff --git a/gcc/testsuite/gfortran.dg/duplicate_type_6.f90 b/gcc/testsuite/gfortran.dg/duplicate_type_6.f90
+new file mode 100644
+index 00000000000..f0df27e323c
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/duplicate_type_6.f90
+@@ -0,0 +1,13 @@
++! { dg-do run }
++! { dg-options "-std=legacy -fdec-duplicates" }
++!
++! Test case contributed by Mark Eggleston
++!
++
++program test
++ implicit none
++ integer :: x
++ integer :: x
++ x = 42
++ if (x /= 42) stop 1
++end program test
+diff --git a/gcc/testsuite/gfortran.dg/duplicate_type_7.f90 b/gcc/testsuite/gfortran.dg/duplicate_type_7.f90
+new file mode 100644
+index 00000000000..f32472ff586
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/duplicate_type_7.f90
+@@ -0,0 +1,13 @@
++! { dg-do run }
++! { dg-options "-fdec-duplicates" }
++!
++! Test case contributed by Mark Eggleston
++!
++
++program test
++ implicit none
++ integer :: x
++ integer :: x! { dg-warning "Legacy Extension" }
++ x = 42
++ if (x /= 42) stop 1
++end program test
+diff --git a/gcc/testsuite/gfortran.dg/duplicate_type_8.f90 b/gcc/testsuite/gfortran.dg/duplicate_type_8.f90
+new file mode 100644
+index 00000000000..23c94add179
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/duplicate_type_8.f90
+@@ -0,0 +1,12 @@
++! { dg-do compile }
++! { dg-options "-fdec -fno-dec-duplicates" }
++!
++! Test case contributed by Mark Eggleston
++!
++
++integer function foo ()
++ implicit none
++ integer :: x
++ integer :: x ! { dg-error "basic type of" }
++ x = 42
++end function foo
+diff --git a/gcc/testsuite/gfortran.dg/duplicate_type_9.f90 b/gcc/testsuite/gfortran.dg/duplicate_type_9.f90
+new file mode 100644
+index 00000000000..d5edee4d8ee
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/duplicate_type_9.f90
+@@ -0,0 +1,12 @@
++! { dg-do compile }
++! { dg-options "-fdec-duplicates -fno-dec-duplicates" }
++!
++! Test case contributed by Mark Eggleston
++!
++
++integer function foo ()
++ implicit none
++ integer :: x
++ integer :: x ! { dg-error "basic type of" }
++ x = 42
++end function foo
+--
+2.27.0
+
diff --git a/gcc16-hack.patch b/gcc16-hack.patch
new file mode 100644
index 0000000..61331bf
--- /dev/null
+++ b/gcc16-hack.patch
@@ -0,0 +1,182 @@
+--- libada/Makefile.in.jj 2019-01-09 13:01:18.015608205 +0100
++++ libada/Makefile.in 2019-01-11 18:16:23.441726931 +0100
+@@ -71,18 +71,40 @@ version := $(shell @get_gcc_base_ver@ $(
+ libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR)
+ ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR))
+
++DEFAULTMULTIFLAGS :=
++ifeq ($(MULTISUBDIR),)
++targ:=$(subst -, ,$(target))
++arch:=$(word 1,$(targ))
++ifeq ($(words $(targ)),2)
++osys:=$(word 2,$(targ))
++else
++osys:=$(word 3,$(targ))
++endif
++ifeq ($(strip $(filter-out i%86 x86_64 powerpc% ppc% s390% sparc% linux%, $(arch) $(osys))),)
++ifeq ($(shell $(CC) $(CFLAGS) -print-multi-os-directory),../lib64)
++DEFAULTMULTIFLAGS := -m64
++else
++ifeq ($(strip $(filter-out s390%, $(arch))),)
++DEFAULTMULTIFLAGS := -m31
++else
++DEFAULTMULTIFLAGS := -m32
++endif
++endif
++endif
++endif
++
+ # exeext should not be used because it's the *host* exeext. We're building
+ # a *target* library, aren't we?!? Likewise for CC. Still, provide bogus
+ # definitions just in case something slips through the safety net provided
+ # by recursive make invocations in gcc/ada/Makefile.in
+ LIBADA_FLAGS_TO_PASS = \
+ "MAKEOVERRIDES=" \
+- "LDFLAGS=$(LDFLAGS)" \
++ "LDFLAGS=$(LDFLAGS) $(DEFAULTMULTIFLAGS)" \
+ "LN_S=$(LN_S)" \
+ "SHELL=$(SHELL)" \
+- "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS)" \
+- "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \
+- "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS)" \
++ "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
++ "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
++ "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
+ "PICFLAG_FOR_TARGET=$(PICFLAG)" \
+ "THREAD_KIND=$(THREAD_KIND)" \
+ "TRACE=$(TRACE)" \
+@@ -93,7 +115,7 @@ LIBADA_FLAGS_TO_PASS = \
+ "exeext=.exeext.should.not.be.used " \
+ 'CC=the.host.compiler.should.not.be.needed' \
+ "GCC_FOR_TARGET=$(CC)" \
+- "CFLAGS=$(CFLAGS)"
++ "CFLAGS=$(CFLAGS) $(DEFAULTMULTIFLAGS)"
+
+ .PHONY: libada gnatlib gnatlib-shared gnatlib-sjlj gnatlib-zcx osconstool
+
+--- config-ml.in.jj 2019-01-09 12:50:16.646501448 +0100
++++ config-ml.in 2019-01-11 18:16:23.442726914 +0100
+@@ -511,6 +511,8 @@ multi-do:
+ ADAFLAGS="$(ADAFLAGS) $${flags}" \
+ prefix="$(prefix)" \
+ exec_prefix="$(exec_prefix)" \
++ mandir="$(mandir)" \
++ infodir="$(infodir)" \
+ GOCFLAGS="$(GOCFLAGS) $${flags}" \
+ GDCFLAGS="$(GDCFLAGS) $${flags}" \
+ A68FLAGS="$(A68FLAGS) $${flags}" \
+--- libcpp/macro.cc.jj 2019-01-09 13:01:21.420552123 +0100
++++ libcpp/macro.cc 2024-11-30 13:16:41.163056391 +0100
+@@ -3680,8 +3680,6 @@ static cpp_macro *
+ create_iso_definition (cpp_reader *pfile)
+ {
+ bool following_paste_op = false;
+- const char *paste_op_error_msg =
+- N_("%<##%> cannot appear at either end of a macro expansion");
+ unsigned int num_extra_tokens = 0;
+ unsigned nparms = 0;
+ cpp_hashnode **params = NULL;
+@@ -3809,7 +3807,9 @@ create_iso_definition (cpp_reader *pfile
+ function-like macros, but not at the end. */
+ if (following_paste_op)
+ {
+- cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
++ cpp_error (pfile, CPP_DL_ERROR,
++ "%<##%> cannot appear at either end of a macro "
++ "expansion");
+ goto out;
+ }
+ if (!vaopt_tracker.completed ())
+@@ -3824,7 +3824,9 @@ create_iso_definition (cpp_reader *pfile
+ function-like macros, but not at the beginning. */
+ if (macro->count == 1)
+ {
+- cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
++ cpp_error (pfile, CPP_DL_ERROR,
++ "%<##%> cannot appear at either end of a macro "
++ "expansion");
+ goto out;
+ }
+
+--- libcpp/expr.cc.jj 2019-01-09 13:01:22.415535734 +0100
++++ libcpp/expr.cc 2024-11-30 13:14:52.468583689 +0100
+@@ -874,50 +874,54 @@ cpp_classify_number (cpp_reader *pfile,
+ if ((result & CPP_N_WIDTH) == CPP_N_LARGE
+ && CPP_OPTION (pfile, cpp_warn_long_long))
+ {
+- const char *message = CPP_OPTION (pfile, cplusplus)
+- ? N_("use of C++11 long long integer constant")
+- : N_("use of C99 long long integer constant");
+-
+ if (CPP_OPTION (pfile, c99))
+- cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location,
+- 0, message);
++ cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location, 0,
++ CPP_OPTION (pfile, cplusplus)
++ ? N_("use of C++11 long long integer "
++ "constant")
++ : N_("use of C99 long long integer "
++ "constant"));
+ else
+ cpp_pedwarning_with_line (pfile, CPP_W_LONG_LONG,
+- virtual_location, 0, message);
++ virtual_location, 0,
++ CPP_OPTION (pfile, cplusplus)
++ ? N_("use of C++11 long long integer "
++ "constant")
++ : N_("use of C99 long long integer "
++ "constant"));
+ }
+
+ if ((result & CPP_N_SIZE_T) == CPP_N_SIZE_T
+ && !CPP_OPTION (pfile, size_t_literals))
+- {
+- const char *message
+- = (result & CPP_N_UNSIGNED) == CPP_N_UNSIGNED
+- ? N_("use of C++23 % integer constant")
+- : N_("use of C++23 %%> integer constant");
+- cpp_warning_with_line (pfile, CPP_W_SIZE_T_LITERALS,
+- virtual_location, 0, message);
+- }
++ cpp_warning_with_line (pfile, CPP_W_SIZE_T_LITERALS,
++ virtual_location, 0,
++ (result & CPP_N_UNSIGNED) == CPP_N_UNSIGNED
++ ? N_("use of C++23 % integer "
++ "constant")
++ : N_("use of C++23 %%> "
++ "integer constant"));
+
+ if ((result & CPP_N_BITINT) != 0
+ && CPP_OPTION (pfile, cpp_warn_c11_c23_compat) != 0)
+ {
+ if (CPP_OPTION (pfile, cpp_warn_c11_c23_compat) > 0)
+ {
+- const char *message = N_("ISO C does not support literal "
+- "% suffixes before C23");
+ if (CPP_PEDANTIC (pfile) && !CPP_OPTION (pfile, true_false))
+ cpp_pedwarning_with_line (pfile, CPP_W_C11_C23_COMPAT,
+- virtual_location, 0, message);
++ virtual_location, 0,
++ "ISO C does not support literal "
++ "% suffixes before C23");
+ else
+ cpp_warning_with_line (pfile, CPP_W_C11_C23_COMPAT,
+- virtual_location, 0, message);
+- }
+- else if (!CPP_OPTION (pfile, true_false))
+- {
+- const char *message = N_("ISO C does not support literal "
++ virtual_location, 0,
++ "ISO C does not support literal "
+ "% suffixes before C23");
+- cpp_pedwarning_with_line (pfile, CPP_W_PEDANTIC,
+- virtual_location, 0, message);
+ }
++ else if (!CPP_OPTION (pfile, true_false))
++ cpp_pedwarning_with_line (pfile, CPP_W_PEDANTIC,
++ virtual_location, 0,
++ "ISO C does not support literal "
++ "% suffixes before C23");
+ }
+
+ result |= CPP_N_INTEGER;
diff --git a/gcc8-isl-dl.patch b/gcc16-isl-dl.patch
similarity index 96%
rename from gcc8-isl-dl.patch
rename to gcc16-isl-dl.patch
index 46d3b0d..dc0c49b 100644
--- a/gcc8-isl-dl.patch
+++ b/gcc16-isl-dl.patch
@@ -1,15 +1,15 @@
--- gcc/Makefile.in.jj 2015-06-06 10:00:25.000000000 +0200
+++ gcc/Makefile.in 2015-11-04 14:56:02.643536437 +0100
-@@ -1046,7 +1046,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
+@@ -1063,7 +1063,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
# and the system's installed libraries.
LIBS = @LIBS@ libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBBACKTRACE) \
$(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS)
-BACKENDLIBS = $(ISLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
+BACKENDLIBS = $(if $(ISLLIBS),-ldl) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
- $(ZLIB)
+ $(ZLIB) $(ZSTD_LIB)
# Any system libraries needed just for GNAT.
SYSLIBS = @GNAT_LIBEXC@
-@@ -2196,6 +2196,15 @@ $(out_object_file): $(out_file)
+@@ -2302,6 +2302,15 @@ $(out_object_file): $(out_file)
$(common_out_object_file): $(common_out_file)
$(COMPILE) $<
$(POSTCOMPILE)
@@ -26,11 +26,11 @@
# Generate header and source files from the machine description,
# and compile them.
--- gcc/graphite.h.jj 2016-01-27 12:44:06.000000000 +0100
-+++ gcc/graphite.h 2016-01-27 13:26:38.309876856 +0100
-@@ -39,6 +39,590 @@ along with GCC; see the file COPYING3.
- #include
- #include
- #include
++++ gcc/graphite.h 2022-11-03 19:14:50.369690720 +0100
+@@ -24,6 +24,591 @@ along with GCC; see the file COPYING3.
+
+ #include "sese.h"
+
+#include
+#include
+
@@ -41,15 +41,15 @@
+ DYNSYM (isl_aff_set_coefficient_si); \
+ DYNSYM (isl_aff_set_constant_si); \
+ DYNSYM (isl_aff_zero_on_domain); \
-+ DYNSYM (isl_band_free); \
-+ DYNSYM (isl_band_get_children); \
-+ DYNSYM (isl_band_get_partial_schedule); \
-+ DYNSYM (isl_band_has_children); \
-+ DYNSYM (isl_band_list_free); \
-+ DYNSYM (isl_band_list_get_band); \
-+ DYNSYM (isl_band_list_get_ctx); \
-+ DYNSYM (isl_band_list_n_band); \
-+ DYNSYM (isl_band_n_member); \
++ /* DYNSYM (isl_band_free); */ \
++ /* DYNSYM (isl_band_get_children); */ \
++ /* DYNSYM (isl_band_get_partial_schedule); */ \
++ /* DYNSYM (isl_band_has_children); */ \
++ /* DYNSYM (isl_band_list_free); */ \
++ /* DYNSYM (isl_band_list_get_band); */ \
++ /* DYNSYM (isl_band_list_get_ctx); */ \
++ /* DYNSYM (isl_band_list_n_band); */ \
++ /* DYNSYM (isl_band_n_member); */ \
+ DYNSYM (isl_basic_map_add_constraint); \
+ DYNSYM (isl_basic_map_project_out); \
+ DYNSYM (isl_basic_map_universe); \
@@ -91,7 +91,7 @@
+ DYNSYM (isl_map_is_empty); \
+ DYNSYM (isl_map_lex_ge); \
+ DYNSYM (isl_map_lex_le); \
-+ DYNSYM (isl_map_n_out); \
++ /* DYNSYM (isl_map_n_out); */ \
+ DYNSYM (isl_map_range); \
+ DYNSYM (isl_map_set_tuple_id); \
+ DYNSYM (isl_map_universe); \
@@ -124,7 +124,7 @@
+ DYNSYM (isl_pw_aff_sub); \
+ DYNSYM (isl_pw_aff_zero_set); \
+ DYNSYM (isl_schedule_free); \
-+ DYNSYM (isl_schedule_get_band_forest); \
++ /* DYNSYM (isl_schedule_get_band_forest); */ \
+ DYNSYM (isl_set_add_constraint); \
+ DYNSYM (isl_set_add_dims); \
+ DYNSYM (isl_set_apply); \
@@ -615,20 +615,21 @@
+#define isl_version (*isl_pointers__.p_isl_version)
+#define isl_options_get_on_error (*isl_pointers__.p_isl_options_get_on_error)
+#define isl_ctx_reset_error (*isl_pointers__.p_isl_ctx_reset_error)
-
++
typedef struct poly_dr *poly_dr_p;
-@@ -461,5 +1045,6 @@ extern void build_scops (vec *);
+ typedef struct poly_bb *poly_bb_p;
+@@ -448,5 +1033,6 @@ extern tree cached_scalar_evolution_in_r
extern void dot_all_sese (FILE *, vec &);
extern void dot_sese (sese_l &);
extern void dot_cfg ();
+extern const char *get_isl_version (bool);
#endif
---- gcc/graphite.c.jj 2015-11-04 14:15:32.000000000 +0100
-+++ gcc/graphite.c 2015-11-04 14:56:02.645536409 +0100
+--- gcc/graphite.cc.jj 2015-11-04 14:15:32.000000000 +0100
++++ gcc/graphite.cc 2015-11-04 14:56:02.645536409 +0100
@@ -60,6 +60,35 @@ along with GCC; see the file COPYING3.
- #include "tree-into-ssa.h"
+ #include "tree-ssa-propagate.h"
#include "graphite.h"
+__typeof (isl_pointers__) isl_pointers__;
@@ -640,7 +641,7 @@
+
+ if (isl_pointers__.inited)
+ return isl_pointers__.h != NULL;
-+ h = dlopen ("libisl.so.15", RTLD_LAZY);
++ h = dlopen ("libisl.so.23", RTLD_LAZY);
+ isl_pointers__.h = h;
+ if (h == NULL)
+ return false;
@@ -663,7 +664,7 @@
/* Print global statistics to FILE. */
static void
-@@ -365,6 +394,15 @@ graphite_transform_loops (void)
+@@ -424,6 +453,15 @@ graphite_transform_loops (void)
if (parallelized_function_p (cfun->decl))
return;
@@ -679,7 +680,7 @@
calculate_dominance_info (CDI_DOMINATORS);
/* We rely on post-dominators during merging of SESE regions so those
-@@ -455,6 +493,14 @@ graphite_transform_loops (void)
+@@ -519,6 +557,14 @@ graphite_transform_loops (void)
}
}
@@ -694,17 +695,17 @@
#else /* If isl is not available: #ifndef HAVE_isl. */
static void
---- gcc/toplev.c.jj 2017-02-19 13:02:31.000000000 +0100
-+++ gcc/toplev.c 2017-02-19 16:50:25.536301350 +0100
-@@ -94,6 +94,7 @@ along with GCC; see the file COPYING3.
+--- gcc/toplev.cc.jj 2017-02-19 13:02:31.000000000 +0100
++++ gcc/toplev.cc 2024-11-30 13:22:34.175096117 +0100
+@@ -100,6 +100,7 @@ along with GCC; see the file COPYING3.
#ifdef HAVE_isl
#include
+extern const char *get_isl_version (bool);
#endif
- static void general_init (const char *, bool);
-@@ -683,7 +684,7 @@ print_version (FILE *file, const char *i
+ static void general_init (const char *, bool, unique_argv original_argv);
+@@ -652,7 +653,7 @@ print_version (FILE *file, const char *i
#ifndef HAVE_isl
"none"
#else
diff --git a/gcc16-isl-dl2.patch b/gcc16-isl-dl2.patch
new file mode 100644
index 0000000..8d2c4d9
--- /dev/null
+++ b/gcc16-isl-dl2.patch
@@ -0,0 +1,71 @@
+2011-04-04 Jakub Jelinek
+
+ * toplev.cc (toplev_main_argv): New variable.
+ (toplev_main): Initialize it.
+ * graphite.cc (init_isl_pointers): Load libisl.so.23 from gcc's private
+ directory.
+
+--- gcc/toplev.cc.jj 2008-12-09 23:59:10.000000000 +0100
++++ gcc/toplev.cc 2024-11-30 13:26:05.085132543 +0100
+@@ -112,6 +112,8 @@ static void finalize ();
+ static void crash_signal (int) ATTRIBUTE_NORETURN;
+ static void compile_file (void);
+
++const char **toplev_main_argv;
++
+ /* Decoded options, and number of such options. */
+ struct cl_decoded_option *save_decoded_options;
+ unsigned int save_decoded_options_count;
+@@ -2296,6 +2298,8 @@ toplev::main (int argc, char **argv)
+
+ expandargv (&argc, &argv);
+
++ toplev_main_argv = CONST_CAST2 (const char **, char **, argv);
++
+ /* Initialization of GCC's environment, and diagnostics. */
+ general_init (argv[0], m_init_signals, std::move (original_argv));
+
+--- gcc/graphite.cc.jj 2010-12-01 10:24:32.000000000 -0500
++++ gcc/graphite.cc 2010-12-01 11:46:07.832118193 -0500
+@@ -64,11 +64,39 @@ __typeof (isl_pointers__) isl_pointers__
+ static bool
+ init_isl_pointers (void)
+ {
+- void *h;
++ void *h = NULL;
++ extern const char **toplev_main_argv;
++ char *buf, *p;
++ size_t len;
+
+ if (isl_pointers__.inited)
+ return isl_pointers__.h != NULL;
+- h = dlopen ("libisl.so.23", RTLD_LAZY);
++ len = progname - toplev_main_argv[0];
++ buf = XALLOCAVAR (char, len + sizeof "libisl.so.23");
++ memcpy (buf, toplev_main_argv[0], len);
++ strcpy (buf + len, "libisl.so.23");
++ len += sizeof "libisl.so.23";
++ p = strstr (buf, "/libexec/");
++ if (p != NULL)
++ {
++ while (1)
++ {
++ char *q = strstr (p + 8, "/libexec/");
++ if (q == NULL)
++ break;
++ p = q;
++ }
++ memmove (p + 4, p + 8, len - (p + 8 - buf));
++ h = dlopen (buf, RTLD_LAZY);
++ if (h == NULL)
++ {
++ len = progname - toplev_main_argv[0];
++ memcpy (buf, toplev_main_argv[0], len);
++ strcpy (buf + len, "libisl.so.23");
++ }
++ }
++ if (h == NULL)
++ h = dlopen (buf, RTLD_LAZY);
+ isl_pointers__.h = h;
+ if (h == NULL)
+ return false;
diff --git a/gcc8-libgomp-omp_h-multilib.patch b/gcc16-libgomp-omp_h-multilib.patch
similarity index 100%
rename from gcc8-libgomp-omp_h-multilib.patch
rename to gcc16-libgomp-omp_h-multilib.patch
diff --git a/gcc8-libstdc++-docs.patch b/gcc16-libstdc++-docs.patch
similarity index 69%
rename from gcc8-libstdc++-docs.patch
rename to gcc16-libstdc++-docs.patch
index e73a92b..7d2d357 100644
--- a/gcc8-libstdc++-docs.patch
+++ b/gcc16-libstdc++-docs.patch
@@ -4,21 +4,21 @@
FSF
-+ Release 8.2.1
++ Release 16.0.1
+
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation
License, Version 1.2 or any later version published by the
--- libstdc++-v3/doc/html/api.html.jj 2011-01-03 12:53:21.000000000 +0100
-+++ libstdc++-v3/doc/html/api.html 2011-01-04 18:12:01.672757784 +0100
++++ libstdc++-v3/doc/html/api.html 2024-11-30 13:30:16.607594623 +0100
@@ -20,7 +20,9 @@
member functions for the library classes, finding out what is in a
particular include file, looking at inheritance diagrams, etc.
- The API documentation, rendered into HTML, can be viewed online
+ The API documentation, rendered into HTML, can be viewed locally
-+ for the 8.2.1 release,
++ for the 16.0.1 release,
+ online
- for each GCC release
+ for each GCC release
and
-
+
diff --git a/gcc8-libtool-no-rpath.patch b/gcc16-libtool-no-rpath.patch
similarity index 87%
rename from gcc8-libtool-no-rpath.patch
rename to gcc16-libtool-no-rpath.patch
index 466c661..8429a4c 100644
--- a/gcc8-libtool-no-rpath.patch
+++ b/gcc16-libtool-no-rpath.patch
@@ -5,7 +5,7 @@ libtool sucks.
rpath="$finalize_rpath"
test "$mode" != relink && rpath="$compile_rpath$rpath"
for libdir in $rpath; do
-+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
++ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64|/usr/lib/../lib64/lp64d) continue;; esac
if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
@@ -13,7 +13,7 @@ libtool sucks.
rpath=
hardcode_libdirs=
for libdir in $compile_rpath $finalize_rpath; do
-+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
++ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64|/usr/lib/../lib64/lp64d) continue;; esac
if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
@@ -21,7 +21,7 @@ libtool sucks.
rpath=
hardcode_libdirs=
for libdir in $finalize_rpath; do
-+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
++ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64|/usr/lib/../lib64/lp64d) continue;; esac
if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
diff --git a/gcc8-no-add-needed.patch b/gcc16-no-add-needed.patch
similarity index 67%
rename from gcc8-no-add-needed.patch
rename to gcc16-no-add-needed.patch
index aa2f52d..74f5c1f 100644
--- a/gcc8-no-add-needed.patch
+++ b/gcc16-no-add-needed.patch
@@ -1,8 +1,6 @@
2010-02-08 Roland McGrath
- * config/rs6000/sysv4.h (LINK_EH_SPEC): Pass --no-add-needed to the
- linker.
- * config/gnu-user.h (LINK_EH_SPEC): Likewise.
+ * config/gnu-user.h (LINK_EH_SPEC): Pass --no-add-needed to the linker.
* config/alpha/elf.h (LINK_EH_SPEC): Likewise.
* config/ia64/linux.h (LINK_EH_SPEC): Likewise.
@@ -28,7 +26,7 @@
#define TARGET_INIT_LIBFUNCS ia64_soft_fp_init_libfuncs
--- gcc/config/gnu-user.h.jj 2011-01-03 12:53:03.739057299 +0100
+++ gcc/config/gnu-user.h 2011-01-04 18:14:10.932814884 +0100
-@@ -133,7 +133,7 @@ see the files COPYING3 and COPYING.RUNTI
+@@ -106,7 +106,7 @@ see the files COPYING3 and COPYING.RUNTI
#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC
#if defined(HAVE_LD_EH_FRAME_HDR)
@@ -36,15 +34,4 @@
+#define LINK_EH_SPEC "--no-add-needed %{!static|static-pie:--eh-frame-hdr} "
#endif
- #undef LINK_GCC_C_SEQUENCE_SPEC
---- gcc/config/rs6000/sysv4.h.jj 2011-01-03 13:02:18.255994215 +0100
-+++ gcc/config/rs6000/sysv4.h 2011-01-04 18:14:10.933888871 +0100
-@@ -816,7 +816,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF
- -dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}"
- #if defined(HAVE_LD_EH_FRAME_HDR)
--# define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} "
-+# define LINK_EH_SPEC "--no-add-needed %{!static|static-pie:--eh-frame-hdr} "
- #endif
-
- #define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \
diff --git a/gcc16-pr119006.patch b/gcc16-pr119006.patch
new file mode 100644
index 0000000..dfbdaa9
--- /dev/null
+++ b/gcc16-pr119006.patch
@@ -0,0 +1,76 @@
+2025-02-27 Jakub Jelinek
+
+ PR ipa/119006
+ * ipa-icf-gimple.cc (func_checker::compare_operand): If t1 and t2
+ are ADDR_EXPRs, call operand_equal_p on their operands rather than on
+ the ADDR_EXPRs themselves. Formatting fix.
+
+ * g++.dg/opt/pr119006.C: New test.
+
+--- gcc/ipa-icf-gimple.cc.jj 2025-02-01 00:50:02.080774328 +0100
++++ gcc/ipa-icf-gimple.cc 2025-02-27 14:35:19.931183246 +0100
+@@ -437,12 +437,23 @@ func_checker::compare_operand (tree t1,
+ ("compare_ao_refs failed (dependence clique difference)");
+ gcc_unreachable ();
+ }
++ else if (TREE_CODE (t1) == ADDR_EXPR && TREE_CODE (t2) == ADDR_EXPR)
++ {
++ /* For ADDR_EXPR compare the operands of the ADDR_EXPR rather than
++ the ADDR_EXPRs themselves. operand_equal_p will compare the
++ operands with OEP_ADDRESS_OF and only care about the value
++ of the ADDR_EXPR, rather than e.g. types of MEM_REFs in there.
++ Some optimizations use such details though, see PR119006. */
++ if (operand_equal_p (TREE_OPERAND (t1, 0), TREE_OPERAND (t2, 0),
++ OEP_MATCH_SIDE_EFFECTS))
++ return true;
++ return return_false_with_msg ("operand_equal_p failed");
++ }
+ else
+ {
+ if (operand_equal_p (t1, t2, OEP_MATCH_SIDE_EFFECTS))
+ return true;
+- return return_false_with_msg
+- ("operand_equal_p failed");
++ return return_false_with_msg ("operand_equal_p failed");
+ }
+ }
+
+--- gcc/testsuite/g++.dg/opt/pr119006.C.jj 2025-02-27 14:37:05.952707350 +0100
++++ gcc/testsuite/g++.dg/opt/pr119006.C 2025-02-27 14:36:29.251218260 +0100
+@@ -0,0 +1,36 @@
++// PR ipa/119006
++// { dg-do run { target c++11 } }
++// { dg-options "-O2 -fwhole-program" }
++
++struct A {
++ bool operator== (const char *x) const { return x && !__builtin_strcmp (a, x); }
++ char a[11];
++};
++
++struct B {
++ bool operator== (const char *x) const { return x && !__builtin_strcmp (a, x); }
++ bool operator!= (const char *x) const { return !(*this == x); }
++ char a[128];
++};
++
++[[gnu::noinline,gnu::used]] int
++foo (const A& lhs, const char* rhs)
++{
++ return lhs == rhs;
++}
++
++constexpr const char *t = "abcdefghijklmno";
++
++[[gnu::noinline,gnu::used]] void
++bar (B x)
++{
++ if (x != t) __builtin_abort ();
++}
++
++int
++main ()
++{
++ B b;
++ __builtin_strcpy (b.a, t);
++ bar (b);
++}
diff --git a/gcc16-pr123273.patch b/gcc16-pr123273.patch
new file mode 100644
index 0000000..987f6e0
--- /dev/null
+++ b/gcc16-pr123273.patch
@@ -0,0 +1,54 @@
+2026-01-06 Jakub Jelinek
+
+ PR preprocessor/123273
+ * lex.cc (cpp_directive_only_process): Only go to done_comment
+ for '/' if star is true and esc is false. When seeing '\\' with
+ esc set to true, clear esc as well as star instead of keeping esc
+ set.
+
+ * c-c++-common/cpp/dir-only-10.c: New test.
+ * c-c++-common/cpp/dir-only-11.c: New test.
+
+--- libcpp/lex.cc.jj 2026-01-02 09:56:10.417332292 +0100
++++ libcpp/lex.cc 2026-01-05 16:40:26.413766032 +0100
+@@ -5461,7 +5461,13 @@ cpp_directive_only_process (cpp_reader *
+ switch (c)
+ {
+ case '\\':
+- esc = true;
++ if (esc)
++ {
++ star = false;
++ esc = false;
++ }
++ else
++ esc = true;
+ break;
+
+ case '\r':
+@@ -5492,7 +5498,7 @@ cpp_directive_only_process (cpp_reader *
+ break;
+
+ case '/':
+- if (star)
++ if (star && !esc)
+ goto done_comment;
+ /* FALLTHROUGH */
+
+--- gcc/testsuite/c-c++-common/cpp/dir-only-10.c.jj 2026-01-05 17:04:26.144566116 +0100
++++ gcc/testsuite/c-c++-common/cpp/dir-only-10.c 2026-01-05 17:05:02.226946201 +0100
+@@ -0,0 +1,5 @@
++/* PR preprocessor/123273 */
++/* { dg-do preprocess } */
++/* { dg-options -fdirectives-only } */
++
++/* *\/""" */
+--- gcc/testsuite/c-c++-common/cpp/dir-only-11.c.jj 2026-01-05 17:05:18.498666647 +0100
++++ gcc/testsuite/c-c++-common/cpp/dir-only-11.c 2026-01-05 17:06:17.574651691 +0100
+@@ -0,0 +1,6 @@
++/* PR preprocessor/123273 */
++/* { dg-do preprocess } */
++/* { dg-options -fdirectives-only } */
++
++/* *\\
++/""" */
diff --git a/gcc16-rh1574936.patch b/gcc16-rh1574936.patch
new file mode 100644
index 0000000..bcc7000
--- /dev/null
+++ b/gcc16-rh1574936.patch
@@ -0,0 +1,21 @@
+crt files and statically linked libgcc objects cause false positives
+in annobin coverage, so we add the assembler flag to generate notes
+for them.
+
+The patch also adds notes to libgcc_s.so, but this is harmless because
+these notes only confer that there is no other annobin markup.
+
+2018-07-25 Florian Weimer
+
+ * config/t-linux (LIBGCC2_CFLAGS, CRTSTUFF_CFLAGS): Add
+ -Wa,--generate-missing-build-notes=yes.
+
+--- libgcc/config/t-linux 2022-12-15 19:25:20.581394950 +0100
++++ libgcc/config/t-linux 2023-03-21 22:00:37.054478562 +0100
+@@ -1,3 +1,6 @@
+ # Override t-slibgcc-elf-ver to export some libgcc symbols with
+ # the symbol versions that glibc used.
+ SHLIB_MAPFILES += $(srcdir)/config/libgcc-glibc.ver
++
++LIBGCC2_CFLAGS += -Wa,--generate-missing-build-notes=yes
++CRTSTUFF_CFLAGS += -Wa,--generate-missing-build-notes=yes
diff --git a/gcc8-sparc-config-detection.patch b/gcc16-sparc-config-detection.patch
similarity index 77%
rename from gcc8-sparc-config-detection.patch
rename to gcc16-sparc-config-detection.patch
index bb06b35..bbe8ec3 100644
--- a/gcc8-sparc-config-detection.patch
+++ b/gcc16-sparc-config-detection.patch
@@ -1,21 +1,21 @@
--- gcc/config.gcc.jj 2008-04-24 15:42:46.000000000 -0500
+++ gcc/config.gcc 2008-04-24 15:44:51.000000000 -0500
-@@ -2790,7 +2790,7 @@ sparc-*-rtems*)
- tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
+@@ -3330,7 +3330,7 @@ sparc-*-rtems*)
+ tm_file="${tm_file} elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems"
;;
-sparc-*-linux*)
+sparc-*-linux* | sparcv9-*-linux*)
- tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
+ tm_file="${tm_file} elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
extra_options="${extra_options} sparc/long-double-switch.opt"
case ${target} in
-@@ -2844,7 +2844,7 @@ sparc64-*-rtems*)
+@@ -3384,7 +3384,7 @@ sparc64-*-rtems*)
extra_options="${extra_options}"
tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems-64"
;;
-sparc64-*-linux*)
+sparc64*-*-linux*)
- tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/default64.h sparc/linux64.h sparc/tso.h"
+ tm_file="sparc/biarch64.h ${tm_file} elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/default64.h sparc/linux64.h sparc/tso.h"
extra_options="${extra_options} sparc/long-double-switch.opt"
tmake_file="${tmake_file} sparc/t-sparc sparc/t-linux64"
--- libgcc/config.host.jj 2008-04-24 15:46:19.000000000 -0500
diff --git a/gcc8-Wno-format-security.patch b/gcc8-Wno-format-security.patch
deleted file mode 100644
index cb21e5d..0000000
--- a/gcc8-Wno-format-security.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-2017-02-25 Jakub Jelinek
-
- * configure.ac: When adding -Wno-format, also add -Wno-format-security.
- * configure: Regenerated.
-
---- gcc/configure.ac.jj 2017-02-13 12:20:53.000000000 +0100
-+++ gcc/configure.ac 2017-02-25 12:42:32.859175403 +0100
-@@ -481,7 +481,7 @@ AC_ARG_ENABLE(build-format-warnings,
- AS_HELP_STRING([--disable-build-format-warnings],[don't use -Wformat while building GCC]),
- [],[enable_build_format_warnings=yes])
- AS_IF([test $enable_build_format_warnings = no],
-- [wf_opt=-Wno-format],[wf_opt=])
-+ [wf_opt="-Wno-format -Wno-format-security"],[wf_opt=])
- ACX_PROG_CXX_WARNING_OPTS(
- m4_quote(m4_do([-W -Wall -Wno-narrowing -Wwrite-strings ],
- [-Wcast-qual $wf_opt])), [loose_warn])
---- gcc/configure.jj 2017-02-13 12:20:52.000000000 +0100
-+++ gcc/configure 2017-02-25 12:42:50.041946391 +0100
-@@ -6647,7 +6647,7 @@ else
- fi
-
- if test $enable_build_format_warnings = no; then :
-- wf_opt=-Wno-format
-+ wf_opt="-Wno-format -Wno-format-security"
- else
- wf_opt=
- fi
diff --git a/gcc8-foffload-default.patch b/gcc8-foffload-default.patch
deleted file mode 100644
index 771e1e0..0000000
--- a/gcc8-foffload-default.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-2017-01-20 Jakub Jelinek
-
- * gcc.c (offload_targets_default): New variable.
- (process_command): Set it if -foffload is defaulted.
- (driver::maybe_putenv_OFFLOAD_TARGETS): Add OFFLOAD_TARGET_DEFAULT=1
- into environment if -foffload has been defaulted.
- * lto-wrapper.c (OFFLOAD_TARGET_DEFAULT_ENV): Define.
- (compile_images_for_offload_targets): If OFFLOAD_TARGET_DEFAULT
- is in the environment, don't fail if corresponding mkoffload
- can't be found. Free and clear offload_names if no valid offload
- is found.
-libgomp/
- * target.c (gomp_load_plugin_for_device): If a plugin can't be
- dlopened, assume it has no devices silently.
-
---- gcc/gcc.c.jj 2017-01-17 10:28:40.000000000 +0100
-+++ gcc/gcc.c 2017-01-20 16:26:29.649962902 +0100
-@@ -290,6 +290,10 @@ static const char *spec_host_machine = D
-
- static char *offload_targets = NULL;
-
-+/* Set to true if -foffload has not been used and offload_targets
-+ is set to the configured in default. */
-+static bool offload_targets_default;
-+
- /* Nonzero if cross-compiling.
- When -b is used, the value comes from the `specs' file. */
-
-@@ -4457,7 +4461,10 @@ process_command (unsigned int decoded_op
- /* If the user didn't specify any, default to all configured offload
- targets. */
- if (ENABLE_OFFLOADING && offload_targets == NULL)
-- handle_foffload_option (OFFLOAD_TARGETS);
-+ {
-+ handle_foffload_option (OFFLOAD_TARGETS);
-+ offload_targets_default = true;
-+ }
-
- if (output_file
- && strcmp (output_file, "-") != 0
-@@ -7693,6 +7700,8 @@ driver::maybe_putenv_OFFLOAD_TARGETS ()
- obstack_grow (&collect_obstack, offload_targets,
- strlen (offload_targets) + 1);
- xputenv (XOBFINISH (&collect_obstack, char *));
-+ if (offload_targets_default)
-+ xputenv ("OFFLOAD_TARGET_DEFAULT=1");
- }
-
- free (offload_targets);
---- gcc/lto-wrapper.c.jj 2017-01-01 12:45:34.000000000 +0100
-+++ gcc/lto-wrapper.c 2017-01-20 16:34:18.294016997 +0100
-@@ -52,6 +52,7 @@ along with GCC; see the file COPYING3.
- /* Environment variable, used for passing the names of offload targets from GCC
- driver to lto-wrapper. */
- #define OFFLOAD_TARGET_NAMES_ENV "OFFLOAD_TARGET_NAMES"
-+#define OFFLOAD_TARGET_DEFAULT_ENV "OFFLOAD_TARGET_DEFAULT"
-
- enum lto_mode_d {
- LTO_MODE_NONE, /* Not doing LTO. */
-@@ -790,8 +791,10 @@ compile_images_for_offload_targets (unsi
- if (!target_names)
- return;
- unsigned num_targets = parse_env_var (target_names, &names, NULL);
-+ const char *target_names_default = getenv (OFFLOAD_TARGET_DEFAULT_ENV);
-
- int next_name_entry = 0;
-+ bool hsa_seen = false;
- const char *compiler_path = getenv ("COMPILER_PATH");
- if (!compiler_path)
- goto out;
-@@ -804,18 +807,32 @@ compile_images_for_offload_targets (unsi
- /* HSA does not use LTO-like streaming and a different compiler, skip
- it. */
- if (strcmp (names[i], "hsa") == 0)
-- continue;
-+ {
-+ hsa_seen = true;
-+ continue;
-+ }
-
- offload_names[next_name_entry]
- = compile_offload_image (names[i], compiler_path, in_argc, in_argv,
- compiler_opts, compiler_opt_count,
- linker_opts, linker_opt_count);
- if (!offload_names[next_name_entry])
-- fatal_error (input_location,
-- "problem with building target image for %s\n", names[i]);
-+ {
-+ if (target_names_default != NULL)
-+ continue;
-+ fatal_error (input_location,
-+ "problem with building target image for %s\n",
-+ names[i]);
-+ }
- next_name_entry++;
- }
-
-+ if (next_name_entry == 0 && !hsa_seen)
-+ {
-+ free (offload_names);
-+ offload_names = NULL;
-+ }
-+
- out:
- free_array_of_ptrs ((void **) names, num_targets);
- }
---- libgomp/target.c.jj 2017-01-01 12:45:52.000000000 +0100
-+++ libgomp/target.c 2017-01-20 20:12:13.756710875 +0100
-@@ -2356,7 +2356,7 @@ gomp_load_plugin_for_device (struct gomp
-
- void *plugin_handle = dlopen (plugin_name, RTLD_LAZY);
- if (!plugin_handle)
-- goto dl_fail;
-+ return 0;
-
- /* Check if all required functions are available in the plugin and store
- their handlers. None of the symbols can legitimately be NULL,
diff --git a/gcc8-hack.patch b/gcc8-hack.patch
deleted file mode 100644
index 515173f..0000000
--- a/gcc8-hack.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- libada/Makefile.in.jj 2009-01-14 12:07:35.000000000 +0100
-+++ libada/Makefile.in 2009-01-15 14:25:33.000000000 +0100
-@@ -66,18 +66,40 @@ libsubdir := $(libdir)/gcc/$(target_nonc
- ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR))
- ADA_RTS_SUBDIR=./rts$(subst /,_,$(MULTISUBDIR))
-
-+DEFAULTMULTIFLAGS :=
-+ifeq ($(MULTISUBDIR),)
-+targ:=$(subst -, ,$(target))
-+arch:=$(word 1,$(targ))
-+ifeq ($(words $(targ)),2)
-+osys:=$(word 2,$(targ))
-+else
-+osys:=$(word 3,$(targ))
-+endif
-+ifeq ($(strip $(filter-out i%86 x86_64 powerpc% ppc% s390% sparc% linux%, $(arch) $(osys))),)
-+ifeq ($(shell $(CC) $(CFLAGS) -print-multi-os-directory),../lib64)
-+DEFAULTMULTIFLAGS := -m64
-+else
-+ifeq ($(strip $(filter-out s390%, $(arch))),)
-+DEFAULTMULTIFLAGS := -m31
-+else
-+DEFAULTMULTIFLAGS := -m32
-+endif
-+endif
-+endif
-+endif
-+
- # exeext should not be used because it's the *host* exeext. We're building
- # a *target* library, aren't we?!? Likewise for CC. Still, provide bogus
- # definitions just in case something slips through the safety net provided
- # by recursive make invocations in gcc/ada/Makefile.in
- LIBADA_FLAGS_TO_PASS = \
- "MAKEOVERRIDES=" \
-- "LDFLAGS=$(LDFLAGS)" \
-+ "LDFLAGS=$(LDFLAGS) $(DEFAULTMULTIFLAGS)" \
- "LN_S=$(LN_S)" \
- "SHELL=$(SHELL)" \
-- "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS)" \
-- "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \
-- "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS)" \
-+ "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
-+ "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
-+ "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
- "PICFLAG_FOR_TARGET=$(PICFLAG)" \
- "THREAD_KIND=$(THREAD_KIND)" \
- "TRACE=$(TRACE)" \
-@@ -88,7 +110,7 @@ LIBADA_FLAGS_TO_PASS = \
- "exeext=.exeext.should.not.be.used " \
- 'CC=the.host.compiler.should.not.be.needed' \
- "GCC_FOR_TARGET=$(CC)" \
-- "CFLAGS=$(CFLAGS)"
-+ "CFLAGS=$(CFLAGS) $(DEFAULTMULTIFLAGS)"
-
- # Rules to build gnatlib.
- .PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared osconstool
---- config-ml.in.jj 2010-06-30 09:50:44.000000000 +0200
-+++ config-ml.in 2010-07-02 21:24:17.994211151 +0200
-@@ -511,6 +511,8 @@ multi-do:
- ADAFLAGS="$(ADAFLAGS) $${flags}" \
- prefix="$(prefix)" \
- exec_prefix="$(exec_prefix)" \
-+ mandir="$(mandir)" \
-+ infodir="$(infodir)" \
- GOCFLAGS="$(GOCFLAGS) $${flags}" \
- CXXFLAGS="$(CXXFLAGS) $${flags}" \
- LIBCFLAGS="$(LIBCFLAGS) $${flags}" \
---- libcpp/macro.c.jj 2015-01-14 11:01:34.000000000 +0100
-+++ libcpp/macro.c 2015-01-14 14:22:19.286949884 +0100
-@@ -2947,8 +2947,6 @@ create_iso_definition (cpp_reader *pfile
- cpp_token *token;
- const cpp_token *ctoken;
- bool following_paste_op = false;
-- const char *paste_op_error_msg =
-- N_("'##' cannot appear at either end of a macro expansion");
- unsigned int num_extra_tokens = 0;
-
- /* Get the first token of the expansion (or the '(' of a
-@@ -3059,7 +3057,8 @@ create_iso_definition (cpp_reader *pfile
- function-like macros, but not at the end. */
- if (following_paste_op)
- {
-- cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
-+ cpp_error (pfile, CPP_DL_ERROR,
-+ "'##' cannot appear at either end of a macro expansion");
- return false;
- }
- break;
-@@ -3072,7 +3071,8 @@ create_iso_definition (cpp_reader *pfile
- function-like macros, but not at the beginning. */
- if (macro->count == 1)
- {
-- cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
-+ cpp_error (pfile, CPP_DL_ERROR,
-+ "'##' cannot appear at either end of a macro expansion");
- return false;
- }
-
---- libcpp/expr.c.jj 2015-01-14 11:01:34.000000000 +0100
-+++ libcpp/expr.c 2015-01-14 14:35:52.851002344 +0100
-@@ -672,16 +672,17 @@ cpp_classify_number (cpp_reader *pfile,
- if ((result & CPP_N_WIDTH) == CPP_N_LARGE
- && CPP_OPTION (pfile, cpp_warn_long_long))
- {
-- const char *message = CPP_OPTION (pfile, cplusplus)
-- ? N_("use of C++11 long long integer constant")
-- : N_("use of C99 long long integer constant");
--
- if (CPP_OPTION (pfile, c99))
- cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location,
-- 0, message);
-+ 0, CPP_OPTION (pfile, cplusplus)
-+ ? N_("use of C++11 long long integer constant")
-+ : N_("use of C99 long long integer constant"));
- else
- cpp_pedwarning_with_line (pfile, CPP_W_LONG_LONG,
-- virtual_location, 0, message);
-+ virtual_location, 0,
-+ CPP_OPTION (pfile, cplusplus)
-+ ? N_("use of C++11 long long integer constant")
-+ : N_("use of C99 long long integer constant"));
- }
-
- result |= CPP_N_INTEGER;
diff --git a/gcc8-i386-libgomp.patch b/gcc8-i386-libgomp.patch
deleted file mode 100644
index 520561e..0000000
--- a/gcc8-i386-libgomp.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- libgomp/configure.tgt.jj 2008-01-10 20:53:48.000000000 +0100
-+++ libgomp/configure.tgt 2008-03-27 12:44:51.000000000 +0100
-@@ -67,7 +67,7 @@ if test $enable_linux_futex = yes; then
- ;;
- *)
- if test -z "$with_arch"; then
-- XCFLAGS="${XCFLAGS} -march=i486 -mtune=${target_cpu}"
-+ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
- fi
- esac
- ;;
diff --git a/gcc8-mcet.patch b/gcc8-mcet.patch
deleted file mode 100644
index 6fb78ca..0000000
--- a/gcc8-mcet.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-2018-04-24 Jakub Jelinek
-
- * config/i386/i386.opt (mcet): Remporarily re-add as alias to -mshstk.
-
---- gcc/config/i386/i386.opt (revision 259613)
-+++ gcc/config/i386/i386.opt (revision 259612)
-@@ -1006,6 +1006,10 @@ mgeneral-regs-only
- Target Report RejectNegative Mask(GENERAL_REGS_ONLY) Var(ix86_target_flags) Save
- Generate code which uses only the general registers.
-
-+mcet
-+Target Undocumented Alias(mshstk)
-+;; Deprecated
-+
- mshstk
- Target Report Mask(ISA_SHSTK) Var(ix86_isa_flags) Save
- Enable shadow stack built-in functions from Control-flow Enforcement
diff --git a/gcc8-rh1512529-aarch64.patch b/gcc8-rh1512529-aarch64.patch
deleted file mode 100644
index 4030027..0000000
--- a/gcc8-rh1512529-aarch64.patch
+++ /dev/null
@@ -1,445 +0,0 @@
---- gcc/config/aarch64/aarch64.c
-+++ gcc/config/aarch64/aarch64.c
-@@ -3799,7 +3799,14 @@ aarch64_output_probe_stack_range (rtx reg1, rtx reg2)
- output_asm_insn ("sub\t%0, %0, %1", xops);
-
- /* Probe at TEST_ADDR. */
-- output_asm_insn ("str\txzr, [%0]", xops);
-+ if (flag_stack_clash_protection)
-+ {
-+ gcc_assert (xops[0] == stack_pointer_rtx);
-+ xops[1] = GEN_INT (PROBE_INTERVAL - 8);
-+ output_asm_insn ("str\txzr, [%0, %1]", xops);
-+ }
-+ else
-+ output_asm_insn ("str\txzr, [%0]", xops);
-
- /* Test if TEST_ADDR == LAST_ADDR. */
- xops[1] = reg2;
-@@ -4589,6 +4596,133 @@ aarch64_set_handled_components (sbitmap components)
- cfun->machine->reg_is_wrapped_separately[regno] = true;
- }
-
-+/* Allocate POLY_SIZE bytes of stack space using TEMP1 and TEMP2 as scratch
-+ registers. */
-+
-+static void
-+aarch64_allocate_and_probe_stack_space (rtx temp1, rtx temp2,
-+ poly_int64 poly_size)
-+{
-+ HOST_WIDE_INT size;
-+ if (!poly_size.is_constant (&size))
-+ {
-+ sorry ("stack probes for SVE frames");
-+ return;
-+ }
-+
-+ HOST_WIDE_INT probe_interval
-+ = 1 << PARAM_VALUE (PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL);
-+ HOST_WIDE_INT guard_size
-+ = 1 << PARAM_VALUE (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE);
-+ HOST_WIDE_INT guard_used_by_caller = 1024;
-+
-+ /* SIZE should be large enough to require probing here. ie, it
-+ must be larger than GUARD_SIZE - GUARD_USED_BY_CALLER.
-+
-+ We can allocate GUARD_SIZE - GUARD_USED_BY_CALLER as a single chunk
-+ without any probing. */
-+ gcc_assert (size >= guard_size - guard_used_by_caller);
-+ aarch64_sub_sp (temp1, temp2, guard_size - guard_used_by_caller, true);
-+ HOST_WIDE_INT orig_size = size;
-+ size -= (guard_size - guard_used_by_caller);
-+
-+ HOST_WIDE_INT rounded_size = size & -probe_interval;
-+ HOST_WIDE_INT residual = size - rounded_size;
-+
-+ /* We can handle a small number of allocations/probes inline. Otherwise
-+ punt to a loop. */
-+ if (rounded_size && rounded_size <= 4 * probe_interval)
-+ {
-+ /* We don't use aarch64_sub_sp here because we don't want to
-+ repeatedly load TEMP1. */
-+ rtx step = GEN_INT (-probe_interval);
-+ if (probe_interval > ARITH_FACTOR)
-+ {
-+ emit_move_insn (temp1, step);
-+ step = temp1;
-+ }
-+
-+ for (HOST_WIDE_INT i = 0; i < rounded_size; i += probe_interval)
-+ {
-+ rtx_insn *insn = emit_insn (gen_add2_insn (stack_pointer_rtx, step));
-+ add_reg_note (insn, REG_STACK_CHECK, const0_rtx);
-+
-+ if (probe_interval > ARITH_FACTOR)
-+ {
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+ rtx adj = plus_constant (Pmode, stack_pointer_rtx, -probe_interval);
-+ add_reg_note (insn, REG_CFA_ADJUST_CFA,
-+ gen_rtx_SET (stack_pointer_rtx, adj));
-+ }
-+
-+ emit_stack_probe (plus_constant (Pmode, stack_pointer_rtx,
-+ (probe_interval
-+ - GET_MODE_SIZE (word_mode))));
-+ emit_insn (gen_blockage ());
-+ }
-+ dump_stack_clash_frame_info (PROBE_INLINE, size != rounded_size);
-+ }
-+ else if (rounded_size)
-+ {
-+ /* Compute the ending address. */
-+ unsigned int scratchreg = REGNO (temp1);
-+ emit_move_insn (temp1, GEN_INT (-rounded_size));
-+ rtx_insn *insn
-+ = emit_insn (gen_add3_insn (temp1, stack_pointer_rtx, temp1));
-+
-+ /* For the initial allocation, we don't have a frame pointer
-+ set up, so we always need CFI notes. If we're doing the
-+ final allocation, then we may have a frame pointer, in which
-+ case it is the CFA, otherwise we need CFI notes.
-+
-+ We can determine which allocation we are doing by looking at
-+ the temporary register. IP0 is the initial allocation, IP1
-+ is the final allocation. */
-+ if (scratchreg == IP0_REGNUM || !frame_pointer_needed)
-+ {
-+ /* We want the CFA independent of the stack pointer for the
-+ duration of the loop. */
-+ add_reg_note (insn, REG_CFA_DEF_CFA,
-+ plus_constant (Pmode, temp1,
-+ (rounded_size + (orig_size - size))));
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+ }
-+
-+ /* This allocates and probes the stack.
-+
-+ It also probes at a 4k interval regardless of the value of
-+ PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL. */
-+ insn = emit_insn (gen_probe_stack_range (stack_pointer_rtx,
-+ stack_pointer_rtx, temp1));
-+
-+ /* Now reset the CFA register if needed. */
-+ if (scratchreg == IP0_REGNUM || !frame_pointer_needed)
-+ {
-+ add_reg_note (insn, REG_CFA_DEF_CFA,
-+ plus_constant (Pmode, stack_pointer_rtx,
-+ (rounded_size + (orig_size - size))));
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+ }
-+
-+ emit_insn (gen_blockage ());
-+ dump_stack_clash_frame_info (PROBE_LOOP, size != rounded_size);
-+ }
-+ else
-+ dump_stack_clash_frame_info (PROBE_INLINE, size != rounded_size);
-+
-+ /* Handle any residuals.
-+ Note that any residual must be probed. */
-+ if (residual)
-+ {
-+ aarch64_sub_sp (temp1, temp2, residual, true);
-+ add_reg_note (get_last_insn (), REG_STACK_CHECK, const0_rtx);
-+ emit_stack_probe (plus_constant (Pmode, stack_pointer_rtx,
-+ (residual - GET_MODE_SIZE (word_mode))));
-+ emit_insn (gen_blockage ());
-+ }
-+ return;
-+}
-+
- /* Add a REG_CFA_EXPRESSION note to INSN to say that register REG
- is saved at BASE + OFFSET. */
-
-@@ -4686,7 +4820,54 @@ aarch64_expand_prologue (void)
- rtx ip0_rtx = gen_rtx_REG (Pmode, IP0_REGNUM);
- rtx ip1_rtx = gen_rtx_REG (Pmode, IP1_REGNUM);
-
-- aarch64_sub_sp (ip0_rtx, ip1_rtx, initial_adjust, true);
-+ /* We do not fully protect aarch64 against stack clash style attacks
-+ as doing so would be prohibitively expensive with less utility over
-+ time as newer compilers are deployed.
-+
-+ We assume the guard is at least 64k. Furthermore, we assume that
-+ the caller has not pushed the stack pointer more than 1k into
-+ the guard. A caller that pushes the stack pointer than 1k into
-+ the guard is considered invalid.
-+
-+ Note that the caller's ability to push the stack pointer into the
-+ guard is a function of the number and size of outgoing arguments and/or
-+ dynamic stack allocations due to the mandatory save of the link register
-+ in the caller's frame.
-+
-+ With those assumptions the callee can allocate up to 63k of stack
-+ space without probing.
-+
-+ When probing is needed, we emit a probe at the start of the prologue
-+ and every PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL bytes thereafter.
-+
-+ We have to track how much space has been allocated, but we do not
-+ track stores into the stack as implicit probes except for the
-+ fp/lr store. */
-+ HOST_WIDE_INT guard_size
-+ = 1 << PARAM_VALUE (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE);
-+ HOST_WIDE_INT guard_used_by_caller = 1024;
-+ if (flag_stack_clash_protection)
-+ {
-+ if (known_eq (frame_size, 0))
-+ dump_stack_clash_frame_info (NO_PROBE_NO_FRAME, false);
-+ else if (known_lt (initial_adjust, guard_size - guard_used_by_caller)
-+ && known_lt (final_adjust, guard_size - guard_used_by_caller))
-+ dump_stack_clash_frame_info (NO_PROBE_SMALL_FRAME, true);
-+ }
-+
-+ /* In theory we should never have both an initial adjustment
-+ and a callee save adjustment. Verify that is the case since the
-+ code below does not handle it for -fstack-clash-protection. */
-+ gcc_assert (known_eq (initial_adjust, 0) || callee_adjust == 0);
-+
-+ /* Only probe if the initial adjustment is larger than the guard
-+ less the amount of the guard reserved for use by the caller's
-+ outgoing args. */
-+ if (flag_stack_clash_protection
-+ && maybe_ge (initial_adjust, guard_size - guard_used_by_caller))
-+ aarch64_allocate_and_probe_stack_space (ip0_rtx, ip1_rtx, initial_adjust);
-+ else
-+ aarch64_sub_sp (ip0_rtx, ip1_rtx, initial_adjust, true);
-
- if (callee_adjust != 0)
- aarch64_push_regs (reg1, reg2, callee_adjust);
-@@ -4742,7 +4923,31 @@ aarch64_expand_prologue (void)
- callee_adjust != 0 || emit_frame_chain);
- aarch64_save_callee_saves (DFmode, callee_offset, V0_REGNUM, V31_REGNUM,
- callee_adjust != 0 || emit_frame_chain);
-- aarch64_sub_sp (ip1_rtx, ip0_rtx, final_adjust, !frame_pointer_needed);
-+
-+ /* We may need to probe the final adjustment as well. */
-+ if (flag_stack_clash_protection && maybe_ne (final_adjust, 0))
-+ {
-+ /* First probe if the final adjustment is larger than the guard size
-+ less the amount of the guard reserved for use by the caller's
-+ outgoing args. */
-+ if (maybe_ge (final_adjust, guard_size - guard_used_by_caller))
-+ aarch64_allocate_and_probe_stack_space (ip1_rtx, ip0_rtx,
-+ final_adjust);
-+ else
-+ aarch64_sub_sp (ip1_rtx, ip0_rtx, final_adjust, !frame_pointer_needed);
-+
-+ /* We must also probe if the final adjustment is larger than the guard
-+ that is assumed used by the caller. This may be sub-optimal. */
-+ if (maybe_ge (final_adjust, guard_used_by_caller))
-+ {
-+ if (dump_file)
-+ fprintf (dump_file,
-+ "Stack clash aarch64 large outgoing arg, probing\n");
-+ emit_stack_probe (stack_pointer_rtx);
-+ }
-+ }
-+ else
-+ aarch64_sub_sp (ip1_rtx, ip0_rtx, final_adjust, !frame_pointer_needed);
- }
-
- /* Return TRUE if we can use a simple_return insn.
-@@ -10476,6 +10681,12 @@ aarch64_override_options_internal (struct gcc_options *opts)
- && opts->x_optimize >= aarch64_tune_params.prefetch->default_opt_level)
- opts->x_flag_prefetch_loop_arrays = 1;
-
-+ /* We assume the guard page is 64k. */
-+ maybe_set_param_value (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
-+ 16,
-+ opts->x_param_values,
-+ global_options_set.x_param_values);
-+
- aarch64_override_options_after_change_1 (opts);
- }
-
-@@ -17161,6 +17372,28 @@ aarch64_sched_can_speculate_insn (rtx_insn *insn)
- }
- }
-
-+/* It has been decided that to allow up to 1kb of outgoing argument
-+ space to be allocated w/o probing. If more than 1kb of outgoing
-+ argment space is allocated, then it must be probed and the last
-+ probe must occur no more than 1kbyte away from the end of the
-+ allocated space.
-+
-+ This implies that the residual part of an alloca allocation may
-+ need probing in cases where the generic code might not otherwise
-+ think a probe is needed.
-+
-+ This target hook returns TRUE when allocating RESIDUAL bytes of
-+ alloca space requires an additional probe, otherwise FALSE is
-+ returned. */
-+
-+static bool
-+aarch64_stack_clash_protection_final_dynamic_probe (rtx residual)
-+{
-+ return (residual == CONST0_RTX (Pmode)
-+ || GET_CODE (residual) != CONST_INT
-+ || INTVAL (residual) >= 1024);
-+}
-+
- /* Implement TARGET_COMPUTE_PRESSURE_CLASSES. */
-
- static int
-@@ -17669,6 +17902,10 @@ aarch64_libgcc_floating_mode_supported_p
- #undef TARGET_CONSTANT_ALIGNMENT
- #define TARGET_CONSTANT_ALIGNMENT aarch64_constant_alignment
-
-+#undef TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE
-+#define TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE \
-+ aarch64_stack_clash_protection_final_dynamic_probe
-+
- #undef TARGET_COMPUTE_PRESSURE_CLASSES
- #define TARGET_COMPUTE_PRESSURE_CLASSES aarch64_compute_pressure_classes
-
---- gcc/config/aarch64/aarch64.md
-+++ gcc/config/aarch64/aarch64.md
-@@ -5812,7 +5812,7 @@
- )
-
- (define_insn "probe_stack_range"
-- [(set (match_operand:DI 0 "register_operand" "=r")
-+ [(set (match_operand:DI 0 "register_operand" "=rk")
- (unspec_volatile:DI [(match_operand:DI 1 "register_operand" "0")
- (match_operand:DI 2 "register_operand" "r")]
- UNSPECV_PROBE_STACK_RANGE))]
---- gcc/testsuite/gcc.target/aarch64/stack-check-12.c
-+++ gcc/testsuite/gcc.target/aarch64/stack-check-12.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=12" } */
-+/* { dg-require-effective-target supports_stack_clash_protection } */
-+
-+extern void arf (unsigned long int *, unsigned long int *);
-+void
-+frob ()
-+{
-+ unsigned long int num[1000];
-+ unsigned long int den[1000];
-+ arf (den, num);
-+}
-+
-+/* This verifies that the scheduler did not break the dependencies
-+ by adjusting the offsets within the probe and that the scheduler
-+ did not reorder around the stack probes. */
-+/* { dg-final { scan-assembler-times "sub\\tsp, sp, #4096\\n\\tstr\\txzr, .sp, 4088." 3 } } */
-+
-+
-+
---- gcc/testsuite/gcc.target/aarch64/stack-check-13.c
-+++ gcc/testsuite/gcc.target/aarch64/stack-check-13.c
-@@ -0,0 +1,28 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=12" } */
-+/* { dg-require-effective-target supports_stack_clash_protection } */
-+
-+#define ARG32(X) X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X
-+#define ARG192(X) ARG32(X),ARG32(X),ARG32(X),ARG32(X),ARG32(X),ARG32(X)
-+void out1(ARG192(__int128));
-+int t1(int);
-+
-+int t3(int x)
-+{
-+ if (x < 1000)
-+ return t1 (x) + 1;
-+
-+ out1 (ARG192(1));
-+ return 0;
-+}
-+
-+
-+
-+/* This test creates a large (> 1k) outgoing argument area that needs
-+ to be probed. We don't test the exact size of the space or the
-+ exact offset to make the test a little less sensitive to trivial
-+ output changes. */
-+/* { dg-final { scan-assembler-times "sub\\tsp, sp, #....\\n\\tstr\\txzr, \\\[sp" 1 } } */
-+
-+
-+
---- gcc/testsuite/gcc.target/aarch64/stack-check-14.c
-+++ gcc/testsuite/gcc.target/aarch64/stack-check-14.c
-@@ -0,0 +1,25 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=12" } */
-+/* { dg-require-effective-target supports_stack_clash_protection } */
-+
-+int t1(int);
-+
-+int t2(int x)
-+{
-+ char *p = __builtin_alloca (4050);
-+ x = t1 (x);
-+ return p[x];
-+}
-+
-+
-+/* This test has a constant sized alloca that is smaller than the
-+ probe interval. But it actually requires two probes instead
-+ of one because of the optimistic assumptions we made in the
-+ aarch64 prologue code WRT probing state.
-+
-+ The form can change quite a bit so we just check for two
-+ probes without looking at the actual address. */
-+/* { dg-final { scan-assembler-times "str\\txzr," 2 } } */
-+
-+
-+
---- gcc/testsuite/gcc.target/aarch64/stack-check-15.c
-+++ gcc/testsuite/gcc.target/aarch64/stack-check-15.c
-@@ -0,0 +1,24 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=12" } */
-+/* { dg-require-effective-target supports_stack_clash_protection } */
-+
-+int t1(int);
-+
-+int t2(int x)
-+{
-+ char *p = __builtin_alloca (x);
-+ x = t1 (x);
-+ return p[x];
-+}
-+
-+
-+/* This test has a variable sized alloca. It requires 3 probes.
-+ One in the loop, one for the residual and at the end of the
-+ alloca area.
-+
-+ The form can change quite a bit so we just check for two
-+ probes without looking at the actual address. */
-+/* { dg-final { scan-assembler-times "str\\txzr," 3 } } */
-+
-+
-+
---- gcc/testsuite/lib/target-supports.exp
-+++ gcc/testsuite/lib/target-supports.exp
-@@ -9201,14 +9201,9 @@ proc check_effective_target_autoincdec { } {
- #
- proc check_effective_target_supports_stack_clash_protection { } {
-
-- # Temporary until the target bits are fully ACK'd.
--# if { [istarget aarch*-*-*] } {
--# return 1
--# }
--
- if { [istarget x86_64-*-*] || [istarget i?86-*-*]
- || [istarget powerpc*-*-*] || [istarget rs6000*-*-*]
-- || [istarget s390*-*-*] } {
-+ || [istarget aarch64*-**] || [istarget s390*-*-*] } {
- return 1
- }
- return 0
-@@ -9217,9 +9212,9 @@ proc check_effective_target_supports_stack_clash_protection { } {
- # Return 1 if the target creates a frame pointer for non-leaf functions
- # Note we ignore cases where we apply tail call optimization here.
- proc check_effective_target_frame_pointer_for_non_leaf { } {
-- if { [istarget aarch*-*-*] } {
-- return 1
-- }
-+# if { [istarget aarch*-*-*] } {
-+# return 1
-+# }
-
- # Solaris/x86 defaults to -fno-omit-frame-pointer.
- if { [istarget i?86-*-solaris*] || [istarget x86_64-*-solaris*] } {
diff --git a/gcc8-rh1574936.patch b/gcc8-rh1574936.patch
deleted file mode 100644
index 32db990..0000000
--- a/gcc8-rh1574936.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-crt files and statically linked libgcc objects cause false positives
-in annobin coverage, so we add the assembler flag to generate notes
-for them.
-
-The patch also adds notes to libgcc_s.so, but this is harmless because
-these notes only confer that there is no other annobin markup.
-
-2018-07-25 Florian Weimer
-
- * Makefile.in (LIBGCC2_CFLAGS, CRTSTUFF_CFLAGS): Add
- -Wa,--generate-missing-build-notes=yes.
-
---- libgcc/Makefile.in 2018-01-13 13:05:41.000000000 +0100
-+++ libgcc/Makefile.in 2018-07-25 13:15:02.036226940 +0200
-@@ -244,6 +244,7 @@
- LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \
- $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 \
- -fbuilding-libgcc -fno-stack-protector \
-+ -Wa,--generate-missing-build-notes=yes \
- $(INHIBIT_LIBC_CFLAGS)
-
- # Additional options to use when compiling libgcc2.a.
-@@ -297,6 +298,7 @@
- $(NO_PIE_CFLAGS) -finhibit-size-directive -fno-inline -fno-exceptions \
- -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \
- -fbuilding-libgcc -fno-stack-protector $(FORCE_EXPLICIT_EH_REGISTRY) \
-+ -Wa,--generate-missing-build-notes=yes \
- $(INHIBIT_LIBC_CFLAGS)
-
- # Extra flags to use when compiling crt{begin,end}.o.
-
diff --git a/isl-rh2155127.patch b/isl-rh2155127.patch
new file mode 100644
index 0000000..092bddb
--- /dev/null
+++ b/isl-rh2155127.patch
@@ -0,0 +1,85 @@
+From: Sven Verdoolaege
+Date: Mon, 6 Jun 2022 12:56:02 +0000 (+0200)
+Subject: update m4/ax_prog_cc_for_build.m4
+X-Git-Tag: isl-0.25~11
+X-Git-Url: https://repo.or.cz/isl.git/commitdiff_plain/b4dcdfadc29a6c9f410a72f345f3f32725b1d38b
+
+update m4/ax_prog_cc_for_build.m4
+
+In particular, update to the latest version from the autoconf archive,
+but preserve the changes from isl-0.22.1-358-gcd42abdf2
+(m4/ax_prog_cc_for_build.m4: do not override host compiler dependency style,
+Tue Jun 9 10:54:10 2020 +0200).
+
+Signed-off-by: Sven Verdoolaege
+
+--- isl-0.24/m4/ax_prog_cc_for_build.m4.jj 2021-03-02 12:07:09.000000000 +0100
++++ isl-0.24/m4/ax_prog_cc_for_build.m4 2022-12-20 18:11:18.855777817 +0100
+@@ -32,7 +32,7 @@
+ # and this notice are preserved. This file is offered as-is, without any
+ # warranty.
+
+-#serial 18
++#serial 21
+
+ AU_ALIAS([AC_PROG_CC_FOR_BUILD], [AX_PROG_CC_FOR_BUILD])
+ AC_DEFUN([AX_PROG_CC_FOR_BUILD], [dnl
+@@ -44,6 +44,8 @@ dnl Use the standard macros, but make th
+ dnl
+ pushdef([ac_cv_prog_CPP], ac_cv_build_prog_CPP)dnl
+ pushdef([ac_cv_prog_cc_c89], ac_cv_build_prog_cc_c89)dnl
++pushdef([ac_cv_prog_cc_c99], ac_cv_build_prog_cc_c99)dnl
++pushdef([ac_cv_prog_cc_c11], ac_cv_build_prog_cc_c11)dnl
+ pushdef([ac_cv_prog_gcc], ac_cv_build_prog_gcc)dnl
+ pushdef([ac_cv_prog_cc_works], ac_cv_build_prog_cc_works)dnl
+ pushdef([ac_cv_prog_cc_cross], ac_cv_build_prog_cc_cross)dnl
+@@ -86,7 +88,21 @@ AS_IF([test -n "$build"], [ac_build
+ [test -n "$build_alias"],[ac_build_tool_prefix="$build_alias-"])
+
+ AC_LANG_PUSH([C])
++
++dnl The pushdef([ac_cv_c_compiler_gnu], ...) currently does not cover
++dnl the use of this variable in _AC_LANG_COMPILER_GNU called by
++dnl AC_PROG_CC. Unset this cache variable temporarily as a workaround.
++was_set_c_compiler_gnu=${[ac_cv_c_compiler_gnu]+y}
++AS_IF([test ${was_set_c_compiler_gnu}],
++ [saved_c_compiler_gnu=$[ac_cv_c_compiler_gnu]
++ AS_UNSET([[ac_cv_c_compiler_gnu]])])
++
+ AC_PROG_CC
++
++dnl Restore ac_cv_c_compiler_gnu
++AS_IF([test ${was_set_c_compiler_gnu}],
++ [[ac_cv_c_compiler_gnu]=$[saved_c_compiler_gnu]])
++
+ _AC_COMPILER_EXEEXT
+ _AC_COMPILER_OBJEXT
+ AC_PROG_CPP
+--- isl-0.24/configure.jj 2021-04-26 11:13:19.000000000 +0200
++++ isl-0.24/configure 2022-12-20 18:11:36.882518568 +0100
+@@ -5002,6 +4990,13 @@ ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR
+ ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_build_c_compiler_gnu
+
++
++was_set_c_compiler_gnu=${ac_cv_c_compiler_gnu+y}
++if test ${was_set_c_compiler_gnu}; then :
++ saved_c_compiler_gnu=$ac_cv_c_compiler_gnu
++ { ac_cv_c_compiler_gnu=; unset ac_cv_c_compiler_gnu;}
++fi
++
+ ac_ext=c
+ ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD'
+ ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5'
+@@ -5728,6 +5723,11 @@ else
+ fi
+
+
++
++if test ${was_set_c_compiler_gnu}; then :
++ ac_cv_c_compiler_gnu=$saved_c_compiler_gnu
++fi
++
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
diff --git a/nvptx-tools-build.patch b/nvptx-tools-build.patch
deleted file mode 100644
index 53d7483..0000000
--- a/nvptx-tools-build.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- nvptx-tools/nvptx-as.c.jj 2017-01-20 12:40:18.000000000 +0100
-+++ nvptx-tools/nvptx-as.c 2017-01-20 12:43:53.864271442 +0100
-@@ -939,7 +939,7 @@ fork_execute (const char *prog, char *co
- fatal_error ("%s: %m", errmsg);
- }
- else
-- fatal_error (errmsg);
-+ fatal_error ("%s", errmsg);
- }
- do_wait (prog, pex);
- }
diff --git a/nvptx-tools-glibc.patch b/nvptx-tools-glibc.patch
deleted file mode 100644
index 4b50114..0000000
--- a/nvptx-tools-glibc.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- nvptx-tools/configure.ac.jj 2017-01-13 12:48:31.000000000 +0100
-+++ nvptx-tools/configure.ac 2017-05-03 10:26:57.076092259 +0200
-@@ -66,6 +66,8 @@ CPPFLAGS=$save_CPPFLAGS
- LDFLAGS=$save_LDFLAGS
- LIBS=$save_LIBS
-
-+AC_CHECK_DECLS(getopt)
-+
- AC_CONFIG_SUBDIRS([libiberty])
- AC_CONFIG_FILES([Makefile dejagnu.exp])
- AC_OUTPUT
---- nvptx-tools/configure.jj 2017-01-13 12:48:54.000000000 +0100
-+++ nvptx-tools/configure 2017-05-03 10:27:13.503876809 +0200
-@@ -3963,6 +3963,18 @@ CPPFLAGS=$save_CPPFLAGS
- LDFLAGS=$save_LDFLAGS
- LIBS=$save_LIBS
-
-+ac_fn_c_check_decl "$LINENO" "getopt" "ac_cv_have_decl_getopt" "$ac_includes_default"
-+if test "x$ac_cv_have_decl_getopt" = x""yes; then :
-+ ac_have_decl=1
-+else
-+ ac_have_decl=0
-+fi
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_DECL_GETOPT $ac_have_decl
-+_ACEOF
-+
-+
-
-
- subdirs="$subdirs libiberty"
diff --git a/nvptx-tools-no-ptxas.patch b/nvptx-tools-no-ptxas.patch
deleted file mode 100644
index 28bc597..0000000
--- a/nvptx-tools-no-ptxas.patch
+++ /dev/null
@@ -1,947 +0,0 @@
---- nvptx-tools/configure.ac
-+++ nvptx-tools/configure.ac
-@@ -51,6 +51,7 @@ LIBS="$LIBS -lcuda"
- AC_CHECK_FUNCS([[cuGetErrorName] [cuGetErrorString]])
- AC_CHECK_DECLS([[cuGetErrorName], [cuGetErrorString]],
- [], [], [[#include ]])
-+AC_CHECK_HEADERS(unistd.h sys/stat.h)
-
- AC_MSG_CHECKING([for extra programs to build requiring -lcuda])
- NVPTX_RUN=
---- nvptx-tools/include/libiberty.h
-+++ nvptx-tools/include/libiberty.h
-@@ -390,6 +390,17 @@ extern void hex_init (void);
- /* Save files used for communication between processes. */
- #define PEX_SAVE_TEMPS 0x4
-
-+/* Max number of alloca bytes per call before we must switch to malloc.
-+
-+ ?? Swiped from gnulib's regex_internal.h header. Is this actually
-+ the case? This number seems arbitrary, though sane.
-+
-+ The OS usually guarantees only one guard page at the bottom of the stack,
-+ and a page size can be as small as 4096 bytes. So we cannot safely
-+ allocate anything larger than 4096 bytes. Also care for the possibility
-+ of a few compiler-allocated temporary stack slots. */
-+#define MAX_ALLOCA_SIZE 4032
-+
- /* Prepare to execute one or more programs, with standard output of
- each program fed to standard input of the next.
- FLAGS As above.
---- nvptx-tools/nvptx-as.c
-+++ nvptx-tools/nvptx-as.c
-@@ -30,6 +30,9 @@
- #include
- #include
- #include
-+#ifdef HAVE_SYS_STAT_H
-+#include
-+#endif
- #include
- #define obstack_chunk_alloc malloc
- #define obstack_chunk_free free
-@@ -42,6 +45,38 @@
-
- #include "version.h"
-
-+#ifndef R_OK
-+#define R_OK 4
-+#define W_OK 2
-+#define X_OK 1
-+#endif
-+
-+#ifndef DIR_SEPARATOR
-+# define DIR_SEPARATOR '/'
-+#endif
-+
-+#if defined (_WIN32) || defined (__MSDOS__) \
-+ || defined (__DJGPP__) || defined (__OS2__)
-+# define HAVE_DOS_BASED_FILE_SYSTEM
-+# define HAVE_HOST_EXECUTABLE_SUFFIX
-+# define HOST_EXECUTABLE_SUFFIX ".exe"
-+# ifndef DIR_SEPARATOR_2
-+# define DIR_SEPARATOR_2 '\\'
-+# endif
-+# define PATH_SEPARATOR ';'
-+#else
-+# define PATH_SEPARATOR ':'
-+#endif
-+
-+#ifndef DIR_SEPARATOR_2
-+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
-+#else
-+# define IS_DIR_SEPARATOR(ch) \
-+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
-+#endif
-+
-+#define DIR_UP ".."
-+
- static const char *outname = NULL;
-
- static void __attribute__ ((format (printf, 1, 2)))
-@@ -816,7 +851,7 @@ traverse (void **slot, void *data)
- }
-
- static void
--process (FILE *in, FILE *out)
-+process (FILE *in, FILE *out, int verify, const char *outname)
- {
- symbol_table = htab_create (500, hash_string_hash, hash_string_eq,
- NULL);
-@@ -824,6 +859,18 @@ process (FILE *in, FILE *out)
- const char *input = read_file (in);
- Token *tok = tokenize (input);
-
-+ /* By default, when ptxas is not in PATH, do minimalistic verification,
-+ just require that the first non-comment directive is .version. */
-+ if (verify < 0)
-+ {
-+ size_t i;
-+ for (i = 0; tok[i].kind == K_comment; i++)
-+ ;
-+ if (tok[i].kind != K_dotted || !is_keyword (&tok[i], "version"))
-+ fatal_error ("missing .version directive at start of file '%s'",
-+ outname);
-+ }
-+
- do
- tok = parse_file (tok);
- while (tok->kind);
-@@ -897,9 +944,83 @@ fork_execute (const char *prog, char *const *argv)
- do_wait (prog, pex);
- }
-
-+/* Determine if progname is available in PATH. */
-+static bool
-+program_available (const char *progname)
-+{
-+ char *temp = getenv ("PATH");
-+ if (temp)
-+ {
-+ char *startp, *endp, *nstore, *alloc_ptr = NULL;
-+ size_t prefixlen = strlen (temp) + 1;
-+ size_t len;
-+ if (prefixlen < 2)
-+ prefixlen = 2;
-+
-+ len = prefixlen + strlen (progname) + 1;
-+#ifdef HAVE_HOST_EXECUTABLE_SUFFIX
-+ len += strlen (HOST_EXECUTABLE_SUFFIX);
-+#endif
-+ if (len < MAX_ALLOCA_SIZE)
-+ nstore = (char *) alloca (len);
-+ else
-+ alloc_ptr = nstore = (char *) malloc (len);
-+
-+ startp = endp = temp;
-+ while (1)
-+ {
-+ if (*endp == PATH_SEPARATOR || *endp == 0)
-+ {
-+ if (endp == startp)
-+ {
-+ nstore[0] = '.';
-+ nstore[1] = DIR_SEPARATOR;
-+ nstore[2] = '\0';
-+ }
-+ else
-+ {
-+ memcpy (nstore, startp, endp - startp);
-+ if (! IS_DIR_SEPARATOR (endp[-1]))
-+ {
-+ nstore[endp - startp] = DIR_SEPARATOR;
-+ nstore[endp - startp + 1] = 0;
-+ }
-+ else
-+ nstore[endp - startp] = 0;
-+ }
-+ strcat (nstore, progname);
-+ if (! access (nstore, X_OK)
-+#ifdef HAVE_HOST_EXECUTABLE_SUFFIX
-+ || ! access (strcat (nstore, HOST_EXECUTABLE_SUFFIX), X_OK)
-+#endif
-+ )
-+ {
-+#if defined (HAVE_SYS_STAT_H) && defined (S_ISREG)
-+ struct stat st;
-+ if (stat (nstore, &st) >= 0 && S_ISREG (st.st_mode))
-+#endif
-+ {
-+ free (alloc_ptr);
-+ return true;
-+ }
-+ }
-+
-+ if (*endp == 0)
-+ break;
-+ endp = startp = endp + 1;
-+ }
-+ else
-+ endp++;
-+ }
-+ free (alloc_ptr);
-+ }
-+ return false;
-+}
-+
- static struct option long_options[] = {
- {"traditional-format", no_argument, 0, 0 },
- {"save-temps", no_argument, 0, 0 },
-+ {"verify", no_argument, 0, 0 },
- {"no-verify", no_argument, 0, 0 },
- {"help", no_argument, 0, 'h' },
- {"version", no_argument, 0, 'V' },
-@@ -912,7 +1033,7 @@ main (int argc, char **argv)
- FILE *in = stdin;
- FILE *out = stdout;
- bool verbose __attribute__((unused)) = false;
-- bool verify = true;
-+ int verify = -1;
- const char *smver = "sm_30";
-
- int o;
-@@ -923,7 +1044,9 @@ main (int argc, char **argv)
- {
- case 0:
- if (option_index == 2)
-- verify = false;
-+ verify = 1;
-+ else if (option_index == 3)
-+ verify = 0;
- break;
- case 'v':
- verbose = true;
-@@ -948,7 +1071,8 @@ Usage: nvptx-none-as [option...] [asmfile]\n\
- Options:\n\
- -o FILE Write output to FILE\n\
- -v Be verbose\n\
-+ --verify Do verify output is acceptable to ptxas\n\
- --no-verify Do not verify output is acceptable to ptxas\n\
- --help Print this help and exit\n\
- --version Print version number and exit\n\
- \n\
-@@ -983,11 +1108,17 @@ This program has absolutely no warranty.\n",
- if (!in)
- fatal_error ("cannot open input ptx file");
-
-- process (in, out);
-- if (outname)
-+ if (outname == NULL)
-+ verify = 0;
-+ else if (verify == -1)
-+ if (program_available ("ptxas"))
-+ verify = 1;
-+
-+ process (in, out, verify, outname);
-+ if (outname)
- fclose (out);
-
-- if (verify && outname)
-+ if (verify > 0)
- {
- struct obstack argv_obstack;
- obstack_init (&argv_obstack);
---- nvptx-tools/configure
-+++ nvptx-tools/configure
-@@ -168,7 +168,8 @@ test x\$exitcode = x0 || exit 1"
- as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
- as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
- eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
-- test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
-+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
-+test \$(( 1 + 1 )) = 2 || exit 1"
- if (eval "$as_required") 2>/dev/null; then :
- as_have_required=yes
- else
-@@ -552,11 +553,50 @@ PACKAGE_URL=
-
- ac_unique_file="nvptx-tools"
- ac_unique_file="nvptx-as.c"
-+# Factoring default headers for most tests.
-+ac_includes_default="\
-+#include
-+#ifdef HAVE_SYS_TYPES_H
-+# include
-+#endif
-+#ifdef HAVE_SYS_STAT_H
-+# include
-+#endif
-+#ifdef STDC_HEADERS
-+# include
-+# include
-+#else
-+# ifdef HAVE_STDLIB_H
-+# include
-+# endif
-+#endif
-+#ifdef HAVE_STRING_H
-+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-+# include
-+# endif
-+# include
-+#endif
-+#ifdef HAVE_STRINGS_H
-+# include
-+#endif
-+#ifdef HAVE_INTTYPES_H
-+# include
-+#endif
-+#ifdef HAVE_STDINT_H
-+# include
-+#endif
-+#ifdef HAVE_UNISTD_H
-+# include
-+#endif"
-+
- enable_option_checking=no
- ac_subst_vars='LTLIBOBJS
- LIBOBJS
- subdirs
- NVPTX_RUN
-+EGREP
-+GREP
-+CPP
- CUDA_DRIVER_LDFLAGS
- CUDA_DRIVER_CPPFLAGS
- AR
-@@ -635,7 +675,8 @@ LIBS
- CPPFLAGS
- CXX
- CXXFLAGS
--CCC'
-+CCC
-+CPP'
- ac_subdirs_all='libiberty'
-
- # Initialize some variables set by options.
-@@ -1267,6 +1308,7 @@ Some influential environment variables:
- you have headers in a nonstandard directory
- CXX C++ compiler command
- CXXFLAGS C++ compiler flags
-+ CPP C preprocessor
-
- Use these variables to override the choices made by `configure' or to help
- it to find libraries and programs with nonstandard names/locations.
-@@ -1575,6 +1617,203 @@ $as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
- } # ac_fn_c_check_decl
-+
-+# ac_fn_c_try_cpp LINENO
-+# ----------------------
-+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-+ac_fn_c_try_cpp ()
-+{
-+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-+ if { { ac_try="$ac_cpp conftest.$ac_ext"
-+case "(($ac_try" in
-+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+ *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-+$as_echo "$ac_try_echo"; } >&5
-+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
-+ ac_status=$?
-+ if test -s conftest.err; then
-+ grep -v '^ *+' conftest.err >conftest.er1
-+ cat conftest.er1 >&5
-+ mv -f conftest.er1 conftest.err
-+ fi
-+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+ test $ac_status = 0; } >/dev/null && {
-+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-+ test ! -s conftest.err
-+ }; then :
-+ ac_retval=0
-+else
-+ $as_echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ ac_retval=1
-+fi
-+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-+ return $ac_retval
-+
-+} # ac_fn_c_try_cpp
-+
-+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-+# -------------------------------------------------------
-+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-+# the include files in INCLUDES and setting the cache variable VAR
-+# accordingly.
-+ac_fn_c_check_header_mongrel ()
-+{
-+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-+ if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-+$as_echo_n "checking for $2... " >&6; }
-+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-+ $as_echo_n "(cached) " >&6
-+fi
-+eval ac_res=\$$3
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-+$as_echo "$ac_res" >&6; }
-+else
-+ # Is the header compilable?
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-+$as_echo_n "checking $2 usability... " >&6; }
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+$4
-+#include <$2>
-+_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+ ac_header_compiler=yes
-+else
-+ ac_header_compiler=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-+$as_echo "$ac_header_compiler" >&6; }
-+
-+# Is the header present?
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-+$as_echo_n "checking $2 presence... " >&6; }
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#include <$2>
-+_ACEOF
-+if ac_fn_c_try_cpp "$LINENO"; then :
-+ ac_header_preproc=yes
-+else
-+ ac_header_preproc=no
-+fi
-+rm -f conftest.err conftest.$ac_ext
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-+$as_echo "$ac_header_preproc" >&6; }
-+
-+# So? What about this header?
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
-+ yes:no: )
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-+ ;;
-+ no:yes:* )
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
-+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
-+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-+ ;;
-+esac
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-+$as_echo_n "checking for $2... " >&6; }
-+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ eval "$3=\$ac_header_compiler"
-+fi
-+eval ac_res=\$$3
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-+$as_echo "$ac_res" >&6; }
-+fi
-+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-+
-+} # ac_fn_c_check_header_mongrel
-+
-+# ac_fn_c_try_run LINENO
-+# ----------------------
-+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-+# that executables *can* be run.
-+ac_fn_c_try_run ()
-+{
-+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-+ if { { ac_try="$ac_link"
-+case "(($ac_try" in
-+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+ *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-+$as_echo "$ac_try_echo"; } >&5
-+ (eval "$ac_link") 2>&5
-+ ac_status=$?
-+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
-+ { { case "(($ac_try" in
-+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+ *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-+$as_echo "$ac_try_echo"; } >&5
-+ (eval "$ac_try") 2>&5
-+ ac_status=$?
-+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+ test $ac_status = 0; }; }; then :
-+ ac_retval=0
-+else
-+ $as_echo "$as_me: program exited with status $ac_status" >&5
-+ $as_echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ ac_retval=$ac_status
-+fi
-+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-+ return $ac_retval
-+
-+} # ac_fn_c_try_run
-+
-+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-+# -------------------------------------------------------
-+# Tests whether HEADER exists and can be compiled using the include files in
-+# INCLUDES, setting the cache variable VAR accordingly.
-+ac_fn_c_check_header_compile ()
-+{
-+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-+$as_echo_n "checking for $2... " >&6; }
-+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+$4
-+#include <$2>
-+_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+ eval "$3=yes"
-+else
-+ eval "$3=no"
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+fi
-+eval ac_res=\$$3
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-+$as_echo "$ac_res" >&6; }
-+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-+
-+} # ac_fn_c_check_header_compile
- cat >config.log <<_ACEOF
- This file contains any messages produced by compilers while
- running configure, to aid debugging if configure makes a mistake.
-@@ -3284,6 +3523,418 @@ cat >>confdefs.h <<_ACEOF
- #define HAVE_DECL_CUGETERRORSTRING $ac_have_decl
- _ACEOF
-
-+ac_ext=c
-+ac_cpp='$CPP $CPPFLAGS'
-+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-+ac_compiler_gnu=$ac_cv_c_compiler_gnu
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-+$as_echo_n "checking how to run the C preprocessor... " >&6; }
-+# On Suns, sometimes $CPP names a directory.
-+if test -n "$CPP" && test -d "$CPP"; then
-+ CPP=
-+fi
-+if test -z "$CPP"; then
-+ if test "${ac_cv_prog_CPP+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ # Double quotes because CPP needs to be expanded
-+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-+ do
-+ ac_preproc_ok=false
-+for ac_c_preproc_warn_flag in '' yes
-+do
-+ # Use a header file that comes with gcc, so configuring glibc
-+ # with a fresh cross-compiler works.
-+ # Prefer to if __STDC__ is defined, since
-+ # exists even on freestanding compilers.
-+ # On the NeXT, cc -E runs the code through the compiler's parser,
-+ # not just through cpp. "Syntax error" is here to catch this case.
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#ifdef __STDC__
-+# include
-+#else
-+# include
-+#endif
-+ Syntax error
-+_ACEOF
-+if ac_fn_c_try_cpp "$LINENO"; then :
-+
-+else
-+ # Broken: fails on valid input.
-+continue
-+fi
-+rm -f conftest.err conftest.$ac_ext
-+
-+ # OK, works on sane cases. Now check whether nonexistent headers
-+ # can be detected and how.
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#include
-+_ACEOF
-+if ac_fn_c_try_cpp "$LINENO"; then :
-+ # Broken: success on invalid input.
-+continue
-+else
-+ # Passes both tests.
-+ac_preproc_ok=:
-+break
-+fi
-+rm -f conftest.err conftest.$ac_ext
-+
-+done
-+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-+rm -f conftest.err conftest.$ac_ext
-+if $ac_preproc_ok; then :
-+ break
-+fi
-+
-+ done
-+ ac_cv_prog_CPP=$CPP
-+
-+fi
-+ CPP=$ac_cv_prog_CPP
-+else
-+ ac_cv_prog_CPP=$CPP
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-+$as_echo "$CPP" >&6; }
-+ac_preproc_ok=false
-+for ac_c_preproc_warn_flag in '' yes
-+do
-+ # Use a header file that comes with gcc, so configuring glibc
-+ # with a fresh cross-compiler works.
-+ # Prefer to if __STDC__ is defined, since
-+ # exists even on freestanding compilers.
-+ # On the NeXT, cc -E runs the code through the compiler's parser,
-+ # not just through cpp. "Syntax error" is here to catch this case.
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#ifdef __STDC__
-+# include
-+#else
-+# include
-+#endif
-+ Syntax error
-+_ACEOF
-+if ac_fn_c_try_cpp "$LINENO"; then :
-+
-+else
-+ # Broken: fails on valid input.
-+continue
-+fi
-+rm -f conftest.err conftest.$ac_ext
-+
-+ # OK, works on sane cases. Now check whether nonexistent headers
-+ # can be detected and how.
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#include
-+_ACEOF
-+if ac_fn_c_try_cpp "$LINENO"; then :
-+ # Broken: success on invalid input.
-+continue
-+else
-+ # Passes both tests.
-+ac_preproc_ok=:
-+break
-+fi
-+rm -f conftest.err conftest.$ac_ext
-+
-+done
-+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-+rm -f conftest.err conftest.$ac_ext
-+if $ac_preproc_ok; then :
-+
-+else
-+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+as_fn_error "C preprocessor \"$CPP\" fails sanity check
-+See \`config.log' for more details." "$LINENO" 5; }
-+fi
-+
-+ac_ext=c
-+ac_cpp='$CPP $CPPFLAGS'
-+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-+ac_compiler_gnu=$ac_cv_c_compiler_gnu
-+
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-+if test "${ac_cv_path_GREP+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if test -z "$GREP"; then
-+ ac_path_GREP_found=false
-+ # Loop through the user's path and test for each of PROGNAME-LIST
-+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_prog in grep ggrep; do
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-+# Check for GNU ac_path_GREP and select it if it is found.
-+ # Check for GNU $ac_path_GREP
-+case `"$ac_path_GREP" --version 2>&1` in
-+*GNU*)
-+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-+*)
-+ ac_count=0
-+ $as_echo_n 0123456789 >"conftest.in"
-+ while :
-+ do
-+ cat "conftest.in" "conftest.in" >"conftest.tmp"
-+ mv "conftest.tmp" "conftest.in"
-+ cp "conftest.in" "conftest.nl"
-+ $as_echo 'GREP' >> "conftest.nl"
-+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-+ as_fn_arith $ac_count + 1 && ac_count=$as_val
-+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
-+ # Best one so far, save it but keep looking for a better one
-+ ac_cv_path_GREP="$ac_path_GREP"
-+ ac_path_GREP_max=$ac_count
-+ fi
-+ # 10*(2^10) chars as input seems more than enough
-+ test $ac_count -gt 10 && break
-+ done
-+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-+esac
-+
-+ $ac_path_GREP_found && break 3
-+ done
-+ done
-+ done
-+IFS=$as_save_IFS
-+ if test -z "$ac_cv_path_GREP"; then
-+ as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-+ fi
-+else
-+ ac_cv_path_GREP=$GREP
-+fi
-+
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-+$as_echo "$ac_cv_path_GREP" >&6; }
-+ GREP="$ac_cv_path_GREP"
-+
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-+$as_echo_n "checking for egrep... " >&6; }
-+if test "${ac_cv_path_EGREP+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-+ then ac_cv_path_EGREP="$GREP -E"
-+ else
-+ if test -z "$EGREP"; then
-+ ac_path_EGREP_found=false
-+ # Loop through the user's path and test for each of PROGNAME-LIST
-+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-+do
-+ IFS=$as_save_IFS
-+ test -z "$as_dir" && as_dir=.
-+ for ac_prog in egrep; do
-+ for ac_exec_ext in '' $ac_executable_extensions; do
-+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-+# Check for GNU ac_path_EGREP and select it if it is found.
-+ # Check for GNU $ac_path_EGREP
-+case `"$ac_path_EGREP" --version 2>&1` in
-+*GNU*)
-+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-+*)
-+ ac_count=0
-+ $as_echo_n 0123456789 >"conftest.in"
-+ while :
-+ do
-+ cat "conftest.in" "conftest.in" >"conftest.tmp"
-+ mv "conftest.tmp" "conftest.in"
-+ cp "conftest.in" "conftest.nl"
-+ $as_echo 'EGREP' >> "conftest.nl"
-+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-+ as_fn_arith $ac_count + 1 && ac_count=$as_val
-+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
-+ # Best one so far, save it but keep looking for a better one
-+ ac_cv_path_EGREP="$ac_path_EGREP"
-+ ac_path_EGREP_max=$ac_count
-+ fi
-+ # 10*(2^10) chars as input seems more than enough
-+ test $ac_count -gt 10 && break
-+ done
-+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-+esac
-+
-+ $ac_path_EGREP_found && break 3
-+ done
-+ done
-+ done
-+IFS=$as_save_IFS
-+ if test -z "$ac_cv_path_EGREP"; then
-+ as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-+ fi
-+else
-+ ac_cv_path_EGREP=$EGREP
-+fi
-+
-+ fi
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-+$as_echo "$ac_cv_path_EGREP" >&6; }
-+ EGREP="$ac_cv_path_EGREP"
-+
-+
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-+$as_echo_n "checking for ANSI C header files... " >&6; }
-+if test "${ac_cv_header_stdc+set}" = set; then :
-+ $as_echo_n "(cached) " >&6
-+else
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#include
-+#include
-+#include
-+#include
-+
-+int
-+main ()
-+{
-+
-+ ;
-+ return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+ ac_cv_header_stdc=yes
-+else
-+ ac_cv_header_stdc=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+
-+if test $ac_cv_header_stdc = yes; then
-+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#include
-+
-+_ACEOF
-+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-+ $EGREP "memchr" >/dev/null 2>&1; then :
-+
-+else
-+ ac_cv_header_stdc=no
-+fi
-+rm -f conftest*
-+
-+fi
-+
-+if test $ac_cv_header_stdc = yes; then
-+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#include
-+
-+_ACEOF
-+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-+ $EGREP "free" >/dev/null 2>&1; then :
-+
-+else
-+ ac_cv_header_stdc=no
-+fi
-+rm -f conftest*
-+
-+fi
-+
-+if test $ac_cv_header_stdc = yes; then
-+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-+ if test "$cross_compiling" = yes; then :
-+ :
-+else
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+#include
-+#include
-+#if ((' ' & 0x0FF) == 0x020)
-+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-+#else
-+# define ISLOWER(c) \
-+ (('a' <= (c) && (c) <= 'i') \
-+ || ('j' <= (c) && (c) <= 'r') \
-+ || ('s' <= (c) && (c) <= 'z'))
-+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-+#endif
-+
-+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-+int
-+main ()
-+{
-+ int i;
-+ for (i = 0; i < 256; i++)
-+ if (XOR (islower (i), ISLOWER (i))
-+ || toupper (i) != TOUPPER (i))
-+ return 2;
-+ return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+
-+else
-+ ac_cv_header_stdc=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+ conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
-+
-+fi
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-+$as_echo "$ac_cv_header_stdc" >&6; }
-+if test $ac_cv_header_stdc = yes; then
-+
-+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-+
-+fi
-+
-+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-+ inttypes.h stdint.h unistd.h
-+do :
-+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-+"
-+eval as_val=\$$as_ac_Header
-+ if test "x$as_val" = x""yes; then :
-+ cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
-+
-+fi
-+
-+done
-+
-+
-+for ac_header in unistd.h sys/stat.h
-+do :
-+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-+eval as_val=\$$as_ac_Header
-+ if test "x$as_val" = x""yes; then :
-+ cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
-+
-+fi
-+
-+done
-+
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra programs to build requiring -lcuda" >&5
- $as_echo_n "checking for extra programs to build requiring -lcuda... " >&6; }
diff --git a/plans/ci.fmf b/plans/ci.fmf
new file mode 100644
index 0000000..b661134
--- /dev/null
+++ b/plans/ci.fmf
@@ -0,0 +1,13 @@
+summary: CI Gating Plan
+discover:
+ how: fmf
+ url: https://gitlab.com/redhat/centos-stream/tests/gcc.git
+ filter: 'tag: Fedora-CI-gating'
+execute:
+ how: tmt
+adjust:
+ - prepare+:
+ - name: Add secondary architecture RPMs
+ how: shell
+ script: ./plans/provide_secondary_arch_rpms.sh
+ when: arch == x86_64
diff --git a/plans/provide_secondary_arch_rpms.sh b/plans/provide_secondary_arch_rpms.sh
new file mode 100755
index 0000000..f26a5ab
--- /dev/null
+++ b/plans/provide_secondary_arch_rpms.sh
@@ -0,0 +1,64 @@
+#!/usr/bin/env bash
+
+# Fedora CI testing systems don't provide a repository with the i686
+# RPMs of the build being tested. As a consequence, most
+# dnf install -y .i686
+# commands (whether being run by a test or by TMT's prepare) will probably
+# fail on a version mismatch with the present x86_64 gcc RPMs. To prevent
+# such failures we provide this script which we recommend to include in every
+# Fedora CI test plan.
+#
+# Implementation notes:
+#
+# * The gcc build being tested in Fedora CI is given via KOJI_TASK_ID. See
+# https://github.com/fedora-ci/dist-git-pipeline/pull/50 for details.
+#
+# * Currently this script just downloads and installs the i686 RPMs. It
+# would not be sufficient for tests that uninstall and reinstall those
+# RPMs. If such a test appears, this script should create a repository.
+#
+# * Fedora CI testing systems seem to have extremely small RAM-based /tmp,
+# unable to host all the downloaded RPMs, and no other "real" filesystem
+# than "/". That's the reason for using
+# mktemp -d --tmpdir=/
+
+set -x
+
+true "V-V-V-V-V-V-V-V-V-V-V-V-V-V-V-V-V-V-V-V-V-V-V-V-V-V-V-V-V-V-V-V-V-V-V"
+
+echo "KOJI_TASK_ID=$KOJI_TASK_ID"
+
+. /etc/os-release
+
+echo "ID=$ID"
+echo "arch=$(arch)"
+echo "KOJI_TASK_ID=$KOJI_TASK_ID"
+
+if [[ "$ID" = fedora ]] && [[ "$(arch)" = x86_64 ]] && [[ -n "$KOJI_TASK_ID" ]]; then
+
+ if tmpd=$(mktemp -d --tmpdir=/) && pushd "$tmpd"; then
+
+ # Download
+ rpm -q koji || dnf -y install koji
+ koji download-task "$KOJI_TASK_ID" --noprogress --arch={x86_64,i686,noarch}
+
+ # Remove conflicting RPMs
+ rm -f ./*debuginfo* ./*debugsource*
+ rm -f gcc-[0-9]*.i686.*
+ rm -f ./*docs*.i686.*
+
+ # Install
+ ls
+ dnf -y install ./*.rpm
+
+ # Clean up
+ # shellcheck disable=SC2164
+ popd
+ rm -rf "$tmpd"
+ fi
+
+else
+ echo "Not applicable"
+fi
+
+true "^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^"
diff --git a/rpminspect.yaml b/rpminspect.yaml
new file mode 100644
index 0000000..f31bc02
--- /dev/null
+++ b/rpminspect.yaml
@@ -0,0 +1,37 @@
+inspections:
+ # GCC subpackages are inter-dependent but without requesting an explicit
+ # version - which rpmdeps dislikes and creates huge reports. We can't fix
+ # it easily and it's not a practical problem anyway. Unfortunately we
+ # can't tell rpmdeps to ignore just that particular warning. Switching off
+ # the rpmdeps checks looks like a lesser evil.
+ rpmdeps: off
+
+badfuncs:
+ # GCC doesn't use the so called bad functions "much". If they appear then
+ # - it is instrumenting them in sanitizers
+ # - in languages that don't move further downstream.
+ # We are OK with that.
+ ignore:
+ - /usr/lib*/libasan.so.*.*.*
+ - /usr/lib*/libtsan.so.*.*.*
+ - /usr/lib*/libgnat-*.so
+ - /usr/lib*/libgphobos.so.*.*.*
+ - /usr/lib*/libm2iso.so.*.*.*
+ - /usr/lib*/libm2pim.so.*.*.*
+
+pathmigration:
+ # Incomplete UsrMove, known but not planned at the moment
+ ignore:
+ - /lib*/libgcc_s-*.so.*
+ - /lib*/libgcc_s.so.*
+
+debuginfo:
+ # Skip the Go binaries, they ship unstripped
+ ignore:
+ - /usr/bin/go.gcc
+ - /usr/bin/gofmt.gcc
+ - /usr/lib*/libgo.so.*.*.*
+ - /usr/libexec/gcc/*-redhat-linux/*/buildid
+ - /usr/libexec/gcc/*-redhat-linux/*/cgo
+ - /usr/libexec/gcc/*-redhat-linux/*/test2json
+ - /usr/libexec/gcc/*-redhat-linux/*/vet
diff --git a/sources b/sources
index d019e58..f1dba4c 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,4 @@
-SHA512 (gcc-8.2.1-20190109.tar.xz) = d699b52baa2c54a71f2fef2dd77701baa836737975938d67fb532f1a54638b1442fc04b560fd74e66b44195e4de9ce485100b9bdbac569e4c3abad053a96bc33
-SHA512 (nvptx-newlib-aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24.tar.xz) = 94f7089365296f7dfa485107b4143bebc850a81586f3460fd896bbbb6ba099a00217d4042133424fd2183b352132f4fd367e6a60599bdae2a26dfd48a77d0e04
-SHA512 (nvptx-tools-c28050f60193b3b95a18866a96f03334e874e78f.tar.xz) = a688cb12cf805950a5abbb13b52f45c81dbee98e310b7ed57ae20e76dbfa5964a16270148374a6426d177db71909d28360490f091c86a5d19d4faa5127beeee1
+SHA512 (gcc-16.0.1-20260115.tar.xz) = 51ab079dedde5547caba601ce03954d4c5b2bf687538f106d3e851a8918162017fe65817d9e22fd115cf4d4f970bfba6a70a34db183141ce28c5c203a68eec0b
+SHA512 (isl-0.24.tar.bz2) = aab3bddbda96b801d0f56d2869f943157aad52a6f6e6a61745edd740234c635c38231af20bc3f1a08d416a5e973a90e18249078ed8e4ae2f1d5de57658738e95
+SHA512 (newlib-cygwin-d35cc82b5ec15bb8a5fe0fe11e183d1887992e99.tar.xz) = ef9495745a96d1d76f9f425c4a48c807fface36a1aa92351c5d024103678d144d046e8de55d195103784472c14874e29e4b9284d5d6a2e7bb27fd98c8455a881
+SHA512 (nvptx-tools-a0c1fff6534a4df9fb17937c3c4a4b1071212029.tar.xz) = 7f862986065028df70c843fc3f2c89e200a76b48ad0bd51c749ac8a5aab7be0ebdf35be182fad2407b3281615e75be1ac6833ab6a5130ae9920169a0412f94f0
diff --git a/update-gcc.sh b/update-gcc.sh
new file mode 100755
index 0000000..47d7d70
--- /dev/null
+++ b/update-gcc.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+if [ "$#" -eq 0 ]; then
+ echo "Usage: ./update-gcc.sh gcc/redhat/heads/gcc-NN-branch_commit_hash [git_reference_dir_to_speed_up]"
+ exit 1
+fi
+export LC_ALL=C
+if ! [ -f gcc.spec ]; then echo Must be run in the directory with gcc.spec file.; exit 1; fi
+if [ -d gcc-dir.tmp ]; then echo gcc-dir.tmp already exists.; exit 1; fi
+v=`sed -n 's/^%global gcc_version //p' gcc.spec`
+p=`sed -n 's/^%global gitrev //p' gcc.spec`
+h=$1
+if [ "$#" -ge 2 ]; then
+ git clone --dissociate --reference $2 https://gcc.gnu.org/git/gcc.git gcc-dir.tmp
+else
+ git clone https://gcc.gnu.org/git/gcc.git gcc-dir.tmp
+fi
+git --git-dir=gcc-dir.tmp/.git fetch origin $h
+d=`date --iso | sed 's/-//g'`
+cd gcc-dir.tmp
+git diff $p..$h > P1
+git log --format=%B `git log --format='%ae %H' $p..$h | awk '/^gccadmin@gcc.gnu.org/{print $2;exit 0}'`..$h > P2
+diff -up /dev/null P2 >> P1
+sed -n 's,^+[[:blank:]]\+PR \([a-z0-9+-]\+/[0-9]\+\)$,\1,p' P1 | sed 's/ - .*$//;s/[: ;.]//g' | LC_ALL=C sort -u -t / -k 1,1 -k 2,2n > P3
+> P4
+for i in `cat P3`; do if grep -F $i ../gcc.spec >/dev/null; then echo $i already recorded.; else echo $i >> P4; fi; done
+case "$v" in
+ *.0.*) echo "- update from trunk" > P5;;
+ *) echo "- update from releases/gcc-`echo $v | sed 's/\..*$//'` branch" > P5;;
+esac
+echo `cat P4` | sed 's/ /, /g' | fold -w 71 -s | sed '1s/^/ - PRs /;2,$s/^/ /;s/, $/,/' >> P5
+echo >> P5
+cd ..
+sed -i -e '/^%global gitrev /s/ [0-9a-f]\+$/ '$h'/;/^%global DATE /s/ [0-9]\+$/ '$d'/;/^%changelog$/r gcc-dir.tmp/P5' gcc.spec
+git --git-dir=gcc-dir.tmp/.git archive --prefix=gcc-$v-$d/ $h | xz -9e > gcc-$v-$d.tar.xz
+rm -rf gcc-dir.tmp
+fedpkg new-sources gcc-$v-$d.tar.xz `sed 's/SHA512 (\(.*\)) = [0-9a-f]\+$/\1/' sources | grep -v '^gcc-'`