diff --git a/.gitignore b/.gitignore
index 2058266..cde5f25 100644
--- a/.gitignore
+++ b/.gitignore
@@ -49,3 +49,5 @@
/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
diff --git a/gcc.spec b/gcc.spec
index eac6015..8424320 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20180626
-%global SVNREV 262161
-%global gcc_version 8.1.1
+%global DATE 20180726
+%global SVNREV 263019
+%global gcc_version 8.2.1
%global gcc_major 8
# Note, gcc_release must be integer, if you want to add suffixes to
# %%{release}, append them after %%{gcc_release} on Release: line.
-%global gcc_release 3
+%global gcc_release 1
%global nvptx_tools_gitrev c28050f60193b3b95a18866a96f03334e874e78f
%global nvptx_newlib_gitrev aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24
%global _unpackaged_files_terminate_build 0
@@ -15,6 +15,11 @@
# Until annobin is fixed (#1519165).
%undefine _annotated_build
%endif
+%if 0%{?rhel} >= 8
+%global build_ada 0
+%global build_objc 0
+%global build_go 0
+%else
%global multilib_64_archs sparc64 ppc64 ppc64p7 s390x x86_64
%ifarch %{ix86} x86_64 ia64 ppc %{power64} alpha s390x %{arm} aarch64
%global build_ada 1
@@ -27,6 +32,7 @@
%else
%global build_go 0
%endif
+%endif
%ifarch %{ix86} x86_64 ia64 ppc64le
%global build_libquadmath 1
%else
@@ -62,11 +68,15 @@
%else
%global build_libitm 0
%endif
+%if 0%{?rhel} >= 8
+%global build_libmpx 0
+%else
%ifarch %{ix86} x86_64
%global build_libmpx 1
%else
%global build_libmpx 0
%endif
+%endif
%global build_isl 1
%global build_libstdcxx_docs 1
%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64 %{mips}
@@ -132,8 +142,9 @@ URL: http://gcc.gnu.org
# Need binutils which support --no-add-needed >= 2.20.51.0.2-12
# 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} >= 8
-BuildRequires: binutils >= 2.30
+BuildRequires: binutils >= 2.31
%else
BuildRequires: binutils >= 2.24
%endif
@@ -204,8 +215,9 @@ Requires: cpp = %{version}-%{release}
# Need binutils that support --no-add-needed
# 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} >= 8
-Requires: binutils >= 2.30
+Requires: binutils >= 2.31
%else
Requires: binutils >= 2.24
%endif
@@ -249,6 +261,7 @@ Patch9: gcc8-foffload-default.patch
Patch10: gcc8-Wno-format-security.patch
Patch11: gcc8-rh1512529-aarch64.patch
Patch12: gcc8-mcet.patch
+Patch13: gcc8-rh1574936.patch
# See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84797
# Posted to gcc-patches: https://gcc.gnu.org/ml/gcc-patches/2018-05/msg00041.html
@@ -485,7 +498,11 @@ 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} >= 8
+BuildRequires: python3-sphinx
+%else
BuildRequires: python-sphinx
+%endif
Requires: libgccjit = %{version}-%{release}
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
@@ -815,7 +832,12 @@ to NVidia PTX capable devices if available.
%patch9 -p0 -b .foffload-default~
%patch10 -p0 -b .Wno-format-security~
%patch11 -p0 -b .rh1512529-aarch64~
+%if 0%{?fedora} == 28
%patch12 -p0 -b .mcet~
+%endif
+%if 0%{?fedora} >= 29 || 0%{?rhel} >= 8
+%patch13 -p0 -b .rh1574936~
+%endif
%patch50 -p1 -b .riscv64-multilib~
%patch51 -p1 -b .riscv64-libffi~
@@ -830,6 +852,8 @@ 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
@@ -3128,6 +3152,30 @@ fi
%endif
%changelog
+* 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,
diff --git a/gcc8-libstdc++-docs.patch b/gcc8-libstdc++-docs.patch
index 594ce19..e73a92b 100644
--- a/gcc8-libstdc++-docs.patch
+++ b/gcc8-libstdc++-docs.patch
@@ -4,7 +4,7 @@
FSF
-+ Release 8.1.1
++ Release 8.2.1
+
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation
@@ -17,7 +17,7 @@
- The API documentation, rendered into HTML, can be viewed online
+ The API documentation, rendered into HTML, can be viewed locally
-+ for the 8.1.1 release,
++ for the 8.2.1 release,
+ online
for each GCC release
and
diff --git a/gcc8-rh1574936.patch b/gcc8-rh1574936.patch
new file mode 100644
index 0000000..32db990
--- /dev/null
+++ b/gcc8-rh1574936.patch
@@ -0,0 +1,31 @@
+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/sources b/sources
index 85545f7..c702889 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-SHA512 (gcc-8.1.1-20180626.tar.xz) = 302eb327d0a2611c2133e189f4e671780ad243ed3395b82ed8f152244e8d2ec4f231531b3cd8b1bff2e775f0a4b9be9bcde5d52cfd7464c010053d4b6f2fa1e0
+SHA512 (gcc-8.2.1-20180726.tar.xz) = 7eca02af21f809d084c2069376be1dca0a47357ca9c7f1e6d3dd4069ce4adf766df4e3ca2cc96762e4285813babffb562b89d46456f2b55277246a450f1cecc5
SHA512 (nvptx-newlib-aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24.tar.xz) = 94f7089365296f7dfa485107b4143bebc850a81586f3460fd896bbbb6ba099a00217d4042133424fd2183b352132f4fd367e6a60599bdae2a26dfd48a77d0e04
SHA512 (nvptx-tools-c28050f60193b3b95a18866a96f03334e874e78f.tar.xz) = a688cb12cf805950a5abbb13b52f45c81dbee98e310b7ed57ae20e76dbfa5964a16270148374a6426d177db71909d28360490f091c86a5d19d4faa5127beeee1