From 5e141990fb42f73cb145e51058cc3a2919cf7bf9 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sun, 26 Jan 2020 19:19:00 +0100 Subject: [PATCH] 10.0.1-0.6 --- .gitignore | 1 + gcc.spec | 45 +++++++++++++++++++++++++----- gcc10-pr92765-workaround.patch | 51 ++++++++++++++++++++++++++++++++++ sources | 2 +- 4 files changed, 91 insertions(+), 8 deletions(-) create mode 100644 gcc10-pr92765-workaround.patch diff --git a/.gitignore b/.gitignore index 8ce888f..97c751e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz /gcc-10.0.1-20200121.tar.xz /gcc-10.0.1-20200123.tar.xz +/gcc-10.0.1-20200126.tar.xz diff --git a/gcc.spec b/gcc.spec index 8512f0c..0ab2cfc 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,10 +1,10 @@ -%global DATE 20200123 -%global gitrev 083f4455962cb0f38e406792b5aaa198f77ecc60 +%global DATE 20200126 +%global gitrev 834af6f1f10cfe4642e6f690f0c7b6dae44de101 %global gcc_version 10.0.1 %global gcc_major 10 # 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 0.5 +%global gcc_release 0.6 %global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e %global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0 %global _unpackaged_files_terminate_build 0 @@ -29,13 +29,13 @@ %global build_go 0 %global build_d 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 @@ -71,7 +71,7 @@ %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 @@ -259,6 +259,7 @@ Patch8: gcc10-foffload-default.patch Patch9: gcc10-Wno-format-security.patch Patch10: gcc10-rh1574936.patch Patch11: gcc10-d-shared-libphobos.patch +Patch12: gcc10-pr92765-workaround.patch # On ARM EABI systems, we do want -gnueabi to be part of the # target triple. @@ -770,6 +771,7 @@ to NVidia PTX capable devices if available. %patch10 -p0 -b .rh1574936~ %endif %patch11 -p0 -b .d-shared-libphobos~ +%patch12 -p0 -b .pr92765-workaround~ echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE @@ -889,7 +891,7 @@ CONFIGURE_OPTS="\ %ifarch ppc64le --enable-targets=powerpcle-linux \ %endif -%ifarch ppc64le %{mips} riscv64 s390x +%ifarch ppc64le %{mips} s390x %ifarch s390x %if 0%{?fedora} < 32 --enable-multilib \ @@ -999,6 +1001,9 @@ 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 @@ -1113,6 +1118,19 @@ find rpm.doc -name \*ChangeLog\* | xargs bzip2 -9 %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} @@ -2349,6 +2367,10 @@ end %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} @@ -2978,6 +3000,15 @@ end %endif %changelog +* Sun Jan 26 2020 Jakub Jelinek 10.0.1-0.6 +- update from trunk + - PRs analyzer/93367, c++/90997, c++/92852, c++/93279, c++/93299, c++/93377, + c++/93400, c++/93414, inline-asm/93027, ipa/93166, target/13721, + target/92269, target/93395, target/93412, target/93430, + translation/90162, tree-optimization/92788 +- temporarily disable broken strcmp optimization (PR tree-optimization/92765) +- riscv64 tweaks from David Abdurachmanov (#1794343) + * Thu Jan 23 2020 Jakub Jelinek 10.0.1-0.5 - update from trunk - PRs analyzer/93307, analyzer/93316, analyzer/93352, analyzer/93375, diff --git a/gcc10-pr92765-workaround.patch b/gcc10-pr92765-workaround.patch new file mode 100644 index 0000000..ce8e033 --- /dev/null +++ b/gcc10-pr92765-workaround.patch @@ -0,0 +1,51 @@ +2020-01-26 Jakub Jelinek + + PR tree-optimization/92765 + * tree-ssa-strlen.c (handle_builtin_string_cmp): Temporarily disable + broken optimization. + + * gcc.dg/strlenopt-65.c: Add xfail. + * gcc.dg/strlenopt-69.c: Likewise. + * gcc.dg/strcmpopt_3.c: Likewise. + +--- gcc/tree-ssa-strlen.c.jj 2020-01-16 15:13:55.789044796 +0100 ++++ gcc/tree-ssa-strlen.c 2020-01-26 18:58:17.787571444 +0100 +@@ -4461,8 +4461,11 @@ handle_builtin_string_cmp (gimple_stmt_i + known to be unequal set the range of the result to non-zero. + This allows the call to be eliminated if its result is only + used in tests for equality to zero. */ ++#if 0 ++ /* Temporarily disabled due to PR92765. */ + wide_int zero = wi::zero (TYPE_PRECISION (TREE_TYPE (lhs))); + set_range_info (lhs, VR_ANTI_RANGE, zero, zero); ++#endif + return false; + } + /* When the two strings are definitely equal (such as when they +--- gcc/testsuite/gcc.dg/strlenopt-65.c.jj 2020-01-12 11:54:37.518396737 +0100 ++++ gcc/testsuite/gcc.dg/strlenopt-65.c 2020-01-26 19:03:42.310607725 +0100 +@@ -173,7 +173,7 @@ void test_strncmp_keep (const char *s, c + } + } + +-/* { dg-final { scan-tree-dump-times "call_in_true_branch_not_eliminated_" 0 "optimized" } } ++/* { dg-final { scan-tree-dump-times "call_in_true_branch_not_eliminated_" 0 "optimized" { xfail *-*-* } } } + + { dg-final { scan-tree-dump-times "call_made_in_true_branch_on_line_1\[0-9\]\[0-9\]\[0-9\]" 11 "optimized" } } + { dg-final { scan-tree-dump-times "call_made_in_false_branch_on_line_1\[0-9\]\[0-9\]\[0-9\]" 11 "optimized" } } */ +--- gcc/testsuite/gcc.dg/strlenopt-69.c.jj 2020-01-12 11:54:37.518396737 +0100 ++++ gcc/testsuite/gcc.dg/strlenopt-69.c 2020-01-26 19:04:04.913262008 +0100 +@@ -126,4 +126,4 @@ void test_array_copy_bounded (void) + A (strncmp (s, a4, 5)); clobber (a4); + } + +-/* { dg-final { scan-tree-dump-not "abort|strcmp|strncmp" "optimized" } } */ ++/* { dg-final { scan-tree-dump-not "abort|strcmp|strncmp" "optimized" { xfail *-*-* } } } */ +--- gcc/testsuite/gcc.dg/strcmpopt_3.c.jj 2020-01-12 11:54:37.515396783 +0100 ++++ gcc/testsuite/gcc.dg/strcmpopt_3.c 2020-01-26 19:03:08.123130636 +0100 +@@ -28,4 +28,4 @@ int main (void) + return 0; + } + +-/* { dg-final { scan-tree-dump-times "strcmp" 0 "optimized" } } */ ++/* { dg-final { scan-tree-dump-times "strcmp" 0 "optimized" { xfail *-*-* } } } */ diff --git a/sources b/sources index 7f8eaea..14edf4b 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (gcc-10.0.1-20200123.tar.xz) = 0f729f71a0538c18c9ad882871abaed82c25d00d9bec6d65fac484cf4d9397308a5a69260c10a5d3e7c461972d102032857cf89951026490bbe2076bc693f892 +SHA512 (gcc-10.0.1-20200126.tar.xz) = 6263b1e255939d37f51e99493658d140902aab17f8aa78ff26255076e77fe301694aa2993e258423c500d665614f372f68f20e3c910d497cdd35490b84c39975 SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 9ceea0b883185fe489724d54a7e909bb6ed4785fcadf80162033dc6a133e2657337175601278e4155d1f8fac275ff9c8a02572aea876166c608774c809f832e9 SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7