From e6bd15375399370a88c6e6794255b2f866aac27f Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 7 Feb 2018 16:24:43 +0100 Subject: [PATCH] 8.0.1-0.12 --- .gitignore | 1 + gcc.spec | 72 ++++++++++++------ gcc8-pr84128.patch | 180 --------------------------------------------- gcc8-pr84146.patch | 79 -------------------- gcc8-pr84252.patch | 50 +++++++++++++ sources | 2 +- 6 files changed, 103 insertions(+), 281 deletions(-) delete mode 100644 gcc8-pr84128.patch delete mode 100644 gcc8-pr84146.patch create mode 100644 gcc8-pr84252.patch diff --git a/.gitignore b/.gitignore index 0d3f871..0ef4b54 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ /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 diff --git a/gcc.spec b/gcc.spec index 9f6ce77..a71ba81 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,10 +1,10 @@ -%global DATE 20180131 -%global SVNREV 257268 +%global DATE 20180207 +%global SVNREV 257452 %global gcc_version 8.0.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 0.11 +%global gcc_release 0.12 %global nvptx_tools_gitrev c28050f60193b3b95a18866a96f03334e874e78f %global nvptx_newlib_gitrev aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24 %global _unpackaged_files_terminate_build 0 @@ -235,8 +235,7 @@ Patch9: gcc8-aarch64-async-unw-tables.patch Patch10: gcc8-foffload-default.patch Patch11: gcc8-Wno-format-security.patch Patch12: gcc8-rh1512529-aarch64.patch -Patch13: gcc8-pr84146.patch -Patch14: gcc8-pr84128.patch +Patch13: gcc8-pr84252.patch Patch1000: nvptx-tools-no-ptxas.patch Patch1001: nvptx-tools-build.patch @@ -260,6 +259,27 @@ Patch1002: nvptx-tools-glibc.patch %global gcc_target_platform %{_target_platform} %endif +%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}/bin/go.gcc \ +chmod 644 %{buildroot}%{_prefix}/bin/gofmt.gcc \ +chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/cgo \ +chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/buildid \ +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}/bin/go.gcc \ +chmod 755 %{buildroot}%{_prefix}/bin/gofmt.gcc \ +chmod 755 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/cgo \ +chmod 755 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/buildid \ +chmod 755 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/test2json \ +chmod 755 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/vet \ +%{nil} +%endif + %description The gcc package contains the GNU Compiler Collection version 8. You'll need this package in order to compile C code. @@ -775,8 +795,7 @@ to NVidia PTX capable devices if available. %patch10 -p0 -b .foffload-default~ %patch11 -p0 -b .Wno-format-security~ %patch12 -p0 -b .rh1512529-aarch64~ -%patch13 -p0 -b .pr84146~ -%patch14 -p0 -b .pr84128~ +%patch13 -p0 -b .pr84252~ cd nvptx-tools-%{nvptx_tools_gitrev} %patch1000 -p1 -b .nvptx-tools-no-ptxas~ @@ -1755,16 +1774,6 @@ chmod 755 %{buildroot}%{_prefix}/%{_lib}/libtsan.so.0.* %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}/bin/go.gcc -chmod 644 %{buildroot}%{_prefix}/bin/gofmt.gcc -chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/cgo -chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/buildid -chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/test2json -chmod 644 %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/vet -%endif chmod 755 %{buildroot}%{_prefix}/%{_lib}/libobjc.so.4.* %if %{build_ada} @@ -3038,13 +3047,34 @@ fi %endif %changelog +* 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 +- use generic tuning for armhfp -* Mon Feb 5 2018 Richard W.M. Jones 8.0.1-0.10 -- Disable multilib on riscv64. +* 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 +* 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) diff --git a/gcc8-pr84128.patch b/gcc8-pr84128.patch deleted file mode 100644 index 454fc09..0000000 --- a/gcc8-pr84128.patch +++ /dev/null @@ -1,180 +0,0 @@ - - PR target/84128 - * config/i386/i386.c (release_scratch_register_on_entry): Add new - OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore - the scratch if RELEASE_VIA_POP is false. - (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE. - If we have to save a temporary register, decrement SIZE appropriately. - Pass new arguments to release_scratch_register_on_entry. - (ix86_adjust_stack_and_probe): Likewise. - (ix86_emit_probe_stack_range): Pass new arguments to - release_scratch_register_on_entry. - - PR target/84128 - * gcc.target/i386/pr84128.c: New test. - -diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c -index fef34a1..3196ac4 100644 ---- gcc/config/i386/i386.c -+++ gcc/config/i386/i386.c -@@ -12567,22 +12567,39 @@ get_scratch_register_on_entry (struct scratch_reg *sr) - } - } - --/* Release a scratch register obtained from the preceding function. */ -+/* Release a scratch register obtained from the preceding function. -+ -+ If RELEASE_VIA_POP is true, we just pop the register off the stack -+ to release it. This is what non-Linux systems use with -fstack-check. -+ -+ Otherwise we use OFFSET to locate the saved register and the -+ allocated stack space becomes part of the local frame and is -+ deallocated by the epilogue. */ - - static void --release_scratch_register_on_entry (struct scratch_reg *sr) -+release_scratch_register_on_entry (struct scratch_reg *sr, HOST_WIDE_INT offset, -+ bool release_via_pop) - { - if (sr->saved) - { -- struct machine_function *m = cfun->machine; -- rtx x, insn = emit_insn (gen_pop (sr->reg)); -+ if (release_via_pop) -+ { -+ struct machine_function *m = cfun->machine; -+ rtx x, insn = emit_insn (gen_pop (sr->reg)); - -- /* The RTX_FRAME_RELATED_P mechanism doesn't know about pop. */ -- RTX_FRAME_RELATED_P (insn) = 1; -- x = gen_rtx_PLUS (Pmode, stack_pointer_rtx, GEN_INT (UNITS_PER_WORD)); -- x = gen_rtx_SET (stack_pointer_rtx, x); -- add_reg_note (insn, REG_FRAME_RELATED_EXPR, x); -- m->fs.sp_offset -= UNITS_PER_WORD; -+ /* The RX FRAME_RELATED_P mechanism doesn't know about pop. */ -+ RTX_FRAME_RELATED_P (insn) = 1; -+ x = gen_rtx_PLUS (Pmode, stack_pointer_rtx, GEN_INT (UNITS_PER_WORD)); -+ x = gen_rtx_SET (stack_pointer_rtx, x); -+ add_reg_note (insn, REG_FRAME_RELATED_EXPR, x); -+ m->fs.sp_offset -= UNITS_PER_WORD; -+ } -+ else -+ { -+ rtx x = gen_rtx_PLUS (Pmode, stack_pointer_rtx, GEN_INT (offset)); -+ x = gen_rtx_SET (sr->reg, gen_rtx_MEM (word_mode, x)); -+ emit_insn (x); -+ } - } - } - -@@ -12597,7 +12614,7 @@ release_scratch_register_on_entry (struct scratch_reg *sr) - pushed on the stack. */ - - static void --ix86_adjust_stack_and_probe_stack_clash (const HOST_WIDE_INT size, -+ix86_adjust_stack_and_probe_stack_clash (HOST_WIDE_INT size, - const bool int_registers_saved) - { - struct machine_function *m = cfun->machine; -@@ -12713,6 +12730,12 @@ ix86_adjust_stack_and_probe_stack_clash (const HOST_WIDE_INT size, - struct scratch_reg sr; - get_scratch_register_on_entry (&sr); - -+ /* If we needed to save a register, then account for any space -+ that was pushed (we are not going to pop the register when -+ we do the restore). */ -+ if (sr.saved) -+ size -= UNITS_PER_WORD; -+ - /* Step 1: round SIZE down to a multiple of the interval. */ - HOST_WIDE_INT rounded_size = size & -probe_interval; - -@@ -12761,7 +12784,9 @@ ix86_adjust_stack_and_probe_stack_clash (const HOST_WIDE_INT size, - m->fs.cfa_reg == stack_pointer_rtx); - dump_stack_clash_frame_info (PROBE_LOOP, size != rounded_size); - -- release_scratch_register_on_entry (&sr); -+ /* This does not deallocate the space reserved for the scratch -+ register. That will be deallocated in the epilogue. */ -+ release_scratch_register_on_entry (&sr, size, false); - } - - /* Make sure nothing is scheduled before we are done. */ -@@ -12774,7 +12799,7 @@ ix86_adjust_stack_and_probe_stack_clash (const HOST_WIDE_INT size, - pushed on the stack. */ - - static void --ix86_adjust_stack_and_probe (const HOST_WIDE_INT size, -+ix86_adjust_stack_and_probe (HOST_WIDE_INT size, - const bool int_registers_saved) - { - /* We skip the probe for the first interval + a small dope of 4 words and -@@ -12847,6 +12872,11 @@ ix86_adjust_stack_and_probe (const HOST_WIDE_INT size, - - get_scratch_register_on_entry (&sr); - -+ /* If we needed to save a register, then account for any space -+ that was pushed (we are not going to pop the register when -+ we do the restore). */ -+ if (sr.saved) -+ size -= UNITS_PER_WORD; - - /* Step 1: round SIZE to the previous multiple of the interval. */ - -@@ -12906,7 +12936,9 @@ ix86_adjust_stack_and_probe (const HOST_WIDE_INT size, - (get_probe_interval () - + dope)))); - -- release_scratch_register_on_entry (&sr); -+ /* This does not deallocate the space reserved for the scratch -+ register. That will be deallocated in the epilogue. */ -+ release_scratch_register_on_entry (&sr, size, false); - } - - /* Even if the stack pointer isn't the CFA register, we need to correctly -@@ -13055,7 +13087,7 @@ ix86_emit_probe_stack_range (HOST_WIDE_INT first, HOST_WIDE_INT size, - sr.reg), - rounded_size - size)); - -- release_scratch_register_on_entry (&sr); -+ release_scratch_register_on_entry (&sr, size, true); - } - - /* Make sure nothing is scheduled before we are done. */ - -diff --git a/gcc/testsuite/gcc.target/i386/pr84128.c b/gcc/testsuite/gcc.target/i386/pr84128.c -new file mode 100644 -index 0000000..a8323fd6 ---- /dev/null -+++ gcc/testsuite/gcc.target/i386/pr84128.c -@@ -0,0 +1,30 @@ -+/* { dg-do run } */ -+/* { dg-options "-O2 -march=i686 -mtune=generic -fstack-clash-protection" } */ -+/* { dg-require-effective-target ia32 } */ -+ -+__attribute__ ((noinline, noclone, weak, regparm (3))) -+int -+f1 (long arg0, int (*pf) (long, void *)) -+{ -+ unsigned char buf[32768]; -+ return pf (arg0, buf); -+} -+ -+__attribute__ ((noinline, noclone, weak)) -+int -+f2 (long arg0, void *ignored) -+{ -+ if (arg0 != 17) -+ __builtin_abort (); -+ return 19; -+} -+ -+int -+main (void) -+{ -+ if (f1 (17, f2) != 19) -+ __builtin_abort (); -+ return 0; -+} -+ -+ diff --git a/gcc8-pr84146.patch b/gcc8-pr84146.patch deleted file mode 100644 index 8891c7b..0000000 --- a/gcc8-pr84146.patch +++ /dev/null @@ -1,79 +0,0 @@ -2018-01-31 Jakub Jelinek - - PR target/84146 - * config/i386/i386.c (rest_of_insert_endbranch): Only skip - NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else, - and skip it regardless of bb boundaries. Use CALL_P macro, - don't test INSN_P (insn) together with CALL_P or JUMP_P check - unnecessarily, formatting fix. - - * gcc.target/i386/pr84146.c: New test. - ---- gcc/config/i386/i386.c.jj 2018-01-31 09:26:18.341505667 +0100 -+++ gcc/config/i386/i386.c 2018-01-31 14:13:33.815243832 +0100 -@@ -2609,31 +2609,27 @@ rest_of_insert_endbranch (void) - for (insn = BB_HEAD (bb); insn != NEXT_INSN (BB_END (bb)); - insn = NEXT_INSN (insn)) - { -- if (INSN_P (insn) && GET_CODE (insn) == CALL_INSN) -+ if (CALL_P (insn)) - { - if (find_reg_note (insn, REG_SETJMP, NULL) == NULL) - continue; - /* Generate ENDBRANCH after CALL, which can return more than - twice, setjmp-like functions. */ - -- /* Skip notes and debug insns that must be next to the -- call insn. ??? This might skip a lot more than -- that... ??? Skipping barriers and emitting code -- after them surely looks like a mistake; we probably -- won't ever hit it, for we'll hit BB_END first. */ -+ /* Skip notes that must immediately follow the call insn. */ - rtx_insn *next_insn = insn; -- while ((next_insn != BB_END (bb)) -- && (DEBUG_INSN_P (NEXT_INSN (next_insn)) -- || NOTE_P (NEXT_INSN (next_insn)) -- || BARRIER_P (NEXT_INSN (next_insn)))) -- next_insn = NEXT_INSN (next_insn); -+ if (NEXT_INSN (insn) -+ && NOTE_P (NEXT_INSN (insn)) -+ && (NOTE_KIND (NEXT_INSN (insn)) -+ == NOTE_INSN_CALL_ARG_LOCATION)) -+ next_insn = NEXT_INSN (insn); - - cet_eb = gen_nop_endbr (); - emit_insn_after_setloc (cet_eb, next_insn, INSN_LOCATION (insn)); - continue; - } - -- if (INSN_P (insn) && JUMP_P (insn) && flag_cet_switch) -+ if (JUMP_P (insn) && flag_cet_switch) - { - rtx target = JUMP_LABEL (insn); - if (target == NULL_RTX || ANY_RETURN_P (target)) -@@ -2668,7 +2664,7 @@ rest_of_insert_endbranch (void) - if ((LABEL_P (insn) && LABEL_PRESERVE_P (insn)) - || (NOTE_P (insn) - && NOTE_KIND (insn) == NOTE_INSN_DELETED_LABEL)) --/* TODO. Check /s bit also. */ -+ /* TODO. Check /s bit also. */ - { - cet_eb = gen_nop_endbr (); - emit_insn_after (cet_eb, insn); ---- gcc/testsuite/gcc.target/i386/pr84146.c.jj 2018-01-31 16:32:28.099929916 +0100 -+++ gcc/testsuite/gcc.target/i386/pr84146.c 2018-01-31 14:04:17.796122397 +0100 -@@ -0,0 +1,14 @@ -+/* PR target/84146 */ -+/* { dg-do compile } */ -+/* { dg-options "-O2 -g -mcet -fcf-protection=full" } */ -+ -+int __setjmp (void **); -+void *buf[64]; -+ -+void -+foo (void) -+{ -+ __setjmp (buf); -+ for (;;) -+ ; -+} diff --git a/gcc8-pr84252.patch b/gcc8-pr84252.patch new file mode 100644 index 0000000..cc3ef6e --- /dev/null +++ b/gcc8-pr84252.patch @@ -0,0 +1,50 @@ +2018-02-07 Jakub Jelinek + + PR debug/84252 + * var-tracking.c (vt_add_function_parameter): Punt for non-onepart + PARALLEL incoming that failed vt_get_decl_and_offset check. + + * gcc.target/aarch64/pr84252.c: New test. + +--- gcc/var-tracking.c.jj 2018-01-04 00:43:15.007702432 +0100 ++++ gcc/var-tracking.c 2018-02-07 12:47:09.735980882 +0100 +@@ -9653,6 +9653,7 @@ vt_add_function_parameter (tree parm) + poly_int64 offset; + dataflow_set *out; + decl_or_value dv; ++ bool incoming_ok = true; + + if (TREE_CODE (parm) != PARM_DECL) + return; +@@ -9743,6 +9744,7 @@ vt_add_function_parameter (tree parm) + + if (!vt_get_decl_and_offset (incoming, &decl, &offset)) + { ++ incoming_ok = false; + if (MEM_P (incoming)) + { + /* This means argument is passed by invisible reference. */ +@@ -9861,6 +9863,10 @@ vt_add_function_parameter (tree parm) + { + int i; + ++ /* The following code relies on vt_get_decl_and_offset returning true for ++ incoming, which might not be always the case. */ ++ if (!incoming_ok) ++ return; + for (i = 0; i < XVECLEN (incoming, 0); i++) + { + rtx reg = XEXP (XVECEXP (incoming, 0, i), 0); +--- gcc/testsuite/gcc.target/aarch64/pr84252.c.jj 2018-02-07 14:01:27.987436160 +0100 ++++ gcc/testsuite/gcc.target/aarch64/pr84252.c 2018-02-07 13:59:47.736644299 +0100 +@@ -0,0 +1,10 @@ ++/* PR debug/84252 */ ++/* { dg-do compile } */ ++/* { dg-options "-g -O2" } */ ++ ++struct S { __Int32x4_t b[2]; }; ++ ++void ++foo (struct S x) ++{ ++} diff --git a/sources b/sources index d1d2fef..0102c41 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (gcc-8.0.1-20180131.tar.xz) = c9416d69a0dad197f538b48086107ccbea0118b47ca72e0ef7356628f2bf0075d0cebe73ee97a6d61d48b736829e676337adc2d046500ffa797ffad8b20f36d8 +SHA512 (gcc-8.0.1-20180207.tar.xz) = 1846a80298e5cea659c386558ba53ccbc005436a1669aef7e3faa8dd9813fbaaf5b76f495461b08b1515f206515134d578272f3d827c165faee484e746f70e05 SHA512 (nvptx-newlib-aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24.tar.xz) = 94f7089365296f7dfa485107b4143bebc850a81586f3460fd896bbbb6ba099a00217d4042133424fd2183b352132f4fd367e6a60599bdae2a26dfd48a77d0e04 SHA512 (nvptx-tools-c28050f60193b3b95a18866a96f03334e874e78f.tar.xz) = a688cb12cf805950a5abbb13b52f45c81dbee98e310b7ed57ae20e76dbfa5964a16270148374a6426d177db71909d28360490f091c86a5d19d4faa5127beeee1