gcc-12.0.1-0.15

This commit is contained in:
Jakub Jelinek 2022-04-11 19:34:37 +02:00
parent fbdc8be2d5
commit 665f9ff9cb
5 changed files with 133 additions and 19 deletions

1
.gitignore vendored
View File

@ -68,3 +68,4 @@
/gcc-12.0.1-20220306.tar.xz /gcc-12.0.1-20220306.tar.xz
/gcc-12.0.1-20220308.tar.xz /gcc-12.0.1-20220308.tar.xz
/gcc-12.0.1-20220401.tar.xz /gcc-12.0.1-20220401.tar.xz
/gcc-12.0.1-20220411.tar.xz

View File

@ -1,5 +1,5 @@
%global DATE 20220401 %global DATE 20220411
%global gitrev 3b1a8bc028a968b01bbdb5f9cc5cd30402efae92 %global gitrev c520f3606c4d0f971a172e17c55b06aec363a417
%global gcc_version 12.0.1 %global gcc_version 12.0.1
%global gcc_major 12 %global gcc_major 12
# Note, gcc_release must be integer, if you want to add suffixes to # Note, gcc_release must be integer, if you want to add suffixes to
@ -117,10 +117,15 @@
%ifarch x86_64 %ifarch x86_64
%global multilib_32_arch i686 %global multilib_32_arch i686
%endif %endif
%if 0%{?fedora} >= 36
%global build_annobin_plugin 1
%else
%global build_annobin_plugin 0
%endif
Summary: Various compilers (C, C++, Objective-C, ...) Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc Name: gcc
Version: %{gcc_version} Version: %{gcc_version}
Release: %{gcc_release}.14%{?dist} Release: %{gcc_release}.15%{?dist}
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have # libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception. # GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
@ -270,7 +275,7 @@ Patch8: gcc12-no-add-needed.patch
Patch9: gcc12-Wno-format-security.patch Patch9: gcc12-Wno-format-security.patch
Patch10: gcc12-rh1574936.patch Patch10: gcc12-rh1574936.patch
Patch11: gcc12-d-shared-libphobos.patch Patch11: gcc12-d-shared-libphobos.patch
Patch12: gcc12-aarch64-tune.patch Patch12: gcc12-pr105214.patch
Patch100: gcc12-fortran-fdec-duplicates.patch Patch100: gcc12-fortran-fdec-duplicates.patch
Patch101: gcc12-fortran-flogical-as-integer.patch Patch101: gcc12-fortran-flogical-as-integer.patch
@ -773,6 +778,18 @@ NVidia PTX. OpenMP and OpenACC programs linked with -fopenmp will
by default add PTX code into the binaries, which can be offloaded by default add PTX code into the binaries, which can be offloaded
to NVidia PTX capable devices if available. to NVidia PTX 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 >= 10.62, annobin-plugin-gcc, 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 %prep
%setup -q -n gcc-%{version}-%{DATE} -a 1 -a 2 -a 3 %setup -q -n gcc-%{version}-%{DATE} -a 1 -a 2 -a 3
%patch0 -p0 -b .hack~ %patch0 -p0 -b .hack~
@ -792,7 +809,7 @@ to NVidia PTX capable devices if available.
%patch10 -p0 -b .rh1574936~ %patch10 -p0 -b .rh1574936~
%endif %endif
%patch11 -p0 -b .d-shared-libphobos~ %patch11 -p0 -b .d-shared-libphobos~
%patch12 -p0 -b .aarch64-tune~ %patch12 -p0 -b .pr105214~
%if 0%{?rhel} >= 9 %if 0%{?rhel} >= 9
%patch100 -p1 -b .fortran-fdec-duplicates~ %patch100 -p1 -b .fortran-fdec-duplicates~
@ -1208,6 +1225,26 @@ done)
rm -f rpm.doc/changelogs/gcc/ChangeLog.[1-9] rm -f rpm.doc/changelogs/gcc/ChangeLog.[1-9]
find rpm.doc -name \*ChangeLog\* | xargs bzip2 -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
make
cd ../..
%endif
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
mkdir -p %{buildroot} mkdir -p %{buildroot}
@ -2010,6 +2047,15 @@ echo gcc-%{version}-%{release}.%{_arch} > $FULLPATH/rpmver
ln -s ../../libexec/gcc/%{gcc_target_platform}/%{gcc_major}/liblto_plugin.so \ ln -s ../../libexec/gcc/%{gcc_target_platform}/%{gcc_major}/liblto_plugin.so \
%{buildroot}%{_libdir}/bfd-plugins/ %{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 %check
cd obj-%{gcc_target_platform} cd obj-%{gcc_target_platform}
@ -2020,6 +2066,7 @@ LC_ALL=C make %{?_smp_mflags} -k check ALT_CC_UNDER_TEST=gcc ALT_CXX_UNDER_TEST=
%else %else
RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector}'" || : RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector}'" || :
%endif %endif
%if !%{build_annobin_plugin}
if [ -f %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/annobin.so ]; then 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. # Test whether current annobin plugin won't fail miserably with the newly built gcc.
echo -e '#include <stdio.h>\nint main () { printf ("Hello, world!\\n"); return 0; }' > annobin-test.c echo -e '#include <stdio.h>\nint main () { printf ("Hello, world!\\n"); return 0; }' > annobin-test.c
@ -2050,9 +2097,12 @@ if [ -f %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/annobin.so
cat ANNOBINOUT ANNOBINRES[12] >> ANNOBINRES cat ANNOBINOUT ANNOBINRES[12] >> ANNOBINRES
rm -f ANNOBINOUT* ANNOBINRES[12] annobin-test{c,C} rm -f ANNOBINOUT* ANNOBINRES[12] annobin-test{c,C}
fi fi
%endif
echo ====================TESTING========================= echo ====================TESTING=========================
( LC_ALL=C ../contrib/test_summary || : ) 2>&1 | sed -n '/^cat.*EOF/,/^EOF/{/^cat.*EOF/d;/^EOF/d;/^LAST_UPDATED:/d;p;}' ( 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 [ -f ANNOBINRES ] && cat ANNOBINRES
%endif
echo ====================TESTING END===================== echo ====================TESTING END=====================
mkdir testlogs-%{_target_platform}-%{version}-%{release} mkdir testlogs-%{_target_platform}-%{version}-%{release}
for i in `find . -name \*.log | grep -F testsuite/ | grep -v 'config.log\|acats.*/tests/'`; do for i in `find . -name \*.log | grep -F testsuite/ | grep -v 'config.log\|acats.*/tests/'`; do
@ -3165,7 +3215,45 @@ end
%{_prefix}/%{_lib}/libgomp-plugin-nvptx.so.* %{_prefix}/%{_lib}/libgomp-plugin-nvptx.so.*
%endif %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 %changelog
* Mon Apr 11 2022 Jakub Jelinek <jakub@redhat.com> 12.0.1-0.15
- update from trunk
- PRs analyzer/102208, analyzer/103892, c++/91618, c++/92385, c++/96604,
c++/96645, c++/99479, c++/100370, c++/100608, c++/101051, c++/101677,
c++/101717, c++/101894, c++/103328, c++/103852, c++/104668,
c++/104702, c++/105110, c++/105143, c++/105186, c++/105187,
c++/105191, c/105149, c/105151, d/104740, driver/105096,
fortran/104210, fortran/105138, fortran/105184, ipa/103376,
ipa/104303, ipa/105166, jit/102824, libstdc++/105031,
libstdc++/105128, libstdc++/105146, libstdc++/105153,
libstdc++/105154, middle-end/105140, middle-end/105165,
rtl-optimization/104985, target/101908, target/102024, target/103147,
target/104049, target/104253, target/104409, target/104853,
target/104897, target/104987, target/105002, target/105069,
target/105123, target/105139, target/105144, target/105147,
target/105157, target/105197, testsuite/103196, testsuite/105095,
testsuite/105122, testsuite/105196, tree-optimization/102586,
tree-optimization/103761, tree-optimization/104639,
tree-optimization/104645, tree-optimization/105132,
tree-optimization/105142, tree-optimization/105148,
tree-optimization/105150, tree-optimization/105163,
tree-optimization/105173, tree-optimization/105175,
tree-optimization/105185, tree-optimization/105189,
tree-optimization/105198, tree-optimization/105218
- build annobin gcc plugin as part of gcc build into gcc-plugin-annobin
subpackage
* Sun Apr 3 2022 Jakub Jelinek <jakub@redhat.com> 12.0.1-0.14 * Sun Apr 3 2022 Jakub Jelinek <jakub@redhat.com> 12.0.1-0.14
- update from trunk - update from trunk
- revert delayed parse DMI change (PR c++/96645) - revert delayed parse DMI change (PR c++/96645)

View File

@ -1,13 +0,0 @@
2022-04-03 Jakub Jelinek <jakub@redhat.com>
* config/aarch64/aarch64-tune.md: Regenerate.
--- gcc/config/aarch64/aarch64-tune.md 2022-04-01 14:57:41.745622238 +0200
+++ gcc/config/aarch64/aarch64-tune.md 2022-04-03 12:55:41.667331201 +0200
@@ -1,5 +1,5 @@
;; -*- buffer-read-only: t -*-
;; Generated automatically by gentune.sh from aarch64-cores.def
(define_attr "tune"
- "cortexa34,cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,thunderx,thunderxt88p1,thunderxt88,octeontx,octeontxt81,octeontxt83,thunderxt81,thunderxt83,ampere1,emag,xgene1,falkor,qdf24xx,exynosm1,phecda,thunderx2t99p1,vulcan,thunderx2t99,cortexa55,cortexa75,cortexa76,cortexa76ae,cortexa77,cortexa78,cortexa78ae,cortexa78c,cortexa65,cortexa65ae,cortexx1,ares,neoversen1,neoversee1,octeontx2,octeontx2t98,octeontx2t96,octeontx2t93,octeontx2f95,octeontx2f95n,octeontx2f95mm,a64fx,tsv110,thunderx3t110,zeus,neoversev1,neoverse512tvb,saphira,neoversen2,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53,cortexa75cortexa55,cortexa76cortexa55,cortexr82,cortexa510,cortexa710,cortexx2,demeter"
+ "cortexa34,cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,thunderx,thunderxt88p1,thunderxt88,octeontx,octeontxt81,octeontxt83,thunderxt81,thunderxt83,ampere1,emag,xgene1,falkor,qdf24xx,exynosm1,phecda,thunderx2t99p1,vulcan,thunderx2t99,cortexa55,cortexa75,cortexa76,cortexa76ae,cortexa77,cortexa78,cortexa78ae,cortexa78c,cortexa65,cortexa65ae,cortexx1,ares,neoversen1,neoversee1,octeontx2,octeontx2t98,octeontx2t96,octeontx2t93,octeontx2f95,octeontx2f95n,octeontx2f95mm,a64fx,tsv110,thunderx3t110,zeus,neoversev1,neoverse512tvb,saphira,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53,cortexa75cortexa55,cortexa76cortexa55,cortexr82,cortexa510,cortexa710,cortexx2,neoversen2,demeter"
(const (symbol_ref "((enum attr_tune) aarch64_tune)")))

38
gcc12-pr105214.patch Normal file
View File

@ -0,0 +1,38 @@
2022-04-11 Jakub Jelinek <jakub@redhat.com>
PR target/105214
* config/i386/i386-expand.cc (ix86_emit_i387_log1p): Call
do_pending_stack_adjust.
* gcc.dg/asan/pr105214.c: New test.
--- gcc/config/i386/i386-expand.cc.jj 2022-04-03 21:50:36.001635947 +0200
+++ gcc/config/i386/i386-expand.cc 2022-04-11 15:17:43.943430658 +0200
@@ -17291,6 +17291,8 @@ void ix86_emit_i387_log1p (rtx op0, rtx
rtx cst, cstln2, cst1;
rtx_insn *insn;
+ do_pending_stack_adjust ();
+
cst = const_double_from_real_value
(REAL_VALUE_ATOF ("0.29289321881345247561810596348408353", XFmode), XFmode);
cstln2 = force_reg (XFmode, standard_80387_constant_rtx (4)); /* fldln2 */
--- gcc/testsuite/gcc.dg/asan/pr105214.c.jj 2022-04-11 15:21:05.467608711 +0200
+++ gcc/testsuite/gcc.dg/asan/pr105214.c 2022-04-11 15:22:10.559697224 +0200
@@ -0,0 +1,16 @@
+/* PR target/105214 */
+/* { dg-do compile } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O2" } } */
+/* { dg-options "-Ofast -fnon-call-exceptions -fexceptions -fstack-check=generic -fsanitize=address -fno-finite-math-only -fsignaling-nans -fno-associative-math" } */
+
+float f;
+void bar (int *);
+
+void
+foo (void)
+{
+ int a[1600], b[1];
+ f += __builtin_log1pf (f);
+ bar (a);
+ bar (b);
+}

View File

@ -1,4 +1,4 @@
SHA512 (gcc-12.0.1-20220401.tar.xz) = c32fe72884442d91dbade694515bc7d54cf2194cd3928e9d7168e7b5db0e244b30d8addde26633f936b2a0e17b30d94cdec594d6b834ae4b003f3210fb641f50 SHA512 (gcc-12.0.1-20220411.tar.xz) = c611c45dfa5c9c367203f6273e24c4ba03bb56a8dc8954e7b26b9fc0de60a2aefe2a2d12098daad827d2c0ad71ba1092b0d7f808eb9e8cf929ad22154176fda0
SHA512 (isl-0.18.tar.bz2) = 85d0b40f4dbf14cb99d17aa07048cdcab2dc3eb527d2fbb1e84c41b2de5f351025370e57448b63b2b8a8cf8a0843a089c3263f9baee1542d5c2e1cb37ed39d94 SHA512 (isl-0.18.tar.bz2) = 85d0b40f4dbf14cb99d17aa07048cdcab2dc3eb527d2fbb1e84c41b2de5f351025370e57448b63b2b8a8cf8a0843a089c3263f9baee1542d5c2e1cb37ed39d94
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7 SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7