[gentoo-commits] proj/gcc-patches:master commit in: 9.3.0/gentoo/
commit: 030174db141cce9adcdbb3ba40231663aeae7145 Author: Sam James gentoo org> AuthorDate: Fri Dec 17 02:16:35 2021 + Commit: Sam James gentoo org> CommitDate: Sat Dec 18 22:00:28 2021 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=030174db 9.3.0: add cyclades patch, cut 5 patchset Needed gnat-gpl-2020. Bug: https://bugs.gentoo.org/829141 Signed-off-by: Sam James gentoo.org> 9.3.0/gentoo/75_all_remove_cyclades.patch | 127 ++ 9.3.0/gentoo/README.history | 3 +- 2 files changed, 129 insertions(+), 1 deletion(-) diff --git a/9.3.0/gentoo/75_all_remove_cyclades.patch b/9.3.0/gentoo/75_all_remove_cyclades.patch new file mode 100644 index 000..57d5043 --- /dev/null +++ b/9.3.0/gentoo/75_all_remove_cyclades.patch @@ -0,0 +1,127 @@ +https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=f45fc759ee4bac87fcdb6bc790a221205aa3eb5a +https://bugs.gentoo.org/829141 + +Needed for gnat-gpl-2020. + +From 2b40941d23b1570cdd90083b58fa0f66aa58c86e Mon Sep 17 00:00:00 2001 +From: Tamar Christina +Date: Fri, 21 May 2021 12:16:56 +0100 +Subject: [PATCH 1/1] libsanitizer: Remove cyclades from libsanitizer + +The Linux kernel has removed the interface to cyclades from +the latest kernel headers[1] due to them being orphaned for the +past 13 years. + +libsanitizer uses this header when compiling against glibc, but +glibcs itself doesn't seem to have any references to cyclades. + +Further more it seems that the driver is broken in the kernel and +the firmware doesn't seem to be available anymore. + +As such since this is breaking the build of libsanitizer (and so the +GCC bootstrap[2]) I propose to remove this. + +[1] https://lkml.org/lkml/2021/3/2/153 +[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100379 + +libsanitizer/ChangeLog: + + PR sanitizer/100379 + * sanitizer_common/sanitizer_common_interceptors_ioctl.inc: Cherry-pick + llvm-project revision f7c5351552387bd43f6ca3631016d7f0dfe0f135. + * sanitizer_common/sanitizer_platform_limits_posix.cc: Likewise. + * sanitizer_common/sanitizer_platform_limits_posix.h: Likewise. +--- + .../sanitizer_common_interceptors_ioctl.inc | 9 - + .../sanitizer_platform_limits_posix.cc| 11 --- + .../sanitizer_platform_limits_posix.h | 10 -- + 3 files changed, 30 deletions(-) + +diff --git a/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc +index 5408ea17c59..7a9cd3f5968 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc +@@ -365,15 +365,6 @@ static void ioctl_table_fill() { + + #if SANITIZER_LINUX && !SANITIZER_ANDROID + // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE +- _(CYGETDEFTHRESH, WRITE, sizeof(int)); +- _(CYGETDEFTIMEOUT, WRITE, sizeof(int)); +- _(CYGETMON, WRITE, struct_cyclades_monitor_sz); +- _(CYGETTHRESH, WRITE, sizeof(int)); +- _(CYGETTIMEOUT, WRITE, sizeof(int)); +- _(CYSETDEFTHRESH, NONE, 0); +- _(CYSETDEFTIMEOUT, NONE, 0); +- _(CYSETTHRESH, NONE, 0); +- _(CYSETTIMEOUT, NONE, 0); + _(EQL_EMANCIPATE, WRITE, struct_ifreq_sz); + _(EQL_ENSLAVE, WRITE, struct_ifreq_sz); + _(EQL_GETMASTRCFG, WRITE, struct_ifreq_sz); +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +index d823a12190c..e8fce8a0287 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -157,7 +157,6 @@ typedef struct user_fpregs elf_fpregset_t; + # include + #endif + #include +-#include + #include + #include + #include +@@ -466,7 +465,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); + + #if SANITIZER_LINUX && !SANITIZER_ANDROID + unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct); +- unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor); + #if EV_VERSION > (0x01) + unsigned struct_input_keymap_entry_sz = sizeof(struct input_keymap_entry); + #else +@@ -833,15 +831,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); + #endif // SANITIZER_LINUX || SANITIZER_FREEBSD + + #if SANITIZER_LINUX && !SANITIZER_ANDROID +- unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH; +- unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT; +- unsigned IOCTL_CYGETMON = CYGETMON; +- unsigned IOCTL_CYGETTHRESH = CYGETTHRESH; +- unsigned IOCTL_CYGETTIMEOUT = CYGETTIMEOUT; +- unsigned IOCTL_CYSETDEFTHRESH = CYSETDEFTHRESH; +- unsigned IOCTL_CYSETDEFTIMEOUT = CYSETDEFTIMEOUT; +- unsigned IOCTL_CYSETTHRESH = CYSETTHRESH; +- unsigned IOCTL_CYSETTIMEOUT = CYSETTIMEOUT; + unsigned IOCTL_EQL_EMANCIPATE = EQL_EMANCIPATE; + unsigned IOCTL_EQL_ENSLAVE =
[gentoo-commits] proj/gcc-patches:master commit in: 9.3.0/gentoo/
commit: 42fd29a7f1f28a6599ccd2089da1e1526b91e780 Author: Sergei Trofimovich gentoo org> AuthorDate: Thu Mar 4 10:59:04 2021 + Commit: Sergei Trofimovich gentoo org> CommitDate: Thu Mar 4 10:59:04 2021 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=42fd29a7 9.3.0: backport PR97236: fix bad use of VMAT_CONTIGUOUS Bug: https://gcc.gnu.org/PR97236 Signed-off-by: Sergei Trofimovich gentoo.org> 9.3.0/gentoo/33_all_vmat-PR97236.patch | 118 + 9.3.0/gentoo/README.history| 3 + 2 files changed, 121 insertions(+) diff --git a/9.3.0/gentoo/33_all_vmat-PR97236.patch b/9.3.0/gentoo/33_all_vmat-PR97236.patch new file mode 100644 index 000..ca7df78 --- /dev/null +++ b/9.3.0/gentoo/33_all_vmat-PR97236.patch @@ -0,0 +1,118 @@ +https://gcc.gnu.org/PR97236 + +From 97b668f9a8c6ec565c278a60e7d1492a6932e409 Mon Sep 17 00:00:00 2001 +From: Matthias Klose +Date: Tue, 6 Oct 2020 13:41:37 +0200 +Subject: [PATCH] Backport fix for PR/tree-optimization/97236 - fix bad use of + VMAT_CONTIGUOUS + +This avoids using VMAT_CONTIGUOUS with single-element interleaving +when using V1mode vectors. Instead keep VMAT_ELEMENTWISE but +continue to avoid load-lanes and gathers. + +2020-10-01 Richard Biener + + PR tree-optimization/97236 + * tree-vect-stmts.c (get_group_load_store_type): Keep + VMAT_ELEMENTWISE for single-element vectors. + + * gcc.dg/vect/pr97236.c: New testcase. + +(cherry picked from commit 1ab88985631dd2c5a5e3b5c0dce47cf8b6ed2f82) +--- + gcc/testsuite/gcc.dg/vect/pr97236.c | 43 + + gcc/tree-vect-stmts.c | 20 ++ + 2 files changed, 52 insertions(+), 11 deletions(-) + create mode 100644 gcc/testsuite/gcc.dg/vect/pr97236.c + +diff --git a/gcc/testsuite/gcc.dg/vect/pr97236.c b/gcc/testsuite/gcc.dg/vect/pr97236.c +new file mode 100644 +index 000..9d3dc20d953 +--- /dev/null b/gcc/testsuite/gcc.dg/vect/pr97236.c +@@ -0,0 +1,43 @@ ++typedef unsigned char __uint8_t; ++typedef __uint8_t uint8_t; ++typedef struct plane_t { ++ uint8_t *p_pixels; ++ int i_lines; ++ int i_pitch; ++} plane_t; ++ ++typedef struct { ++ plane_t p[5]; ++} picture_t; ++ ++#define N 4 ++ ++void __attribute__((noipa)) ++picture_Clone(picture_t *picture, picture_t *res) ++{ ++ for (int i = 0; i < N; i++) { ++res->p[i].p_pixels = picture->p[i].p_pixels; ++res->p[i].i_lines = picture->p[i].i_lines; ++res->p[i].i_pitch = picture->p[i].i_pitch; ++ } ++} ++ ++int ++main() ++{ ++ picture_t aaa, bbb; ++ uint8_t pixels[10] = {1, 1, 1, 1, 1, 1, 1, 1}; ++ ++ for (unsigned i = 0; i < N; i++) ++aaa.p[i].p_pixels = pixels; ++ ++ picture_Clone (, ); ++ ++ uint8_t c = 0; ++ for (unsigned i = 0; i < N; i++) ++c += bbb.p[i].p_pixels[0]; ++ ++ if (c != N) ++__builtin_abort (); ++ return 0; ++} +diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c +index 507f81b0a0e..ffbba3441de 100644 +--- a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c +@@ -2355,25 +2355,23 @@ get_group_load_store_type (stmt_vec_info stmt_info, tree vectype, bool slp, + /* First cope with the degenerate case of a single-element +vector. */ + if (known_eq (TYPE_VECTOR_SUBPARTS (vectype), 1U)) +- *memory_access_type = VMAT_CONTIGUOUS; ++ ; + + /* Otherwise try using LOAD/STORE_LANES. */ +-if (*memory_access_type == VMAT_ELEMENTWISE +-&& (vls_type == VLS_LOAD +-? vect_load_lanes_supported (vectype, group_size, masked_p) +-: vect_store_lanes_supported (vectype, group_size, +- masked_p))) ++else if (vls_type == VLS_LOAD ++ ? vect_load_lanes_supported (vectype, group_size, masked_p) ++ : vect_store_lanes_supported (vectype, group_size, ++ masked_p)) + { + *memory_access_type = VMAT_LOAD_STORE_LANES; + overrun_p = would_overrun_p; + } + + /* If that fails, try using permuting loads. */ +-if (*memory_access_type == VMAT_ELEMENTWISE +-&& (vls_type == VLS_LOAD +-? vect_grouped_load_supported (vectype, single_element_p, +- group_size) +-: vect_grouped_store_supported (vectype, group_size))) ++else if (vls_type == VLS_LOAD ++ ? vect_grouped_load_supported (vectype, single_element_p, ++group_size) ++ : vect_grouped_store_supported (vectype, group_size)) + { + *memory_access_type = VMAT_CONTIGUOUS_PERMUTE; + overrun_p = would_overrun_p; +-- +2.30.1 + diff --git a/9.3.0/gentoo/README.history b/9.3.0/gentoo/README.history index e00e2e2..a9fffed 100644 ---
[gentoo-commits] proj/gcc-patches:master commit in: 9.3.0/gentoo/
commit: 3a85230e907766210c490f3d5d39153f7728f73c Author: Sergei Trofimovich gentoo org> AuthorDate: Wed Nov 4 00:07:29 2020 + Commit: Sergei Trofimovich gentoo org> CommitDate: Wed Nov 4 07:25:58 2020 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=3a85230e 9.3.0: cut 4 patchset Three new patches: + 30_all_plugin-objdump.patch: always use prefixed objdump + 31_all_ipa-to_frequency.patch: fix ICE on empty profile merges. + 32_all_assume-aligned.patch: don't assume alignment Bug: https://bugs.gentoo.org/746578 Bug: https://gcc.gnu.org/PR97295 Bug: https://bugs.gentoo.org/750905 Bug: https://gcc.gnu.org/PR94163 Signed-off-by: Sergei Trofimovich gentoo.org> 9.3.0/gentoo/README.history | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/9.3.0/gentoo/README.history b/9.3.0/gentoo/README.history index 70b06c9..e00e2e2 100644 --- a/9.3.0/gentoo/README.history +++ b/9.3.0/gentoo/README.history @@ -1,4 +1,4 @@ -4 TODO +4 04 Nov 2020 + 30_all_plugin-objdump.patch U 11_all_extra-options.patch + 31_all_ipa-to_frequency.patch
[gentoo-commits] proj/gcc-patches:master commit in: 9.3.0/gentoo/
commit: 3f9f4ffb0ee9da59e44ff405a872c00736fa7159 Author: Sergei Trofimovich gentoo org> AuthorDate: Sun Nov 1 00:32:41 2020 + Commit: Sergei Trofimovich gentoo org> CommitDate: Sun Nov 1 00:32:41 2020 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=3f9f4ffb 9.3.0: backport assume_aligned fix (PR94163) Reported-by: Ervin Peters Bug: https://bugs.gentoo.org/750905 Bug: https://gcc.gnu.org/PR94163 Signed-off-by: Sergei Trofimovich gentoo.org> 9.3.0/gentoo/32_all_assume-aligned.patch | 31 +++ 9.3.0/gentoo/README.history | 1 + 2 files changed, 32 insertions(+) diff --git a/9.3.0/gentoo/32_all_assume-aligned.patch b/9.3.0/gentoo/32_all_assume-aligned.patch new file mode 100644 index 000..10dffbb --- /dev/null +++ b/9.3.0/gentoo/32_all_assume-aligned.patch @@ -0,0 +1,31 @@ +https://bugs.gentoo.org/750905 +https://gcc.gnu.org/PR94163 + +From db3584552871c8caccdc22e97ea1573da9458253 Mon Sep 17 00:00:00 2001 +From: Richard Biener +Date: Fri, 13 Mar 2020 13:56:26 +0100 +Subject: [PATCH] tree-optimization/94163 constrain alignment set by PRE + +This avoids HWI -> unsigned truncation to end up with zero alignment +which set_ptr_info_alignment ICEs on. + +2020-03-13 Richard Biener + + PR tree-optimization/94163 + * tree-ssa-pre.c (create_expression_by_pieces): Check + whether alignment would be zero. +--- a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c +@@ -2810,7 +2810,8 @@ create_expression_by_pieces (basic_block block, pre_expr expr, + unsigned HOST_WIDE_INT hmisalign + = args.length () == 3 ? tree_to_uhwi (args[2]) : 0; + if ((halign & (halign - 1)) == 0 +-&& (hmisalign & ~(halign - 1)) == 0) ++&& (hmisalign & ~(halign - 1)) == 0 ++&& (unsigned int)halign != 0) + set_ptr_info_alignment (get_ptr_info (forcedname), + halign, hmisalign); + } +-- +2.29.2 + diff --git a/9.3.0/gentoo/README.history b/9.3.0/gentoo/README.history index ff47a81..70b06c9 100644 --- a/9.3.0/gentoo/README.history +++ b/9.3.0/gentoo/README.history @@ -2,6 +2,7 @@ + 30_all_plugin-objdump.patch U 11_all_extra-options.patch + 31_all_ipa-to_frequency.patch + + 32_all_assume-aligned.patch 3 29 May 2020 + 29_all_libcpp-ar.patch
[gentoo-commits] proj/gcc-patches:master commit in: 9.3.0/gentoo/
commit: 604daa40f01cb708beafcef226f1b207d576075d Author: Sergei Trofimovich gentoo org> AuthorDate: Thu Oct 15 21:35:46 2020 + Commit: Sergei Trofimovich gentoo org> CommitDate: Thu Oct 15 21:35:46 2020 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=604daa40 9.3.0: backport IPA to_frequency() ICE Reported-by: inasprecali disroot.org Bug: https://bugs.gentoo.org/746578 Bug: https://gcc.gnu.org/PR97295 Signed-off-by: Sergei Trofimovich gentoo.org> 9.3.0/gentoo/31_all_ipa-to_frequency.patch | 48 ++ 9.3.0/gentoo/README.history| 1 + 2 files changed, 49 insertions(+) diff --git a/9.3.0/gentoo/31_all_ipa-to_frequency.patch b/9.3.0/gentoo/31_all_ipa-to_frequency.patch new file mode 100644 index 000..0849207 --- /dev/null +++ b/9.3.0/gentoo/31_all_ipa-to_frequency.patch @@ -0,0 +1,48 @@ +https://bugs.gentoo.org/746578 +https://gcc.gnu.org/PR97295 + +From 508e2d88a4c512e8b8685cf5ba201ad48e6bb58d Mon Sep 17 00:00:00 2001 +From: Martin Liska +Date: Tue, 13 Oct 2020 16:44:47 +0200 +Subject: [PATCH] IPA: fix profile handling in IRA + +gcc/ChangeLog: + + PR ipa/97295 + * profile-count.c (profile_count::to_frequency): Move part of + gcc_assert to STATIC_ASSERT. + * regs.h (REG_FREQ_FROM_BB): Do not use count.to_frequency for + a function that does not have count_max initialized. +--- + gcc/profile-count.c | 4 ++-- + gcc/regs.h | 3 ++- + 2 files changed, 4 insertions(+), 3 deletions(-) + +--- a/gcc/profile-count.c b/gcc/profile-count.c +@@ -270,8 +270,8 @@ profile_count::to_frequency (struct function *fun) const + return BB_FREQ_MAX; + if (*this == zero ()) + return 0; +- gcc_assert (REG_BR_PROB_BASE == BB_FREQ_MAX +-&& fun->cfg->count_max.initialized_p ()); ++ STATIC_ASSERT (REG_BR_PROB_BASE == BB_FREQ_MAX); ++ gcc_assert (fun->cfg->count_max.initialized_p ()); + profile_probability prob = probability_in (fun->cfg->count_max); + if (!prob.initialized_p ()) + return REG_BR_PROB_BASE; +--- a/gcc/regs.h b/gcc/regs.h +@@ -128,7 +128,8 @@ extern size_t reg_info_p_size; +or profile driven feedback is available and the function is never executed, +frequency is always equivalent. Otherwise rescale the basic block +frequency. */ +-#define REG_FREQ_FROM_BB(bb) (optimize_function_for_size_p (cfun) \ ++#define REG_FREQ_FROM_BB(bb) ((optimize_function_for_size_p (cfun) \ ++ || !cfun->cfg->count_max.initialized_p ()) \ + ? REG_FREQ_MAX \ + : ((bb)->count.to_frequency (cfun) \ + * REG_FREQ_MAX / BB_FREQ_MAX) \ +-- +2.28.0 + diff --git a/9.3.0/gentoo/README.history b/9.3.0/gentoo/README.history index 9dbbc19..ff47a81 100644 --- a/9.3.0/gentoo/README.history +++ b/9.3.0/gentoo/README.history @@ -1,6 +1,7 @@ 4 TODO + 30_all_plugin-objdump.patch U 11_all_extra-options.patch + + 31_all_ipa-to_frequency.patch 3 29 May 2020 + 29_all_libcpp-ar.patch
[gentoo-commits] proj/gcc-patches:master commit in: 9.3.0/gentoo/
commit: c5f94af7f0e3c8e908746f14d522967ee5031668 Author: Sergei Trofimovich gentoo org> AuthorDate: Fri Aug 28 19:01:02 2020 + Commit: Sergei Trofimovich gentoo org> CommitDate: Fri Aug 28 19:01:02 2020 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=c5f94af7 9.3.0: backport 'objdump' lookup for plugins Signed-off-by: Sergei Trofimovich gentoo.org> 9.3.0/gentoo/30_all_plugin-objdump.patch | 34 9.3.0/gentoo/README.history | 3 +++ 2 files changed, 37 insertions(+) diff --git a/9.3.0/gentoo/30_all_plugin-objdump.patch b/9.3.0/gentoo/30_all_plugin-objdump.patch new file mode 100644 index 000..a9c33fd --- /dev/null +++ b/9.3.0/gentoo/30_all_plugin-objdump.patch @@ -0,0 +1,34 @@ +https://gcc.gnu.org/PR95648 +--- a/config/gcc-plugin.m4 b/config/gcc-plugin.m4 +@@ -45,7 +45,7 @@ AC_DEFUN([GCC_ENABLE_PLUGINS], + ;; + *) +if test x$build = x$host; then +- export_sym_check="objdump${exeext} -T" ++ export_sym_check="$ac_cv_prog_OBJDUMP -T" +elif test x$host = x$target; then +export_sym_check="$gcc_cv_objdump -T" +else +--- a/gcc/configure b/gcc/configure +@@ -30386,7 +30386,7 @@ fi + ;; + *) +if test x$build = x$host; then +- export_sym_check="objdump${exeext} -T" ++ export_sym_check="$ac_cv_prog_OBJDUMP -T" +elif test x$host = x$target; then +export_sym_check="$gcc_cv_objdump -T" +else +--- a/libcc1/configure b/libcc1/configure +@@ -14819,7 +14819,7 @@ fi + ;; + *) +if test x$build = x$host; then +- export_sym_check="objdump${exeext} -T" ++ export_sym_check="$ac_cv_prog_OBJDUMP -T" +elif test x$host = x$target; then +export_sym_check="$gcc_cv_objdump -T" +else diff --git a/9.3.0/gentoo/README.history b/9.3.0/gentoo/README.history index 7cd4a84..d8c024d 100644 --- a/9.3.0/gentoo/README.history +++ b/9.3.0/gentoo/README.history @@ -1,3 +1,6 @@ +4 TODO + + 30_all_plugin-objdump.patch + 3 29 May 2020 + 29_all_libcpp-ar.patch
[gentoo-commits] proj/gcc-patches:master commit in: 9.3.0/gentoo/
commit: ab6ae685eb5c56d622cb74c2a8b81a0e565e12aa Author: Sergei Trofimovich gentoo org> AuthorDate: Fri May 29 21:03:53 2020 + Commit: Sergei Trofimovich gentoo org> CommitDate: Fri May 29 21:03:53 2020 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=ab6ae685 9.3.0: cut 3 patchset One new patch: - 29_all_libcpp-ar.patch: respect user's AR Reported-by: Agostino Sarubbo Bug: https://bugs.gentoo.org/718004 Bug: https://gcc.gnu.org/PR94657 Signed-off-by: Sergei Trofimovich gentoo.org> 9.3.0/gentoo/README.history | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/9.3.0/gentoo/README.history b/9.3.0/gentoo/README.history index d6c1828..7cd4a84 100644 --- a/9.3.0/gentoo/README.history +++ b/9.3.0/gentoo/README.history @@ -1,4 +1,4 @@ -3 TODO +3 29 May 2020 + 29_all_libcpp-ar.patch 2 01 Apr 2020
[gentoo-commits] proj/gcc-patches:master commit in: 9.3.0/gentoo/
commit: baf79867c63ff919483051395b518822fa501a41 Author: Sergei Trofimovich gentoo org> AuthorDate: Sun Apr 19 09:45:02 2020 + Commit: Sergei Trofimovich gentoo org> CommitDate: Sun Apr 19 09:45:02 2020 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=baf79867 9.3.0: fix libcpp ar detection Reported-by: Agostino Sarubbo Bug: https://bugs.gentoo.org/718004 Bug: https://gcc.gnu.org/PR94657 Signed-off-by: Sergei Trofimovich gentoo.org> 9.3.0/gentoo/29_all_libcpp-ar.patch | 143 9.3.0/gentoo/README.history | 3 + 2 files changed, 146 insertions(+) diff --git a/9.3.0/gentoo/29_all_libcpp-ar.patch b/9.3.0/gentoo/29_all_libcpp-ar.patch new file mode 100644 index 000..55f2944 --- /dev/null +++ b/9.3.0/gentoo/29_all_libcpp-ar.patch @@ -0,0 +1,143 @@ +https://bugs.gentoo.org/718004 +https://gcc.gnu.org/PR94657 + +Make sue we use ${CHOST}-ar and not 'ar'. + +--- a/libcpp/configure.ac b/libcpp/configure.ac +@@ -12,6 +12,7 @@ AC_PROG_INSTALL + AC_PROG_CC + AC_PROG_CXX + AC_PROG_RANLIB ++AC_CHECK_TOOL(AR, ar) + + AC_USE_SYSTEM_EXTENSIONS + AC_SYS_LARGEFILE +--- a/libcpp/Makefile.in b/libcpp/Makefile.in +@@ -25,7 +25,7 @@ srcdir = @srcdir@ + top_builddir = . + VPATH = @srcdir@ + INSTALL = @INSTALL@ +-AR = ar ++AR = @AR@ + ARFLAGS = cru + ACLOCAL = @ACLOCAL@ + AUTOCONF = @AUTOCONF@ +--- a/libcpp/configure b/libcpp/configure +@@ -657,6 +657,7 @@ ACLOCAL + EGREP + GREP + CPP ++AR + RANLIB + ac_ct_CXX + CXXFLAGS +@@ -1038,6 +1039,7 @@ do + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + ++ + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ +@@ -4006,6 +4008,98 @@ else + RANLIB="$ac_cv_prog_RANLIB" + fi + ++if test -n "$ac_tool_prefix"; then ++ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. ++set dummy ${ac_tool_prefix}ar; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_AR+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$AR"; then ++ ac_cv_prog_AR="$AR" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ac_cv_prog_AR="${ac_tool_prefix}ar" ++$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++AR=$ac_cv_prog_AR ++if test -n "$AR"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 ++$as_echo "$AR" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ ++fi ++if test -z "$ac_cv_prog_AR"; then ++ ac_ct_AR=$AR ++ # Extract the first word of "ar", so it can be a program name with args. ++set dummy ar; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if ${ac_cv_prog_ac_ct_AR+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test -n "$ac_ct_AR"; then ++ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. ++else ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++for ac_exec_ext in '' $ac_executable_extensions; do ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ++ac_cv_prog_ac_ct_AR="ar" ++$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++break 2 ++ fi ++done ++ done ++IFS=$as_save_IFS ++ ++fi ++fi ++ac_ct_AR=$ac_cv_prog_ac_ct_AR ++if test -n "$ac_ct_AR"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 ++$as_echo "$ac_ct_AR" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi ++ ++ if test "x$ac_ct_AR" = x; then ++AR="" ++ else ++case $cross_compiling:$ac_tool_warned in ++yes:) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 ++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ++ac_tool_warned=yes ;; ++esac ++AR=$ac_ct_AR ++ fi ++else ++ AR="$ac_cv_prog_AR" ++fi ++ + + + ac_ext=c diff --git a/9.3.0/gentoo/README.history b/9.3.0/gentoo/README.history index 7aea050..d6c1828 100644 --- a/9.3.0/gentoo/README.history +++ b/9.3.0/gentoo/README.history @@ -1,3 +1,6 @@ +3 TODO + + 29_all_libcpp-ar.patch + 2 01 Apr 2020 - 04_all_default-ssp-fix.patch + 04_all_nossp-on-nostdlib.patch
[gentoo-commits] proj/gcc-patches:master commit in: 9.3.0/gentoo/
commit: 74c0b4bdd3eb8ae414272eb0097a79ea746c5f23 Author: Sergei Trofimovich gentoo org> AuthorDate: Wed Apr 1 07:03:10 2020 + Commit: Sergei Trofimovich gentoo org> CommitDate: Wed Apr 1 07:03:10 2020 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=74c0b4bd 9.3.0: cut 2 patchset One new patch: + 28_all_hppa-faster-synth_mult.patch: speed up xxhash compilation on hppa One old patch is split in two: - 04_all_default-ssp-fix.patch + 04_all_nossp-on-nostdlib.patch + 27_all_default_ssp-buffer-size.patch to separate two independent fixes. Signed-off-by: Sergei Trofimovich gentoo.org> 9.3.0/gentoo/README.history | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/9.3.0/gentoo/README.history b/9.3.0/gentoo/README.history index 5da5a24..7aea050 100644 --- a/9.3.0/gentoo/README.history +++ b/9.3.0/gentoo/README.history @@ -1,4 +1,4 @@ -2 TODO +2 01 Apr 2020 - 04_all_default-ssp-fix.patch + 04_all_nossp-on-nostdlib.patch + 27_all_default_ssp-buffer-size.patch
[gentoo-commits] proj/gcc-patches:master commit in: 9.3.0/gentoo/
commit: 0bc14fb37320230d55449627a143c97cb187bdf1 Author: Sergei Trofimovich gentoo org> AuthorDate: Tue Mar 31 23:07:39 2020 + Commit: Sergei Trofimovich gentoo org> CommitDate: Tue Mar 31 23:07:39 2020 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=0bc14fb3 9.3.0: increase expmed cache size from 10^3 to 10^6 Without this patch is takes dev-libs/xxhash 1-2 hours to compile. With this patch - TODO measurements. It workarounds deficiency of synth_mult() which evics cache entries as it calculates optimal multiplication algorithm. xxhash is especially hevyweight as it's a 64-bit multiplication of large prime constants. Bug: https://gcc.gnu.org/PR87256 Signed-off-by: Sergei Trofimovich gentoo.org> 9.3.0/gentoo/28_all_hppa-faster-synth_mult.patch | 44 9.3.0/gentoo/README.history | 1 + 2 files changed, 45 insertions(+) diff --git a/9.3.0/gentoo/28_all_hppa-faster-synth_mult.patch b/9.3.0/gentoo/28_all_hppa-faster-synth_mult.patch new file mode 100644 index 000..e93aa40 --- /dev/null +++ b/9.3.0/gentoo/28_all_hppa-faster-synth_mult.patch @@ -0,0 +1,44 @@ +From 73a841928cc1b86f43108d2383a6242e7e61a785 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Tue, 31 Mar 2020 23:58:05 +0100 +Subject: [PATCH] gcc/expmed.h: increase cache size from 10^3 to 10^6 + +Without this patch is takes dev-libs/xxhash 1-2 hours +to compile. With this patch - TODO measurements. + +It workarounds deficiency of synth_mult() which evics +cache entries as it calculates optimal multiplication +algorithm. xxhash is especially hevyweight as it's a +64-bit multiplication of large prime constants. + +Bug: https://gcc.gnu.org/PR87256 +Signed-off-by: Sergei Trofimovich +--- + gcc/expmed.h | 13 - + 1 file changed, 8 insertions(+), 5 deletions(-) + +--- a/gcc/expmed.h b/gcc/expmed.h +@@ -127,11 +127,14 @@ struct alg_hash_entry { + }; + + /* The number of cache/hash entries. */ +-#if HOST_BITS_PER_WIDE_INT == 64 +-#define NUM_ALG_HASH_ENTRIES 1031 +-#else +-#define NUM_ALG_HASH_ENTRIES 307 +-#endif ++/* ++ * Workaround hppa2.0 synth_mult deficiency ++ * and allocate ~1 million slots: ++ * https://gcc.gnu.org/PR87256 ++ * That should increase RAM usage up to ~24MB ++ * per process. ++ */ ++#define NUM_ALG_HASH_ENTRIES 103 + + #define NUM_MODE_INT \ + (MAX_MODE_INT - MIN_MODE_INT + 1) +-- +2.26.0 + diff --git a/9.3.0/gentoo/README.history b/9.3.0/gentoo/README.history index e5865d4..5da5a24 100644 --- a/9.3.0/gentoo/README.history +++ b/9.3.0/gentoo/README.history @@ -2,6 +2,7 @@ - 04_all_default-ssp-fix.patch + 04_all_nossp-on-nostdlib.patch + 27_all_default_ssp-buffer-size.patch + + 28_all_hppa-faster-synth_mult.patch 1 12 Mar 2019 + 01_all_default-fortify-source.patch
[gentoo-commits] proj/gcc-patches:master commit in: 9.3.0/gentoo/
commit: 038fd4e08bbf78fabe2d8bb13aec85bd20a611b1 Author: Sergei Trofimovich gentoo org> AuthorDate: Sat Mar 14 10:46:40 2020 + Commit: Sergei Trofimovich gentoo org> CommitDate: Sat Mar 14 10:46:40 2020 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=038fd4e0 9.3.0: split 04_all_default-ssp-fix.patch in two No functional change should happen. gcc-10 got rid of defaults defined in .c file. We'll need to adapt one patch slightly. Signed-off-by: Sergei Trofimovich gentoo.org> ...efault-ssp-fix.patch => 04_all_nossp-on-nostdlib.patch} | 13 + 9.3.0/gentoo/27_all_default_ssp-buffer-size.patch | 14 ++ 9.3.0/gentoo/README.history| 5 + 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/9.3.0/gentoo/04_all_default-ssp-fix.patch b/9.3.0/gentoo/04_all_nossp-on-nostdlib.patch similarity index 67% rename from 9.3.0/gentoo/04_all_default-ssp-fix.patch rename to 9.3.0/gentoo/04_all_nossp-on-nostdlib.patch index d2deac7..648d712 100644 --- a/9.3.0/gentoo/04_all_default-ssp-fix.patch +++ b/9.3.0/gentoo/04_all_nossp-on-nostdlib.patch @@ -1,6 +1,6 @@ Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding -Change the buffer size. +https://bugs.gentoo.org/484714 --- a/gcc/gcc.c2017-07-04 09:15:57.740793000 +0200 +++ b/gcc/gcc.c2018-03-02 13:58:44.387741114 +0100 @@ -857,6 +857,12 @@ proper position among the other output f @@ -25,14 +25,3 @@ Change the buffer size. %{coverage:-fprofile-arcs -ftest-coverage}\ %{fprofile-arcs|fprofile-generate*|coverage:\ %{!fprofile-update=singel:\ a/gcc/params.def 2016-03-30 09:47:40.0 +0200 -+++ b/gcc/params.def 2016-09-19 12:56:58.443179039 +0200 -@@ -673,7 +673,7 @@ DEFPARAM (PARAM_INTEGER_SHARE_LIMIT, - DEFPARAM (PARAM_SSP_BUFFER_SIZE, - "ssp-buffer-size", - "The lower bound for a buffer to be considered for stack smashing protection.", --8, 1, 0) -+4, 1, 0) - - DEFPARAM (PARAM_MIN_SIZE_FOR_STACK_SHARING, - "min-size-for-stack-sharing", diff --git a/9.3.0/gentoo/27_all_default_ssp-buffer-size.patch b/9.3.0/gentoo/27_all_default_ssp-buffer-size.patch new file mode 100644 index 000..06b --- /dev/null +++ b/9.3.0/gentoo/27_all_default_ssp-buffer-size.patch @@ -0,0 +1,14 @@ +Change the minimal SSP buffer size. + +https://bugs.gentoo.org/484714 +--- a/gcc/params.def 2016-03-30 09:47:40.0 +0200 b/gcc/params.def 2016-09-19 12:56:58.443179039 +0200 +@@ -673,7 +673,7 @@ DEFPARAM (PARAM_INTEGER_SHARE_LIMIT, + DEFPARAM (PARAM_SSP_BUFFER_SIZE, + "ssp-buffer-size", + "The lower bound for a buffer to be considered for stack smashing protection.", +-8, 1, 0) ++4, 1, 0) + + DEFPARAM (PARAM_MIN_SIZE_FOR_STACK_SHARING, + "min-size-for-stack-sharing", diff --git a/9.3.0/gentoo/README.history b/9.3.0/gentoo/README.history index 6f2d71a..e5865d4 100644 --- a/9.3.0/gentoo/README.history +++ b/9.3.0/gentoo/README.history @@ -1,3 +1,8 @@ +2 TODO + - 04_all_default-ssp-fix.patch + + 04_all_nossp-on-nostdlib.patch + + 27_all_default_ssp-buffer-size.patch + 1 12 Mar 2019 + 01_all_default-fortify-source.patch + 02_all_default-warn-format-security.patch
[gentoo-commits] proj/gcc-patches:master commit in: 9.3.0/gentoo/
commit: 1994eb2bd79215a806f1d5a8cb4b57f805e3ce44 Author: Sergei Trofimovich gentoo org> AuthorDate: Thu Mar 12 22:20:26 2020 + Commit: Sergei Trofimovich gentoo org> CommitDate: Thu Mar 12 22:20:26 2020 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=1994eb2b 9.3.0: cut initial patchset, a copy of 9.2.0 patches All patches removed are backports: - 27_all_sparc-PIC-constant-PR91472.patch - 28_all_sparc-fpu-subregs-91269.patch - 29_all_mips_split_move-SEGV.patch - 30_all_arm64-march-native.patch - 31_all_openmp-for-SEGV.patch - 32_all_sparc-PIC-constant-part2.patch - 33_all_extend-lifetime.patch - 34_all_ia64-neg-insn-cost.patch - 35_all_glibc-2.31-libsanitizer-1.patch - 36_all_glibc-2.31-libsanitizer-2.patch - 37_all_whitespace-pa.patch Signed-off-by: Sergei Trofimovich gentoo.org> 9.3.0/gentoo/01_all_default-fortify-source.patch | 22 .../02_all_default-warn-format-security.patch | 22 9.3.0/gentoo/03_all_default-warn-trampolines.patch | 13 +++ 9.3.0/gentoo/04_all_default-ssp-fix.patch | 38 +++ 9.3.0/gentoo/05_all_alpha-mieee-default.patch | 39 +++ 9.3.0/gentoo/06_all_ia64_note.GNU-stack.patch | 92 .../gentoo/07_all_i386_libgcc_note.GNU-stack.patch | 54 + 9.3.0/gentoo/08_all_libiberty-asprintf.patch | 18 +++ 9.3.0/gentoo/09_all_libiberty-pic.patch| 10 ++ 9.3.0/gentoo/10_all_nopie-all-flags.patch | 18 +++ 9.3.0/gentoo/11_all_extra-options.patch| 89 +++ .../12_all_pr55930-dependency-tracking.patch | 18 +++ 9.3.0/gentoo/13_all_sh-drop-sysroot-suffix.patch | 32 ++ 9.3.0/gentoo/14_all_ia64-TEXTREL.patch | 22 9.3.0/gentoo/15_all_disable-systemtap-switch.patch | 122 + 9.3.0/gentoo/16_all_m68k-textrel-on-libgcc.patch | 93 9.3.0/gentoo/17_all_respect-build-cxxflags.patch | 39 +++ 9.3.0/gentoo/18_all_libgfortran-Werror.patch | 20 9.3.0/gentoo/19_all_libgomp-Werror.patch | 20 9.3.0/gentoo/20_all_libitm-Werror.patch| 19 9.3.0/gentoo/21_all_libatomic-Werror.patch | 19 9.3.0/gentoo/22_all_libbacktrace-Werror.patch | 17 +++ 9.3.0/gentoo/23_all_libsanitizer-Werror.patch | 17 +++ 9.3.0/gentoo/24_all_libstdcxx-no-vtv.patch | 61 +++ 9.3.0/gentoo/25_all_ia64-bootstrap.patch | 41 +++ 9.3.0/gentoo/26_all_disable-riscv32-ABIs.patch | 53 + 9.3.0/gentoo/README.history| 27 + 27 files changed, 1035 insertions(+) diff --git a/9.3.0/gentoo/01_all_default-fortify-source.patch b/9.3.0/gentoo/01_all_default-fortify-source.patch new file mode 100644 index 000..d307474 --- /dev/null +++ b/9.3.0/gentoo/01_all_default-fortify-source.patch @@ -0,0 +1,22 @@ +Taken Debian's patch and removed docs matches: +https://salsa.debian.org/toolchain-team/gcc.git +Also see https://bugs.gentoo.org/621036 where +initially Gentoo used too complicated macro. + +# DP: Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC, ObjC++, +# DP: if the optimization level is > 0 +--- a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c +@@ -951,6 +951,12 @@ c_cpp_builtins (cpp_reader *pfile) + builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0); + builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0); + ++#if !defined(ACCEL_COMPILER) ++ /* Fortify Source enabled by default for optimization levels > 0 */ ++ if (optimize) ++builtin_define_with_int_value ("_FORTIFY_SOURCE", 2); ++#endif ++ + /* Misc. */ + if (flag_gnu89_inline) + cpp_define (pfile, "__GNUC_GNU_INLINE__"); diff --git a/9.3.0/gentoo/02_all_default-warn-format-security.patch b/9.3.0/gentoo/02_all_default-warn-format-security.patch new file mode 100644 index 000..f809abd --- /dev/null +++ b/9.3.0/gentoo/02_all_default-warn-format-security.patch @@ -0,0 +1,22 @@ +Enable -Wformat and -Wformat-security by default. + +--- a/gcc/c-family/c.opt 2016-03-23 18:51:56.0 +0100 b/gcc/c-family/c.opt 2016-04-28 23:45:54.063351272 +0200 +@@ -459,7 +459,7 @@ C ObjC C++ ObjC++ Var(warn_format_nonlit + Warn about format strings that are not literals. + + Wformat-security +-C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0) ++C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0) + Warn about possible security problems with format functions. + + Wformat-signedness +@@ -475,7 +475,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_l + Warn about zero-length formats. + + Wformat= +-C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2) ++C ObjC C++ ObjC++ Joined RejectNegative