commit:     9745c5273507a0eba8902f36737c0ef3d0219ce1
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 29 13:50:50 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Mar 29 13:51:24 2025 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=9745c527

15.0.0: add 35_all_checking-gc-use-heuristics.patch

GCC's --enable-checking=yes includes 'gc' which also then disables the
default (already conservative) GC threshold heuristics.

Bug: https://gcc.gnu.org/PR64500
Bug: https://gcc.gnu.org/PR116285
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../gentoo/35_all_checking-gc-use-heuristics.patch | 22 ++++++++++++++++++++++
 15.0.0/gentoo/README.history                       |  6 +++++-
 2 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/15.0.0/gentoo/35_all_checking-gc-use-heuristics.patch 
b/15.0.0/gentoo/35_all_checking-gc-use-heuristics.patch
new file mode 100644
index 0000000..35ba553
--- /dev/null
+++ b/15.0.0/gentoo/35_all_checking-gc-use-heuristics.patch
@@ -0,0 +1,22 @@
+GCC's --enable-checking=yes includes 'gc' which also then disables the
+default (already conservative) GC threshold heuristics.
+--- a/gcc/ggc-common.cc
++++ b/gcc/ggc-common.cc
+@@ -1029,7 +1029,7 @@ mmap_gt_pch_use_address (void *&base, size_t size, int 
fd, size_t offset)
+ }
+ #endif /* HAVE_MMAP_FILE */
+ 
+-#if !defined ENABLE_GC_CHECKING && !defined ENABLE_GC_ALWAYS_COLLECT
++#if !defined ENABLE_GC_ALWAYS_COLLECT
+ 
+ /* Modify the bound based on rlimits.  */
+ static double
+@@ -1126,7 +1126,7 @@ ggc_min_heapsize_heuristic (void)
+ void
+ init_ggc_heuristics (void)
+ {
+-#if !defined ENABLE_GC_CHECKING && !defined ENABLE_GC_ALWAYS_COLLECT
++#if !defined ENABLE_GC_ALWAYS_COLLECT
+   param_ggc_min_expand = ggc_min_expand_heuristic ();
+   param_ggc_min_heapsize = ggc_min_heapsize_heuristic ();
+ #endif

diff --git a/15.0.0/gentoo/README.history b/15.0.0/gentoo/README.history
index 2db87ef..7a993e4 100644
--- a/15.0.0/gentoo/README.history
+++ b/15.0.0/gentoo/README.history
@@ -1,4 +1,8 @@
-49     ????
+50     ????
+
+       + 35_all_checking-gc-use-heuristics.patch
+
+49     26 March 2025
 
        - 79_all_PR117811-arm-neon-shift.patch
 

Reply via email to