[gentoo-commits] proj/gcc-patches:master commit in: 14.1.0/musl/
commit: 355bd9d6d5e9f924ee4520842f52e98fce958898 Author: Sam James gentoo org> AuthorDate: Fri May 24 04:52:10 2024 + Commit: Sam James gentoo org> CommitDate: Fri May 24 04:52:10 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=355bd9d6 14.1.0: musl: add context to 50_all_posix_memalign.patch Thanks to awilfox. Signed-off-by: Sam James gentoo.org> 14.1.0/musl/50_all_posix_memalign.patch | 1 + 1 file changed, 1 insertion(+) diff --git a/14.1.0/musl/50_all_posix_memalign.patch b/14.1.0/musl/50_all_posix_memalign.patch index dd75a93..1d9c586 100644 --- a/14.1.0/musl/50_all_posix_memalign.patch +++ b/14.1.0/musl/50_all_posix_memalign.patch @@ -1,3 +1,4 @@ +https://gcc.gnu.org/legacy-ml/gcc-patches/2015-05/msg01433.html --- a/gcc/config/i386/pmm_malloc.h +++ b/gcc/config/i386/pmm_malloc.h @@ -27,12 +27,13 @@
[gentoo-commits] proj/gcc-patches:master commit in: 14.1.0/musl/
commit: 9a866462097fe24696c924a3874fd307c775e860 Author: Sam James gentoo org> AuthorDate: Fri May 24 04:54:37 2024 + Commit: Sam James gentoo org> CommitDate: Fri May 24 04:54:37 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=9a866462 14.1.0: musl: update README.history Signed-off-by: Sam James gentoo.org> 14.1.0/musl/README.history | 5 + 1 file changed, 5 insertions(+) diff --git a/14.1.0/musl/README.history b/14.1.0/musl/README.history index 5d87ef9..a93d89b 100644 --- a/14.1.0/musl/README.history +++ b/14.1.0/musl/README.history @@ -1,3 +1,8 @@ +2 ?? ??? 2024 + + - 50_all_cpu_indicator.patch + U 50_all_posix_memalign.patch + 1 7 May 2024 + 25_all_multilib_pure64.patch
[gentoo-commits] proj/gcc-patches:master commit in: 14.1.0/musl/
commit: 17e4c9c2c64242745ac0ed67f2b0ac394f22fe0a Author: Sam James gentoo org> AuthorDate: Fri May 24 04:52:36 2024 + Commit: Sam James gentoo org> CommitDate: Fri May 24 04:52:49 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=17e4c9c2 14.1.0: musl: drop 50_all_cpu_indicator.patch Followup as I promised in d9d0da50dd6c0967acf49cbfa82c664a915988c1. This patch was first added in ::musl in cabbb3a81cd2196cc4cc519a9ab165d8e0f08d0a [0]. It was fixed upstream in GCC in 9d8f95deca5b9a5ba63c638cf96f4678c68d2bd0 (r7-4472-g9d8f95deca5b9a) and hence is long-obsolete. Thanks again to awilfox. [0] https://github.com/gentoo/musl/commit/cabbb3a81cd2196cc4cc519a9ab165d8e0f08d0a Signed-off-by: Sam James gentoo.org> 14.1.0/musl/50_all_cpu_indicator.patch | 39 -- 1 file changed, 39 deletions(-) diff --git a/14.1.0/musl/50_all_cpu_indicator.patch b/14.1.0/musl/50_all_cpu_indicator.patch deleted file mode 100644 index ced7938..000 --- a/14.1.0/musl/50_all_cpu_indicator.patch +++ /dev/null @@ -1,39 +0,0 @@ -https://gcc.gnu.org/pipermail/gcc-patches/2023-February/612648.html -https://gcc.gnu.org/legacy-ml/gcc-patches/2015-05/msg00899.html -https://gcc.gnu.org/PR65612 - -From d16a8ceb1c3c8a7ec381090b4c316ff4c55661c0 Mon Sep 17 00:00:00 2001 -From: -Date: Thu, 7 May 2020 21:14:11 -0500 -Subject: [PATCH] convert "__cpu_indicator_init" to - "__cpu_indicator_init_local" - a/gcc/config/i386/i386-expand.cc -+++ b/gcc/config/i386/i386-expand.cc -@@ -12338,10 +12338,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget, - { - case IX86_BUILTIN_CPU_INIT: - { -- /* Make it call __cpu_indicator_init in libgcc. */ -+ /* Make it call __cpu_indicator_init_local in libgcc. */ - tree call_expr, fndecl, type; - type = build_function_type_list (integer_type_node, NULL_TREE); -- fndecl = build_fn_decl ("__cpu_indicator_init", type); -+ fndecl = build_fn_decl ("__cpu_indicator_init_local", type); - call_expr = build_call_expr (fndecl, 0); - return expand_expr (call_expr, target, mode, EXPAND_NORMAL); - } - a/libgcc/config/i386/cpuinfo.c -+++ b/libgcc/config/i386/cpuinfo.c -@@ -508,7 +508,7 @@ __cpu_indicator_init (void) - return 0; - } - --#if defined SHARED && defined USE_ELF_SYMVER --__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0"); --__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0"); -+#ifndef SHARED -+int __cpu_indicator_init_local (void) -+ __attribute__ ((weak, alias ("__cpu_indicator_init"))); - #endif
[gentoo-commits] proj/gcc-patches:master commit in: 14.1.0/musl/
commit: d9d0da50dd6c0967acf49cbfa82c664a915988c1 Author: Sam James gentoo org> AuthorDate: Fri May 24 04:01:10 2024 + Commit: Sam James gentoo org> CommitDate: Fri May 24 04:01:10 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=d9d0da50 14.1.0: musl: add more references/provenance to 50_all_cpu_indicator.patch Thanks to awilfox for digging, but more on that in a minute. Signed-off-by: Sam James gentoo.org> 14.1.0/musl/50_all_cpu_indicator.patch | 2 ++ 1 file changed, 2 insertions(+) diff --git a/14.1.0/musl/50_all_cpu_indicator.patch b/14.1.0/musl/50_all_cpu_indicator.patch index 52e8b92..ced7938 100644 --- a/14.1.0/musl/50_all_cpu_indicator.patch +++ b/14.1.0/musl/50_all_cpu_indicator.patch @@ -1,4 +1,6 @@ https://gcc.gnu.org/pipermail/gcc-patches/2023-February/612648.html +https://gcc.gnu.org/legacy-ml/gcc-patches/2015-05/msg00899.html +https://gcc.gnu.org/PR65612 From d16a8ceb1c3c8a7ec381090b4c316ff4c55661c0 Mon Sep 17 00:00:00 2001 From:
[gentoo-commits] proj/gcc-patches:master commit in: 14.1.0/musl/
commit: 385edffe90a1c3120bfc5d8d286770107d506a3d Author: Sam James gentoo org> AuthorDate: Fri May 24 04:00:59 2024 + Commit: Sam James gentoo org> CommitDate: Fri May 24 04:00:59 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=385edffe 14.1.0: add musl patches Signed-off-by: Sam James gentoo.org> 14.1.0/musl/25_all_multilib_pure64.patch| 83 + 14.1.0/musl/50_all_cpu_indicator.patch | 37 +++ 14.1.0/musl/50_all_libssp_unconditionally.patch | 24 +++ 14.1.0/musl/50_all_posix_memalign.patch | 28 + 14.1.0/musl/README.history | 6 ++ 5 files changed, 178 insertions(+) diff --git a/14.1.0/musl/25_all_multilib_pure64.patch b/14.1.0/musl/25_all_multilib_pure64.patch new file mode 100644 index 000..d55c04c --- /dev/null +++ b/14.1.0/musl/25_all_multilib_pure64.patch @@ -0,0 +1,83 @@ +https://bugs.gentoo.org/675954 +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90077 + +--- a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux +@@ -22,7 +22,7 @@ + LIB1ASMFUNCS = _aarch64_sync_cache_range + + AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be) +-MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu) ++MULTILIB_OSDIRNAMES = mabi.lp64=../lib + MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu) + + MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32) +--- a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64 +@@ -33,6 +33,6 @@ + comma=, + MULTILIB_OPTIONS= $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) + MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) +-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu) +-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu) +-MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32) ++MULTILIB_OSDIRNAMES = m64=../lib ++MULTILIB_OSDIRNAMES+= m32=../lib32 ++MULTILIB_OSDIRNAMES+= mx32=../libx32 +--- a/gcc/config/rs6000/t-linux b/gcc/config/rs6000/t-linux +@@ -2,7 +2,8 @@ + # or soft-float. + ifeq (,$(filter $(with_cpu),$(SOFT_FLOAT_CPUS))$(findstring soft,$(with_float))) + ifneq (,$(findstring powerpc64,$(target))) +-MULTILIB_OSDIRNAMES := .=../lib64$(call if_multiarch,:powerpc64-linux-gnu) ++MULTILIB_OSDIRNAMES := m64=../lib ++MULTILIB_OSDIRNAMES += m32=../lib32 + else + MULTIARCH_DIRNAME := $(call if_multiarch,powerpc-linux-gnu) + endif +@@ -10,7 +11,8 @@ + MULTIARCH_DIRNAME := $(subst -linux,le-linux,$(MULTIARCH_DIRNAME)) + endif + ifneq (,$(findstring powerpc64le,$(target))) +-MULTILIB_OSDIRNAMES := $(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES)) ++MULTILIB_OSDIRNAMES := m64=../lib ++MULTILIB_OSDIRNAMES += m32=../lib32 + endif + endif + +--- a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64 +@@ -28,8 +28,8 @@ + MULTILIB_OPTIONS:= m64/m32 + MULTILIB_DIRNAMES := 64 32 + MULTILIB_EXTRA_OPTS := +-MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu) +-MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu) ++MULTILIB_OSDIRNAMES := m64=../lib ++MULTILIB_OSDIRNAMES += m32=../lib32 + + rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c + $(COMPILE) $< +--- a/gcc/config/rs6000/t-linux64bele b/gcc/config/rs6000/t-linux64bele +@@ -2,6 +2,6 @@ + + MULTILIB_OPTIONS+= mlittle + MULTILIB_DIRNAMES += le +-MULTILIB_OSDIRNAMES += $(subst =,.mlittle=,$(subst lible32,lib32le,$(subst lible64,lib64le,$(subst lib,lible,$(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES)) +-MULTILIB_OSDIRNAMES += $(subst $(if $(findstring 64,$(target)),m64,m32).,,$(filter $(if $(findstring 64,$(target)),m64,m32).mlittle%,$(MULTILIB_OSDIRNAMES))) ++MULTILIB_OSDIRNAMES = m64=../lib ++MULTILIB_OSDIRNAMES+= m32=../lib32 + MULTILIB_MATCHES:= ${MULTILIB_MATCHES_ENDIAN} +--- a/gcc/config/rs6000/t-linux64lebe b/gcc/config/rs6000/t-linux64lebe +@@ -2,6 +2,6 @@ + + MULTILIB_OPTIONS+= mbig + MULTILIB_DIRNAMES += be +-MULTILIB_OSDIRNAMES += $(subst =,.mbig=,$(subst libbe32,lib32be,$(subst libbe64,lib64be,$(subst lib,libbe,$(subst le-linux,-linux,$(MULTILIB_OSDIRNAMES)) +-MULTILIB_OSDIRNAMES += $(subst $(if $(findstring 64,$(target)),m64,m32).,,$(filter $(if $(findstring 64,$(target)),m64,m32).mbig%,$(MULTILIB_OSDIRNAMES))) ++MULTILIB_OSDIRNAMES := m64=../lib ++MULTILIB_OSDIRNAMES += m32=../lib32 + MULTILIB_MATCHES:= ${MULTILIB_MATCHES_ENDIAN} diff --git a/14.1.0/musl/50_all_cpu_indicator.patch b/14.1.0/musl/50_all_cpu_indicator.patch new file mode 100644 index 000..52e8b92 --- /dev/null +++ b/14.1.0/musl/50_all_cpu_indicator.patch @@ -0,0 +1,37 @@
[gentoo-commits] proj/gcc-patches:master commit in: 13.2.0/gentoo/
commit: bc7d81fe2f725b4043ce8b9ffb11d80032ce3f75 Author: Sam James gentoo org> AuthorDate: Fri May 10 22:47:32 2024 + Commit: Sam James gentoo org> CommitDate: Fri May 10 22:47:32 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=bc7d81fe 13.2.0: drop obsolete patches backported upstream Signed-off-by: Sam James gentoo.org> ...110792-Early-clobber-issues-with-rot32di2.patch | 186 - ...y-clobber-issues-with-rot32di2-test-fixup.patch | 39 - 13.2.0/gentoo/README.history | 5 + 3 files changed, 5 insertions(+), 225 deletions(-) diff --git a/13.2.0/gentoo/84_all_x86_PR110792-Early-clobber-issues-with-rot32di2.patch b/13.2.0/gentoo/84_all_x86_PR110792-Early-clobber-issues-with-rot32di2.patch deleted file mode 100644 index e3c09cc..000 --- a/13.2.0/gentoo/84_all_x86_PR110792-Early-clobber-issues-with-rot32di2.patch +++ /dev/null @@ -1,186 +0,0 @@ -https://gcc.gnu.org/PR110792 -https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=790c1f60a5662b16eb19eb4b81922995863c7571 -https://github.com/randombit/botan/issues/3637 - -From 85628c5653ff40963158a24c60eeec6a3b5a8e56 Mon Sep 17 00:00:00 2001 -From: Roger Sayle -Date: Thu, 3 Aug 2023 07:12:04 +0100 -Subject: [PATCH] PR target/110792: Early clobber issues with - rot32di2_doubleword on i386. - -This patch is a conservative fix for PR target/110792, a wrong-code -regression affecting doubleword rotations by BITS_PER_WORD, which -effectively swaps the highpart and lowpart words, when the source to be -rotated resides in memory. The issue is that if the register used to -hold the lowpart of the destination is mentioned in the address of -the memory operand, the current define_insn_and_split unintentionally -clobbers it before reading the highpart. - -Hence, for the testcase, the incorrectly generated code looks like: - -salq$4, %rdi // calculate address -movqWHIRL_S+8(%rdi), %rdi // accidentally clobber addr -movqWHIRL_S(%rdi), %rbp// load (wrong) lowpart - -Traditionally, the textbook way to fix this would be to add an -explicit early clobber to the instruction's constraints. - - (define_insn_and_split "32di2_doubleword" -- [(set (match_operand:DI 0 "register_operand" "=r,r,r") -+ [(set (match_operand:DI 0 "register_operand" "=r,r,") -(any_rotate:DI (match_operand:DI 1 "nonimmediate_operand" "0,r,o") - (const_int 32)))] - -but unfortunately this currently generates significantly worse code, -due to a strange choice of reloads (effectively memcpy), which ends up -looking like: - -salq$4, %rdi // calculate address -movdqa WHIRL_S(%rdi), %xmm0 // load the double word in SSE reg. -movaps %xmm0, -16(%rsp) // store the SSE reg back to the stack -movq-8(%rsp), %rdi // load highpart -movq-16(%rsp), %rbp// load lowpart - -Note that reload's "&" doesn't distinguish between the memory being -early clobbered, vs the registers used in an addressing mode being -early clobbered. - -The fix proposed in this patch is to remove the third alternative, that -allowed offsetable memory as an operand, forcing reload to place the -operand into a register before the rotation. This results in: - -salq$4, %rdi -movqWHIRL_S(%rdi), %rax -movqWHIRL_S+8(%rdi), %rdi -movq%rax, %rbp - -I believe there's a more advanced solution, by swapping the order of -the loads (if first destination register is mentioned in the address), -or inserting a lea insn (if both destination registers are mentioned -in the address), but this fix is a minimal "safe" solution, that -should hopefully be suitable for backporting. - -2023-08-03 Roger Sayle - -gcc/ChangeLog - PR target/110792 - * config/i386/i386.md (ti3): For rotations by 64 bits - place operand in a register before gen_64ti2_doubleword. - (di3): Likewise, for rotations by 32 bits, place - operand in a register before gen_32di2_doubleword. - (32di2_doubleword): Constrain operand to be in register. - (64ti2_doubleword): Likewise. - -gcc/testsuite/ChangeLog - PR target/110792 - * g++.target/i386/pr110792.C: New 32-bit C++ test case. - * gcc.target/i386/pr110792.c: New 64-bit C test case. - -(cherry picked from commit 790c1f60a5662b16eb19eb4b81922995863c7571) - gcc/config/i386/i386.md | 18 -- - gcc/testsuite/g++.target/i386/pr110792.C | 16 - gcc/testsuite/gcc.target/i386/pr110792.c | 18 ++ - 3 files changed, 46 insertions(+), 6 deletions(-) - create mode 100644 gcc/testsuite/g++.target/i386/pr110792.C - create mode 100644 gcc/testsuite/gcc.target/i386/pr110792.c - -diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md -index f3a3305..a71e837 100644 a/gcc/config/i386/i386.md -+++
[gentoo-commits] proj/gcc-patches:master commit in: 14.1.0/gentoo/
commit: f525de00d17a460aebb382c0d34529ddc383fb9d Author: Sam James gentoo org> AuthorDate: Tue May 7 09:57:26 2024 + Commit: Sam James gentoo org> CommitDate: Tue May 7 09:57:41 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=f525de00 14.1.0: init Clone of 14.0.0. Signed-off-by: Sam James gentoo.org> 14.1.0/gentoo/01_all_default-fortify-source.patch | 26 +++ .../02_all_default-warn-format-security.patch | 21 +++ .../gentoo/03_all_default-warn-trampolines.patch | 13 ++ 14.1.0/gentoo/04_all_nossp-on-nostdlib.patch | 28 +++ 14.1.0/gentoo/05_all_alpha-mieee-default.patch | 39 + 14.1.0/gentoo/06_all_ia64_note.GNU-stack.patch | 92 ++ 14.1.0/gentoo/07_all_libiberty-asprintf.patch | 18 ++ 14.1.0/gentoo/08_all_libiberty-pic.patch | 10 ++ 14.1.0/gentoo/10_all_sh-drop-sysroot-suffix.patch | 26 +++ 14.1.0/gentoo/11_all_ia64-TEXTREL.patch| 22 +++ 14.1.0/gentoo/14_all_respect-build-cxxflags.patch | 39 + .../15_all_DEF_GENTOO_GLIBCXX_ASSERTIONS.patch | 14 ++ 14.1.0/gentoo/20_all_libstdcxx-no-vtv.patch| 61 +++ 14.1.0/gentoo/22_all_default_ssp-buffer-size.patch | 14 ++ 14.1.0/gentoo/23_all_DEF_GENTOO_ZNOW-z-now.patch | 26 +++ ...ll_DEF_GENTOO_SCP-fstack-clash-protection.patch | 65 +++ 14.1.0/gentoo/26_all_enable-cet.patch | 193 + 14.1.0/gentoo/28_all_drop_CFLAGS_sed.patch | 35 14.1.0/gentoo/29_all_msgfmt-libstdc++-link.patch | 39 + 14.1.0/gentoo/30_all_tar_libstdc++-link.patch | 57 ++ .../76_all_ppc_PR112868-no-checking-many.patch | 42 + 14.1.0/gentoo/README.history | 23 +++ 22 files changed, 903 insertions(+) diff --git a/14.1.0/gentoo/01_all_default-fortify-source.patch b/14.1.0/gentoo/01_all_default-fortify-source.patch new file mode 100644 index 000..4cdf5f6 --- /dev/null +++ b/14.1.0/gentoo/01_all_default-fortify-source.patch @@ -0,0 +1,26 @@ +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.cc b/gcc/c-family/c-cppbuiltin.cc +@@ -1510,6 +1510,16 @@ 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) ++ #ifndef GENTOO_FORTIFY_SOURCE_LEVEL ++#define GENTOO_FORTIFY_SOURCE_LEVEL 2 ++ #endif ++ ++ /* F_S enabled by default for optimization levels > 0, except for ASAN: https://github.com/google/sanitizers/issues/247 */ ++ if (optimize && ! (flag_sanitize & SANITIZE_ADDRESS)) ++builtin_define_with_int_value ("_FORTIFY_SOURCE", GENTOO_FORTIFY_SOURCE_LEVEL); ++#endif ++ + /* Misc. */ + if (flag_gnu89_inline) + cpp_define (pfile, "__GNUC_GNU_INLINE__"); diff --git a/14.1.0/gentoo/02_all_default-warn-format-security.patch b/14.1.0/gentoo/02_all_default-warn-format-security.patch new file mode 100644 index 000..439d9d8 --- /dev/null +++ b/14.1.0/gentoo/02_all_default-warn-format-security.patch @@ -0,0 +1,21 @@ +Enable -Wformat and -Wformat-security by default. +--- a/gcc/c-family/c.opt b/gcc/c-family/c.opt +@@ -770,7 +770,7 @@ Warn about function calls with format strings that write past the end + of the destination region. + + 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 +@@ -795,7 +795,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++ + 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 UInteger Var(warn_format) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2) + Warn about printf/scanf/strftime/strfmon format string anomalies. + + Wframe-address diff --git a/14.1.0/gentoo/03_all_default-warn-trampolines.patch b/14.1.0/gentoo/03_all_default-warn-trampolines.patch new file mode 100644 index 000..fb6d8bc --- /dev/null +++ b/14.1.0/gentoo/03_all_default-warn-trampolines.patch @@ -0,0 +1,13 @@ +Enable -Wtrampolines by default. + +--- a/gcc/common.opt b/gcc/common.opt +@@ -798,7 +798,7 @@ Common Var(warn_system_headers) Warning + Do not suppress warnings from system headers. + + Wtrampolines +-Common
[gentoo-commits] proj/gcc-patches:master commit in: scripts/testsuite-management/
commit: a447cd6dee206facb66720bdacf0c765a8b09f33 Author: Gabi Falk gmx com> AuthorDate: Mon Apr 15 23:38:27 2024 + Commit: Sam James gentoo org> CommitDate: Tue Apr 30 03:34:04 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=a447cd6d validate_failures.py: fix python 3.12 escape sequence warnings The warnings: contrib/testsuite-management/validate_failures.py:65: SyntaxWarning: invalid escape sequence '\s' _VALID_TEST_RESULTS_REX = re.compile('(%s):\s*(\S+)\s*(.*)' contrib/testsuite-management/validate_failures.py:77: SyntaxWarning: invalid escape sequence '\.' _EXP_LINE_REX = re.compile('^Running (?:.*:)?(.*) \.\.\.\n') contrib/ChangeLog: * testsuite-management/validate_failures.py: Change re.compile() function arguments to Python raw strings. Link: https://docs.python.org/dev/whatsnew/3.12.html#other-language-changes Link: https://github.com/python/cpython/issues/98401 [sam: Pull in https://inbox.sourceware.org/gcc-patches/20240415233833.104460-1-gabifalk gmx.com/.} [sam: Add bug reference to https://bugs.gentoo.org/929834] Bug: https://bugs.gentoo.org/929834 Signed-off-by: Gabi Falk gmx.com> Signed-off-by: Sam James gentoo.org> scripts/testsuite-management/validate_failures.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/testsuite-management/validate_failures.py b/scripts/testsuite-management/validate_failures.py index f81ac4f..e5188bb 100755 --- a/scripts/testsuite-management/validate_failures.py +++ b/scripts/testsuite-management/validate_failures.py @@ -62,7 +62,7 @@ import sys _VALID_TEST_RESULTS = [ 'FAIL', 'UNRESOLVED', 'XPASS', 'ERROR' ] # :
[gentoo-commits] proj/gcc-patches:master commit in: 15.0.0/musl/, 15.0.0/gentoo/
commit: 031d1b55f3e3f8c15c7f6f3f79a4dd4439c21bd5 Author: Sam James gentoo org> AuthorDate: Sun Apr 28 22:42:52 2024 + Commit: Sam James gentoo org> CommitDate: Sun Apr 28 22:42:52 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=031d1b55 15.0.0: init, clone of 14.0.0 Signed-off-by: Sam James gentoo.org> 15.0.0/gentoo/01_all_default-fortify-source.patch | 26 +++ .../02_all_default-warn-format-security.patch | 21 +++ .../gentoo/03_all_default-warn-trampolines.patch | 13 ++ 15.0.0/gentoo/04_all_nossp-on-nostdlib.patch | 28 +++ 15.0.0/gentoo/05_all_alpha-mieee-default.patch | 39 + 15.0.0/gentoo/06_all_ia64_note.GNU-stack.patch | 92 ++ 15.0.0/gentoo/07_all_libiberty-asprintf.patch | 18 ++ 15.0.0/gentoo/08_all_libiberty-pic.patch | 10 ++ 15.0.0/gentoo/10_all_sh-drop-sysroot-suffix.patch | 26 +++ 15.0.0/gentoo/11_all_ia64-TEXTREL.patch| 22 +++ 15.0.0/gentoo/14_all_respect-build-cxxflags.patch | 39 + .../15_all_DEF_GENTOO_GLIBCXX_ASSERTIONS.patch | 14 ++ 15.0.0/gentoo/20_all_libstdcxx-no-vtv.patch| 61 +++ 15.0.0/gentoo/22_all_default_ssp-buffer-size.patch | 14 ++ 15.0.0/gentoo/23_all_DEF_GENTOO_ZNOW-z-now.patch | 26 +++ ...ll_DEF_GENTOO_SCP-fstack-clash-protection.patch | 65 +++ 15.0.0/gentoo/26_all_enable-cet.patch | 193 + 15.0.0/gentoo/28_all_drop_CFLAGS_sed.patch | 35 15.0.0/gentoo/29_all_msgfmt-libstdc++-link.patch | 39 + 15.0.0/gentoo/30_all_tar_libstdc++-link.patch | 57 ++ .../76_all_ppc_PR112868-no-checking-many.patch | 42 + 15.0.0/gentoo/README.history | 23 +++ 15.0.0/musl/25_all_multilib_pure64.patch | 83 + 15.0.0/musl/50_all_cpu_indicator.patch | 37 15.0.0/musl/50_all_libssp_unconditionally.patch| 24 +++ 15.0.0/musl/50_all_posix_memalign.patch| 28 +++ 15.0.0/musl/README.history | 6 + 27 files changed, 1081 insertions(+) diff --git a/15.0.0/gentoo/01_all_default-fortify-source.patch b/15.0.0/gentoo/01_all_default-fortify-source.patch new file mode 100644 index 000..4cdf5f6 --- /dev/null +++ b/15.0.0/gentoo/01_all_default-fortify-source.patch @@ -0,0 +1,26 @@ +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.cc b/gcc/c-family/c-cppbuiltin.cc +@@ -1510,6 +1510,16 @@ 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) ++ #ifndef GENTOO_FORTIFY_SOURCE_LEVEL ++#define GENTOO_FORTIFY_SOURCE_LEVEL 2 ++ #endif ++ ++ /* F_S enabled by default for optimization levels > 0, except for ASAN: https://github.com/google/sanitizers/issues/247 */ ++ if (optimize && ! (flag_sanitize & SANITIZE_ADDRESS)) ++builtin_define_with_int_value ("_FORTIFY_SOURCE", GENTOO_FORTIFY_SOURCE_LEVEL); ++#endif ++ + /* Misc. */ + if (flag_gnu89_inline) + cpp_define (pfile, "__GNUC_GNU_INLINE__"); diff --git a/15.0.0/gentoo/02_all_default-warn-format-security.patch b/15.0.0/gentoo/02_all_default-warn-format-security.patch new file mode 100644 index 000..439d9d8 --- /dev/null +++ b/15.0.0/gentoo/02_all_default-warn-format-security.patch @@ -0,0 +1,21 @@ +Enable -Wformat and -Wformat-security by default. +--- a/gcc/c-family/c.opt b/gcc/c-family/c.opt +@@ -770,7 +770,7 @@ Warn about function calls with format strings that write past the end + of the destination region. + + 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 +@@ -795,7 +795,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++ + 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 UInteger Var(warn_format) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2) + Warn about printf/scanf/strftime/strfmon format string anomalies. + + Wframe-address diff --git a/15.0.0/gentoo/03_all_default-warn-trampolines.patch b/15.0.0/gentoo/03_all_default-warn-trampolines.patch new file mode 100644 index
[gentoo-commits] proj/gcc-patches:master commit in: 13.2.0/gentoo/
commit: 81f30ec8c4148cd75cf2aa15744a77b6bc18094a Author: Sam James gentoo org> AuthorDate: Sun Apr 7 23:04:32 2024 + Commit: Sam James gentoo org> CommitDate: Sun Apr 7 23:04:32 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=81f30ec8 13.2.0: drop upstreamed patch, backport riscv gstreamer fix Bug: https://bugs.gentoo.org/928234 Signed-off-by: Sam James gentoo.org> ...50_all_PR111632_system_cxx_headers_libcxx.patch | 134 .../gentoo/92_all_riscv_PR109760-gstreamer.patch | 337 + 13.2.0/gentoo/README.history | 5 + 3 files changed, 342 insertions(+), 134 deletions(-) diff --git a/13.2.0/gentoo/50_all_PR111632_system_cxx_headers_libcxx.patch b/13.2.0/gentoo/50_all_PR111632_system_cxx_headers_libcxx.patch deleted file mode 100644 index af6c286..000 --- a/13.2.0/gentoo/50_all_PR111632_system_cxx_headers_libcxx.patch +++ /dev/null @@ -1,134 +0,0 @@ -https://bugs.gentoo.org/912035 -https://inbox.sourceware.org/gcc-patches/0623e896-6b99-49ec-9144-b41bc5108...@andric.com -https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274038 -https://gcc.gnu.org/PR111632 - -commit 8992952bfa95e769a554bd97581cf332987383d8 -Author: Dimitry Andric -Date: 2023-09-28T17:40:29+02:00 - -Include safe-ctype.h after C++ standard headers, to avoid over-poisoning - -When building gcc's C++ sources against recent libc++, the poisoning of -the ctype macros due to including safe-ctype.h before including C++ -standard headers such as , , etc, causes many compilation -errors, similar to: - - In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23: - In file included from /home/dim/src/gcc/master/gcc/system.h:233: - In file included from /usr/include/c++/v1/vector:321: - In file included from - /usr/include/c++/v1/__format/formatter_bool.h:20: - In file included from - /usr/include/c++/v1/__format/formatter_integral.h:32: - In file included from /usr/include/c++/v1/locale:202: - /usr/include/c++/v1/__locale:546:5: error: '__abi_tag__' attribute - only applies to structs, variables, functions, and namespaces -546 | _LIBCPP_INLINE_VISIBILITY -| ^ - /usr/include/c++/v1/__config:813:37: note: expanded from macro - '_LIBCPP_INLINE_VISIBILITY' -813 | # define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI -| ^ - /usr/include/c++/v1/__config:792:26: note: expanded from macro - '_LIBCPP_HIDE_FROM_ABI' -792 | -__attribute__((__abi_tag__(_LIBCPP_TOSTRING( - _LIBCPP_VERSIONED_IDENTIFIER -| ^ - In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23: - In file included from /home/dim/src/gcc/master/gcc/system.h:233: - In file included from /usr/include/c++/v1/vector:321: - In file included from - /usr/include/c++/v1/__format/formatter_bool.h:20: - In file included from - /usr/include/c++/v1/__format/formatter_integral.h:32: - In file included from /usr/include/c++/v1/locale:202: - /usr/include/c++/v1/__locale:547:37: error: expected ';' at end of - declaration list -547 | char_type toupper(char_type __c) const -| ^ - /usr/include/c++/v1/__locale:553:48: error: too many arguments - provided to function-like macro invocation -553 | const char_type* toupper(char_type* __low, const -char_type* __high) const -|^ - /home/dim/src/gcc/master/gcc/../include/safe-ctype.h:146:9: note: - macro 'toupper' defined here -146 | #define toupper(c) do_not_use_toupper_with_safe_ctype -| ^ - -This is because libc++ uses different transitive includes than -libstdc++, and some of those transitive includes pull in various ctype -declarations (typically via ). - -There was already a special case for including before -safe-ctype.h, so move the rest of the C++ standard header includes to -the same location, to fix the problem. - -Signed-off-by: Dimitry Andric - -diff --git a/gcc/system.h b/gcc/system.h -index e924152ad4c..7a516b11438 100644 a/gcc/system.h -+++ b/gcc/system.h -@@ -194,27 +194,8 @@ extern int fprintf_unlocked (FILE *, const char *, ...); - #undef fread_unlocked - #undef fwrite_unlocked - --/* Include before "safe-ctype.h" to avoid GCC poisoning -- the ctype macros through safe-ctype.h */ -- --#ifdef __cplusplus --#ifdef INCLUDE_STRING --# include --#endif --#endif -- --/* There are an extraordinary number of issues with . -- The last straw is that it varies with the locale. Use libiberty's -- replacement instead. */ --#include "safe-ctype.h" -- --#include -- --#include -- --#if !defined
[gentoo-commits] proj/gcc-patches:master commit in: 13.2.0/gentoo/
commit: 0b365302d77dabad96a00c5fe3643d905ec39298 Author: Sam James gentoo org> AuthorDate: Sun Apr 7 23:15:56 2024 + Commit: Sam James gentoo org> CommitDate: Sun Apr 7 23:16:27 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=0b365302 13.2.0: rebase patches Signed-off-by: Sam James gentoo.org> ...l_match.pd-don-t-emit-label-if-not-needed.patch | 8 ++-- ...move-commented-out-line-pragmas-unless-vv.patch | 8 ++-- ...78_all_match.pd-CSE-the-dump-output-check.patch | 8 ++-- ...lit-shared-code-to-gimple-match-exports.c.patch | 18 - ...pd-automatically-partition-match.cc-files.patch | 18 - ...e-splits-in-makefile-and-make-configurabl.patch | 46 +++--- ...in-clean-up-match.pd-related-dependencies.patch | 6 +-- ...ce-seq-for-portability-with-GNU-Make-vari.patch | 9 +++-- ...l_Remove-DEFAULT_MATCHPD_PARTITIONS-macro.patch | 46 +++--- in-Make-TM_P_H-depend-on-TREE_H-PR111021.patch | 6 +-- ...in-Make-recog.h-depend-on-TREE_H-PR111021.patch | 6 +-- ...genemit-Split-insn-emit.cc-into-ten-files.patch | 26 ++-- 13.2.0/gentoo/README.history | 12 ++ 13 files changed, 133 insertions(+), 84 deletions(-) diff --git a/13.2.0/gentoo/76_all_match.pd-don-t-emit-label-if-not-needed.patch b/13.2.0/gentoo/76_all_match.pd-don-t-emit-label-if-not-needed.patch index 9d702eb..95da940 100644 --- a/13.2.0/gentoo/76_all_match.pd-don-t-emit-label-if-not-needed.patch +++ b/13.2.0/gentoo/76_all_match.pd-don-t-emit-label-if-not-needed.patch @@ -1,9 +1,9 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109927#c21 -From 30f78d42a215686cab9c7276076f11e5ea08341d Mon Sep 17 00:00:00 2001 +From 6178fddd3e0957fbb8bcfc443fef172691b7640b Mon Sep 17 00:00:00 2001 From: Tamar Christina Date: Fri, 5 May 2023 13:35:17 +0100 -Subject: [PATCH 02/14] match.pd: don't emit label if not needed +Subject: [PATCH 01/15] match.pd: don't emit label if not needed This is a small QoL codegen improvement for match.pd to not emit labels when they are not needed. The codegen is nice and there is a small (but consistent) @@ -20,7 +20,7 @@ gcc/ChangeLog: 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/gcc/genmatch.cc b/gcc/genmatch.cc -index 98b429a9d0bb..0c5a19aca8ed 100644 +index c1023d921fca..9ecd0a462b4f 100644 --- a/gcc/genmatch.cc +++ b/gcc/genmatch.cc @@ -3354,6 +3354,7 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) @@ -110,5 +110,5 @@ index 98b429a9d0bb..0c5a19aca8ed 100644 } -- -2.43.0 +2.44.0 diff --git a/13.2.0/gentoo/77_all_match.pd-Remove-commented-out-line-pragmas-unless-vv.patch b/13.2.0/gentoo/77_all_match.pd-Remove-commented-out-line-pragmas-unless-vv.patch index fb50871..ea61987 100644 --- a/13.2.0/gentoo/77_all_match.pd-Remove-commented-out-line-pragmas-unless-vv.patch +++ b/13.2.0/gentoo/77_all_match.pd-Remove-commented-out-line-pragmas-unless-vv.patch @@ -1,9 +1,9 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109927#c21 -From 1e714dddc3646b484014ec6636b3d80910536b4b Mon Sep 17 00:00:00 2001 +From 2be19327b38b4e3e183d47529871614a3ef0c3ad Mon Sep 17 00:00:00 2001 From: Tamar Christina Date: Fri, 5 May 2023 13:36:01 +0100 -Subject: [PATCH 03/14] match.pd: Remove commented out line pragmas unless -vv +Subject: [PATCH 02/15] match.pd: Remove commented out line pragmas unless -vv is used. genmatch currently outputs commented out line directives that have no effect @@ -24,7 +24,7 @@ gcc/ChangeLog: 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/genmatch.cc b/gcc/genmatch.cc -index 0c5a19aca8ed..8937c76369cb 100644 +index 9ecd0a462b4f..45e49c790b6d 100644 --- a/gcc/genmatch.cc +++ b/gcc/genmatch.cc @@ -209,7 +209,7 @@ output_line_directive (FILE *f, location_t location, @@ -37,5 +37,5 @@ index 0c5a19aca8ed..8937c76369cb 100644 development it's right now more convenient to have line information from the generated file. Still keep the directives as comment for now -- -2.43.0 +2.44.0 diff --git a/13.2.0/gentoo/78_all_match.pd-CSE-the-dump-output-check.patch b/13.2.0/gentoo/78_all_match.pd-CSE-the-dump-output-check.patch index 8dda55a..e084c4c 100644 --- a/13.2.0/gentoo/78_all_match.pd-CSE-the-dump-output-check.patch +++ b/13.2.0/gentoo/78_all_match.pd-CSE-the-dump-output-check.patch @@ -1,9 +1,9 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109927#c21 -From c256e2c80e56c4e015d8d7ca50fa01a6ed98a1eb Mon Sep 17 00:00:00 2001 +From 2d83fafb3f263544be09bf7dbde036e4a84f6d7c Mon Sep 17 00:00:00 2001 From: Tamar Christina Date: Fri, 5 May 2023 13:36:43 +0100 -Subject: [PATCH 04/14] match.pd: CSE the dump output check. +Subject: [PATCH 03/15] match.pd: CSE the dump output check. This is a small improvement in QoL codegen for match.pd to save time not re-evaluating the condition for printing debug information in every function. @@ -26,7 +26,7 @@ gcc/ChangeLog:
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: 257336021ebdc63cdd390487506f23d83f04ab91 Author: Sam James gentoo org> AuthorDate: Sun Apr 7 23:23:32 2024 + Commit: Sam James gentoo org> CommitDate: Sun Apr 7 23:23:32 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=25733602 14.0.0: rebase patches Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/02_all_default-warn-format-security.patch | 9 - 14.0.0/gentoo/04_all_nossp-on-nostdlib.patch| 9 + 14.0.0/gentoo/README.history| 5 + 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/14.0.0/gentoo/02_all_default-warn-format-security.patch b/14.0.0/gentoo/02_all_default-warn-format-security.patch index 9723a1c..439d9d8 100644 --- a/14.0.0/gentoo/02_all_default-warn-format-security.patch +++ b/14.0.0/gentoo/02_all_default-warn-format-security.patch @@ -1,9 +1,8 @@ Enable -Wformat and -Wformat-security by default. - --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt -@@ -696,7 +696,7 @@ Warn about function calls with format strings that write past the end - of the destination region. Same as -Wformat-overflow=1. +@@ -770,7 +770,7 @@ Warn about function calls with format strings that write past the end + of the destination region. Wformat-security -C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0) @@ -11,7 +10,7 @@ Enable -Wformat and -Wformat-security by default. Warn about possible security problems with format functions. Wformat-signedness -@@ -717,7 +717,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++ +@@ -795,7 +795,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++ Warn about zero-length formats. Wformat= @@ -19,4 +18,4 @@ Enable -Wformat and -Wformat-security by default. +C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2) Warn about printf/scanf/strftime/strfmon format string anomalies. - Wformat-overflow= + Wframe-address diff --git a/14.0.0/gentoo/04_all_nossp-on-nostdlib.patch b/14.0.0/gentoo/04_all_nossp-on-nostdlib.patch index b633d7f..30c5825 100644 --- a/14.0.0/gentoo/04_all_nossp-on-nostdlib.patch +++ b/14.0.0/gentoo/04_all_nossp-on-nostdlib.patch @@ -1,5 +1,4 @@ -Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding - +│Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding https://bugs.gentoo.org/484714 --- a/gcc/gcc.cc +++ b/gcc/gcc.cc @@ -16,12 +15,14 @@ https://bugs.gentoo.org/484714 #ifndef LINK_SSP_SPEC #ifdef TARGET_LIBC_PROVIDES_SSP #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ -@@ -1280,7 +1286,7 @@ static const char *cc1_options = +@@ -1286,7 +1292,7 @@ static const char *cc1_options = %{-version:--version}\ %{-help=*:--help=%*}\ %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %w%b.s}}}\ - %{fsyntax-only:-o %j} %{-param*}\ + %{fsyntax-only:-o %j} %{-param*} " NO_SSP_SPEC "\ %{coverage:-fprofile-arcs -ftest-coverage}\ - %{fprofile-arcs|fprofile-generate*|coverage:\ + %{fprofile-arcs|fcondition-coverage|fprofile-generate*|coverage:\ %{!fprofile-update=single:\ +-- +2.44.0 diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history index 33e0319..8e0250c 100644 --- a/14.0.0/gentoo/README.history +++ b/14.0.0/gentoo/README.history @@ -1,3 +1,8 @@ +26 7 Apr 2024 + + U 02_all_default-warn-format-security.patch + U 04_all_nossp-on-nostdlib.patch + 25 11 Mar 2024 - 50_all_PR111632_system_cxx_headers_libcxx.patch
[gentoo-commits] proj/gcc-patches:master commit in: scripts/testsuite-management/, scripts/
commit: 7bbfb01a32b73842f8908de028703510a0e12057 Author: Sam James gentoo org> AuthorDate: Sat Mar 16 08:06:55 2024 + Commit: Sam James gentoo org> CommitDate: Sat Mar 16 08:06:55 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=7bbfb01a scripts: import testsuite-management/validate_failures.py from GCC Imported from GCC commit 53fb2cf75965e4dbcf145a12d8ae41f4667a8498. We want the latest version to use in ebuilds. Signed-off-by: Sam James gentoo.org> scripts/README | 1 + scripts/testsuite-management/validate_failures.py | 733 + .../x86_64-unknown-linux-gnu.xfail | 109 +++ 3 files changed, 843 insertions(+) diff --git a/scripts/README b/scripts/README new file mode 100644 index 000..06c5f91 --- /dev/null +++ b/scripts/README @@ -0,0 +1 @@ +testsuite-management is imported from gcc.git (contrib/testsuite-management) diff --git a/scripts/testsuite-management/validate_failures.py b/scripts/testsuite-management/validate_failures.py new file mode 100755 index 000..f81ac4f --- /dev/null +++ b/scripts/testsuite-management/validate_failures.py @@ -0,0 +1,733 @@ +#!/usr/bin/env python3 + +# Script to compare testsuite failures against a list of known-to-fail +# tests. + +# Contributed by Diego Novillo +# +# Copyright (C) 2011-2024 Free Software Foundation, Inc. +# +# This file is part of GCC. +# +# GCC is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GCC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GCC; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + +"""This script provides a coarser XFAILing mechanism that requires no +detailed DejaGNU markings. This is useful in a variety of scenarios: + +- Development branches with many known failures waiting to be fixed. +- Release branches with known failures that are not considered + important for the particular release criteria used in that branch. + +The script must be executed from the toplevel build directory. When +executed it will: + +1- Determine the target built: TARGET +2- Determine the source directory: SRCDIR +3- Look for a failure manifest file in + //.xfail +4- Collect all the .sum files from the build tree. +5- Produce a report stating: + a- Failures expected in the manifest but not present in the build. + b- Failures in the build not expected in the manifest. +6- If all the build failures are expected in the manifest, it exits + with exit code 0. Otherwise, it exits with error code 1. + +Manifest files contain expected DejaGNU results that are otherwise +treated as failures. +They may also contain additional text: + +# This is a comment. - self explanatory +@include file - the file is a path relative to the includer +@remove result text - result text is removed from the expected set +""" + +import datetime +import optparse +import os +import re +import sys + +_VALID_TEST_RESULTS = [ 'FAIL', 'UNRESOLVED', 'XPASS', 'ERROR' ] +# : expiration_date + + +class ResultSet(set): + """Describes a set of DejaGNU test results. + This set can be read in from .sum files or emitted as a manifest. + + Attributes: +current_tool: Name of the current top-level DejaGnu testsuite. +current_exp: Name of the current .exp testsuite file. +testsuites: A set of (tool, exp) tuples representing encountered testsuites. + """ + + def __init__(self): +super().__init__() +self.ResetToolExp() +self.testsuites=set() + + def update(self, other): +super().update(other) +self.testsuites.update(other.testsuites) + + def ResetToolExp(self): +self.current_tool = None +self.current_exp = None + + def MakeTestResult(self, summary_line, ordinal=-1): +return TestResult(summary_line, ordinal, + self.current_tool, self.current_exp) + + def Print(self, outfile=sys.stdout): +current_tool = None +current_exp = None + +for result in sorted(self): + if current_tool != result.tool: +current_tool = result.tool +outfile.write(_TOOL_LINE_FORMAT % current_tool) + if current_exp != result.exp: +current_exp = result.exp +outfile.write(_EXP_LINE_FORMAT % (current_tool, current_exp)) + outfile.write('%s\n' % result) + +outfile.write(_SUMMARY_LINE_FORMAT % 'Results') + + # Check if testsuite of expected_result is present in current results. + # This is used to compare partial test
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: 4e3f1da7f6c300d2e89a00922177e6195d217e41 Author: Sam James gentoo org> AuthorDate: Mon Mar 11 12:38:16 2024 + Commit: Sam James gentoo org> CommitDate: Mon Mar 11 12:38:16 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=4e3f1da7 14.0.0: cut patchset 25 Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/README.history | 5 + 1 file changed, 5 insertions(+) diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history index 66c059f..33e0319 100644 --- a/14.0.0/gentoo/README.history +++ b/14.0.0/gentoo/README.history @@ -1,3 +1,8 @@ +25 11 Mar 2024 + + - 50_all_PR111632_system_cxx_headers_libcxx.patch + - 75_all_arm_PR113915-atomics.patch + 24 3 Mar 2024 + 76_all_ppc_PR112868-no-checking-many.patch
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: 66ed76361b07f18610a134dca21c6945f03c6a6b Author: Sam James gentoo org> AuthorDate: Thu Mar 7 20:41:22 2024 + Commit: Sam James gentoo org> CommitDate: Thu Mar 7 20:41:22 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=66ed7636 14.0.0: drop 50_all_PR111632_system_cxx_headers_libcxx.patch qookie reports it's broken: ``` x86_64-pc-linux-gnu-g++ -fPIC -c -DIN_GCC_FRONTEND -march=znver2 -pipe -ggdb3 -D_GLIBCXX_ASSERTIONS -O3 -fno-harden-control-flow-redundancy -DIN_GCC-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -fPIC -I. -Ijit -I/var/tmp/portage/sys-devel/gcc-14.0./work/gcc-14.0./gcc -I/var/tmp/portage/sys-devel/gcc-14.0./work/gcc-14.0./gcc/jit -I/var/tmp/portage/sys-devel/gcc-14.0./work/gcc-14.0./gcc/../include -I/var/tmp/portage/sys-devel/gcc-14.0./work/gcc-14.0./gcc/../libcpp/include -I/var/tmp/portage/sys-devel/gcc-14.0./work/gcc-14.0./gcc/../libcody -I/var/tmp/portage/sys-devel/gcc-14.0./work/gcc-14.0./gcc/../libdecnumber -I/var/tmp/portage/sys-devel/gcc-14.0./work/gcc-14.0./gcc/../libdecnumber/bid -I../libdecnumber -I/var/tmp/portage/sys-devel/gcc-14.0./work/gcc-14.0./gcc/../libbacktrace -o jit/jit-recording.o -MT jit/jit-recording.o -MMD -MP -MF jit/.deps/jit-recording.TPo /var/tmp/portage/sys-devel/gcc-14.0./work/gcc-14.0./gcc/jit/jit-recording.cc In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/basic_ios.h:37, from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/ios:46, from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/istream:40, from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/sstream:40, from /var/tmp/portage/sys-devel/gcc-14.0./work/gcc-14.0./gcc/system.h:774, from /var/tmp/portage/sys-devel/gcc-14.0./work/gcc-14.0./gcc/jit/jit-recording.cc:25: /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/locale_facets.h:250:53: error: macro "toupper" passed 2 arguments, but takes just 1 250 | toupper(char_type *__lo, const char_type* __hi) const | ^ In file included from /var/tmp/portage/sys-devel/gcc-14.0./work/gcc-14.0./gcc/system.h:235: /var/tmp/portage/sys-devel/gcc-14.0./work/gcc-14.0./gcc/../include/safe-ctype.h:146:9: note: macro "toupper" defined here 146 | #define toupper(c) do_not_use_toupper_with_safe_ctype | ^~~ [...] ``` Signed-off-by: Sam James gentoo.org> ...50_all_PR111632_system_cxx_headers_libcxx.patch | 239 - 1 file changed, 239 deletions(-) diff --git a/14.0.0/gentoo/50_all_PR111632_system_cxx_headers_libcxx.patch b/14.0.0/gentoo/50_all_PR111632_system_cxx_headers_libcxx.patch deleted file mode 100644 index d44963e..000 --- a/14.0.0/gentoo/50_all_PR111632_system_cxx_headers_libcxx.patch +++ /dev/null @@ -1,239 +0,0 @@ -https://bugs.gentoo.org/912035 -https://inbox.sourceware.org/gcc-patches/0623e896-6b99-49ec-9144-b41bc5108...@andric.com -https://inbox.sourceware.org/gcc-patches/15d35ffe-1e97-4047-a75c-f13d25826...@andric.com -https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274038 -https://gcc.gnu.org/PR111632 - -From 025e2a1abb2d14b421cb1e4b0aaae43c87bceb71 Mon Sep 17 00:00:00 2001 -From: Dimitry Andric -Date: Tue, 30 Jan 2024 20:03:38 + -Subject: [PATCH] Include safe-ctype.h after C++ standard headers, to avoid - over-poisoning - -When building gcc's C++ sources against recent libc++, the poisoning of -the ctype macros due to including safe-ctype.h before including C++ -standard headers such as , , etc, causes many compilation -errors, similar to: - -In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23: -In file included from /home/dim/src/gcc/master/gcc/system.h:233: -In file included from /usr/include/c++/v1/vector:321: -In file included from -/usr/include/c++/v1/__format/formatter_bool.h:20: -In file included from -/usr/include/c++/v1/__format/formatter_integral.h:32: -In file included from /usr/include/c++/v1/locale:202: -/usr/include/c++/v1/__locale:546:5: error: '__abi_tag__' attribute -only applies to structs, variables, functions, and namespaces -546 | _LIBCPP_INLINE_VISIBILITY -| ^ -/usr/include/c++/v1/__config:813:37: note: expanded from macro -'_LIBCPP_INLINE_VISIBILITY' -813 | # define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI -| ^ -/usr/include/c++/v1/__config:792:26: note: expanded from macro -'_LIBCPP_HIDE_FROM_ABI' -792 | -__attribute__((__abi_tag__(_LIBCPP_TOSTRING(
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: a1cfe852efbba70ce855b09c38f202d05583bbb1 Author: Sam James gentoo org> AuthorDate: Thu Mar 7 20:14:27 2024 + Commit: Sam James gentoo org> CommitDate: Thu Mar 7 20:14:27 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=a1cfe852 14.0.0: update 50_all_PR111632_system_cxx_headers_libcxx.patch Partly upstreamed. Signed-off-by: Sam James gentoo.org> ...50_all_PR111632_system_cxx_headers_libcxx.patch | 351 + 1 file changed, 228 insertions(+), 123 deletions(-) diff --git a/14.0.0/gentoo/50_all_PR111632_system_cxx_headers_libcxx.patch b/14.0.0/gentoo/50_all_PR111632_system_cxx_headers_libcxx.patch index af6c286..d44963e 100644 --- a/14.0.0/gentoo/50_all_PR111632_system_cxx_headers_libcxx.patch +++ b/14.0.0/gentoo/50_all_PR111632_system_cxx_headers_libcxx.patch @@ -1,134 +1,239 @@ https://bugs.gentoo.org/912035 https://inbox.sourceware.org/gcc-patches/0623e896-6b99-49ec-9144-b41bc5108...@andric.com +https://inbox.sourceware.org/gcc-patches/15d35ffe-1e97-4047-a75c-f13d25826...@andric.com https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274038 https://gcc.gnu.org/PR111632 -commit 8992952bfa95e769a554bd97581cf332987383d8 -Author: Dimitry Andric -Date: 2023-09-28T17:40:29+02:00 +From 025e2a1abb2d14b421cb1e4b0aaae43c87bceb71 Mon Sep 17 00:00:00 2001 +From: Dimitry Andric +Date: Tue, 30 Jan 2024 20:03:38 + +Subject: [PATCH] Include safe-ctype.h after C++ standard headers, to avoid + over-poisoning -Include safe-ctype.h after C++ standard headers, to avoid over-poisoning - -When building gcc's C++ sources against recent libc++, the poisoning of -the ctype macros due to including safe-ctype.h before including C++ -standard headers such as , , etc, causes many compilation -errors, similar to: - - In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23: - In file included from /home/dim/src/gcc/master/gcc/system.h:233: - In file included from /usr/include/c++/v1/vector:321: - In file included from - /usr/include/c++/v1/__format/formatter_bool.h:20: - In file included from - /usr/include/c++/v1/__format/formatter_integral.h:32: - In file included from /usr/include/c++/v1/locale:202: - /usr/include/c++/v1/__locale:546:5: error: '__abi_tag__' attribute - only applies to structs, variables, functions, and namespaces -546 | _LIBCPP_INLINE_VISIBILITY -| ^ - /usr/include/c++/v1/__config:813:37: note: expanded from macro - '_LIBCPP_INLINE_VISIBILITY' -813 | # define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI -| ^ - /usr/include/c++/v1/__config:792:26: note: expanded from macro - '_LIBCPP_HIDE_FROM_ABI' -792 | -__attribute__((__abi_tag__(_LIBCPP_TOSTRING( - _LIBCPP_VERSIONED_IDENTIFIER -| ^ - In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23: - In file included from /home/dim/src/gcc/master/gcc/system.h:233: - In file included from /usr/include/c++/v1/vector:321: - In file included from - /usr/include/c++/v1/__format/formatter_bool.h:20: - In file included from - /usr/include/c++/v1/__format/formatter_integral.h:32: - In file included from /usr/include/c++/v1/locale:202: - /usr/include/c++/v1/__locale:547:37: error: expected ';' at end of - declaration list -547 | char_type toupper(char_type __c) const -| ^ - /usr/include/c++/v1/__locale:553:48: error: too many arguments - provided to function-like macro invocation -553 | const char_type* toupper(char_type* __low, const -char_type* __high) const -|^ - /home/dim/src/gcc/master/gcc/../include/safe-ctype.h:146:9: note: - macro 'toupper' defined here -146 | #define toupper(c) do_not_use_toupper_with_safe_ctype -| ^ - -This is because libc++ uses different transitive includes than -libstdc++, and some of those transitive includes pull in various ctype -declarations (typically via ). - -There was already a special case for including before -safe-ctype.h, so move the rest of the C++ standard header includes to -the same location, to fix the problem. - -Signed-off-by: Dimitry Andric +When building gcc's C++ sources against recent libc++, the poisoning of +the ctype macros due to including safe-ctype.h before including C++ +standard headers such as , , etc, causes many compilation +errors, similar to: -diff --git a/gcc/system.h b/gcc/system.h -index e924152ad4c..7a516b11438 100644 a/gcc/system.h -+++ b/gcc/system.h -@@ -194,27 +194,8 @@ extern int fprintf_unlocked (FILE *, const char *, ...); - #undef fread_unlocked - #undef
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: 4d92f1b90d9a1f0bfc9280745bd6cfb2fd68a2e8 Author: Sam James gentoo org> AuthorDate: Wed Mar 6 17:46:52 2024 + Commit: Sam James gentoo org> CommitDate: Wed Mar 6 17:46:52 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=4d92f1b9 14.0.0: drop 75_all_arm_PR113915-atomics.patch Fixed upstream. Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/75_all_arm_PR113915-atomics.patch | 36 - 1 file changed, 36 deletions(-) diff --git a/14.0.0/gentoo/75_all_arm_PR113915-atomics.patch b/14.0.0/gentoo/75_all_arm_PR113915-atomics.patch deleted file mode 100644 index 82fa84a..000 --- a/14.0.0/gentoo/75_all_arm_PR113915-atomics.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 9b1d9f15e7ecfd7d27a2bb878efb6577741eecaa Mon Sep 17 00:00:00 2001 -From: Sam James -Date: Sun, 18 Feb 2024 22:58:51 + -Subject: [PATCH] arm: fix inconsistency between atomic patterns and expected - attributes - -Apply workaround patch from Andrew Pinski at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113915#c9. - -Bug: https://gcc.gnu.org/PR113915 -Bug: https://bugs.gentoo.org/924237 - gcc/config/arm/arm.cc | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc -index 1cd69268ee98..9f0d2405b905 100644 a/gcc/config/arm/arm.cc -+++ b/gcc/config/arm/arm.cc -@@ -25614,11 +25614,12 @@ arm_final_prescan_insn (rtx_insn *insn) - - case INSN: - /* Instructions using or affecting the condition codes make it -- fail. */ -+ fail or ones which cannot be predicable. */ - scanbody = PATTERN (this_insn); - if (!(GET_CODE (scanbody) == SET - || GET_CODE (scanbody) == PARALLEL) --|| get_attr_conds (this_insn) != CONDS_NOCOND) -+|| get_attr_conds (this_insn) != CONDS_NOCOND -+|| get_attr_predicable (this_insn) != PREDICABLE_YES) - fail = TRUE; - break; - --- -2.43.2 -
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: c8305c9bdf09abe3e2f89783fe62f2e4049468fa Author: Sam James gentoo org> AuthorDate: Sun Mar 3 22:55:47 2024 + Commit: Sam James gentoo org> CommitDate: Sun Mar 3 22:55:47 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=c8305c9b 14.0.0: add 76_all_ppc_PR112868-no-checking-many.patch Bug: https://gcc.gnu.org/PR112868 Bug: https://gcc.gnu.org/PR113652 (sort of) Signed-off-by: Sam James gentoo.org> .../76_all_ppc_PR112868-no-checking-many.patch | 42 ++ 14.0.0/gentoo/README.history | 4 +++ 2 files changed, 46 insertions(+) diff --git a/14.0.0/gentoo/76_all_ppc_PR112868-no-checking-many.patch b/14.0.0/gentoo/76_all_ppc_PR112868-no-checking-many.patch new file mode 100644 index 000..dc9f5e5 --- /dev/null +++ b/14.0.0/gentoo/76_all_ppc_PR112868-no-checking-many.patch @@ -0,0 +1,42 @@ +https://gcc.gnu.org/PR112868 (specifically https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112868#c8) +(see also https://gcc.gnu.org/PR113652) + +--- a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h +@@ -94,12 +94,6 @@ + "%{mdejagnu-*: %
[gentoo-commits] proj/gcc-patches:master commit in: 12.3.0/gentoo/
commit: f373ff919da62443ca59681f219b4899e72a6f2f Author: Sam James gentoo org> AuthorDate: Wed Feb 28 00:27:00 2024 + Commit: Sam James gentoo org> CommitDate: Wed Feb 28 00:29:43 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=f373ff91 12.3.0: add 77_all_riscv_PR106271-multilib-bootstrap.patch Fixes prefix bootstrap for riscv. Bug: https://gcc.gnu.org/PR106271 Bug: https://bugs.gentoo.org/890636 Signed-off-by: Sam James gentoo.org> .../77_all_riscv_PR106271-multilib-bootstrap.patch | 36 ++ 12.3.0/gentoo/README.history | 5 +++ 2 files changed, 41 insertions(+) diff --git a/12.3.0/gentoo/77_all_riscv_PR106271-multilib-bootstrap.patch b/12.3.0/gentoo/77_all_riscv_PR106271-multilib-bootstrap.patch new file mode 100644 index 000..a333dc8 --- /dev/null +++ b/12.3.0/gentoo/77_all_riscv_PR106271-multilib-bootstrap.patch @@ -0,0 +1,36 @@ +https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=47f95bc4be4eb14730ab3eaaaf8f6e71fda47690 +https://gcc.gnu.org/PR106271 +https://bugs.gentoo.org/890636 + +From 7cb2eddfcd84d6e4a1bc1b19fa7ace0927db6bbc Mon Sep 17 00:00:00 2001 +From: Raphael Moreira Zinsly +Date: Tue, 22 Aug 2023 11:37:04 -0600 +Subject: [PATCH] RISC-V: Add multiarch support on riscv-linux-gnu + +This adds multiarch support to the RISC-V port so that bootstraps work with +Debian out-of-the-box. Without this patch the stage1 compiler is unable to +find headers/libraries when building the stage1 runtime. + +This is functionally (and possibly textually) equivalent to Debian's fix for +the same problem. + +gcc/ + * config/riscv/t-linux: Add MULTIARCH_DIRNAME. + +(cherry picked from commit 47f95bc4be4eb14730ab3eaaaf8f6e71fda47690) +--- + gcc/config/riscv/t-linux | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/gcc/config/riscv/t-linux b/gcc/config/riscv/t-linux +index 216d2776a183..a6f64f88d25c 100644 +--- a/gcc/config/riscv/t-linux b/gcc/config/riscv/t-linux +@@ -1,3 +1,5 @@ + # Only XLEN and ABI affect Linux multilib dir names, e.g. /lib32/ilp32d/ + MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib64,$(MULTILIB_DIRNAMES))) + MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES)) ++ ++MULTIARCH_DIRNAME := $(call if_multiarch,$(firstword $(subst -, ,$(target)))-linux-gnu) +-- +2.44.0 diff --git a/12.3.0/gentoo/README.history b/12.3.0/gentoo/README.history index f65edb4..6699fd4 100644 --- a/12.3.0/gentoo/README.history +++ b/12.3.0/gentoo/README.history @@ -1,4 +1,9 @@ +3 28 Feb 2024 + + + 77_all_riscv_PR106271-multilib-bootstrap.patch + 2 29 Apr 2023 + + 76_all_all_PR107087_12_Wstringop-overread-libstdc++-cow-empty.patch 1 28 Apr 2023
[gentoo-commits] proj/gcc-patches:master commit in: 13.2.0/gentoo/
commit: d5e5f9b252f00c9485c34446efc01bdd2eaaa9b1 Author: Sam James gentoo org> AuthorDate: Wed Feb 28 00:28:36 2024 + Commit: Sam James gentoo org> CommitDate: Wed Feb 28 00:29:43 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=d5e5f9b2 13.2.0: add 91_all_riscv_PR106271-multilib-bootstrap.patch Fixes prefix bootstrap for riscv. Bug: https://gcc.gnu.org/PR106271 Bug: https://bugs.gentoo.org/890636 Signed-off-by: Sam James gentoo.org> .../91_all_riscv_PR106271-multilib-bootstrap.patch | 37 ++ 13.2.0/gentoo/README.history | 4 +++ 2 files changed, 41 insertions(+) diff --git a/13.2.0/gentoo/91_all_riscv_PR106271-multilib-bootstrap.patch b/13.2.0/gentoo/91_all_riscv_PR106271-multilib-bootstrap.patch new file mode 100644 index 000..2d2933f --- /dev/null +++ b/13.2.0/gentoo/91_all_riscv_PR106271-multilib-bootstrap.patch @@ -0,0 +1,37 @@ +https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=47f95bc4be4eb14730ab3eaaaf8f6e71fda47690 +https://gcc.gnu.org/PR106271 +https://bugs.gentoo.org/890636 + +From 976280d3fbfc5c1315befb36cebf07a6f1f0c518 Mon Sep 17 00:00:00 2001 +From: Raphael Moreira Zinsly +Date: Tue, 22 Aug 2023 11:37:04 -0600 +Subject: [PATCH] RISC-V: Add multiarch support on riscv-linux-gnu + +This adds multiarch support to the RISC-V port so that bootstraps work with +Debian out-of-the-box. Without this patch the stage1 compiler is unable to +find headers/libraries when building the stage1 runtime. + +This is functionally (and possibly textually) equivalent to Debian's fix for +the same problem. + +gcc/ + * config/riscv/t-linux: Add MULTIARCH_DIRNAME. + +(cherry picked from commit 47f95bc4be4eb14730ab3eaaaf8f6e71fda47690) +--- + gcc/config/riscv/t-linux | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/gcc/config/riscv/t-linux b/gcc/config/riscv/t-linux +index 216d2776a183..a6f64f88d25c 100644 +--- a/gcc/config/riscv/t-linux b/gcc/config/riscv/t-linux +@@ -1,3 +1,5 @@ + # Only XLEN and ABI affect Linux multilib dir names, e.g. /lib32/ilp32d/ + MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib64,$(MULTILIB_DIRNAMES))) + MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES)) ++ ++MULTIARCH_DIRNAME := $(call if_multiarch,$(firstword $(subst -, ,$(target)))-linux-gnu) +-- +2.44.0 + diff --git a/13.2.0/gentoo/README.history b/13.2.0/gentoo/README.history index 125a634..3477e53 100644 --- a/13.2.0/gentoo/README.history +++ b/13.2.0/gentoo/README.history @@ -1,3 +1,7 @@ +14 28 Feb 2024 + + + 91_all_riscv_PR106271-multilib-bootstrap.patch + 13 12 Feb 2024 - 91_all_PR113258_libstdc-Prefer-posix_memalign-for-aligned-new.patch
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: e54a7fbca63053b5753fd9ba543c27ef392d3084 Author: Sam James gentoo org> AuthorDate: Mon Feb 19 00:01:46 2024 + Commit: Sam James gentoo org> CommitDate: Mon Feb 19 00:01:46 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=e54a7fbc 14.0.0: arm: fix inconsistency between atomic patterns and expected attributes Apply workaround patch from Andrew Pinski at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113915#c9. Bug: https://gcc.gnu.org/PR113915 Bug: https://bugs.gentoo.org/924237 Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/75_all_arm_PR113915-atomics.patch | 36 + 14.0.0/gentoo/README.history| 5 2 files changed, 41 insertions(+) diff --git a/14.0.0/gentoo/75_all_arm_PR113915-atomics.patch b/14.0.0/gentoo/75_all_arm_PR113915-atomics.patch new file mode 100644 index 000..82fa84a --- /dev/null +++ b/14.0.0/gentoo/75_all_arm_PR113915-atomics.patch @@ -0,0 +1,36 @@ +From 9b1d9f15e7ecfd7d27a2bb878efb6577741eecaa Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Sun, 18 Feb 2024 22:58:51 + +Subject: [PATCH] arm: fix inconsistency between atomic patterns and expected + attributes + +Apply workaround patch from Andrew Pinski at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113915#c9. + +Bug: https://gcc.gnu.org/PR113915 +Bug: https://bugs.gentoo.org/924237 +--- + gcc/config/arm/arm.cc | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc +index 1cd69268ee98..9f0d2405b905 100644 +--- a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc +@@ -25614,11 +25614,12 @@ arm_final_prescan_insn (rtx_insn *insn) + + case INSN: + /* Instructions using or affecting the condition codes make it +- fail. */ ++ fail or ones which cannot be predicable. */ + scanbody = PATTERN (this_insn); + if (!(GET_CODE (scanbody) == SET + || GET_CODE (scanbody) == PARALLEL) +-|| get_attr_conds (this_insn) != CONDS_NOCOND) ++|| get_attr_conds (this_insn) != CONDS_NOCOND ++|| get_attr_predicable (this_insn) != PREDICABLE_YES) + fail = TRUE; + break; + +-- +2.43.2 + diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history index 8cfb3c2..dd7c933 100644 --- a/14.0.0/gentoo/README.history +++ b/14.0.0/gentoo/README.history @@ -1,3 +1,8 @@ +23 19 Feb 2024 + + - 75_all_PR113734_middle_end_update_vector_loop_bounds.patch + + 75_all_arm_PR113915-atomics.patch + 22 13 Feb 2024 + 75_all_PR113734_middle_end_update_vector_loop_bounds.patch
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: 568b3f9940f87a775060aea789b2f438af477e9f Author: Sam James gentoo org> AuthorDate: Tue Feb 13 11:17:16 2024 + Commit: Sam James gentoo org> CommitDate: Tue Feb 13 11:17:16 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=568b3f99 14.0.0: drop upstream patch Signed-off-by: Sam James gentoo.org> ...3734_middle_end_update_vector_loop_bounds.patch | 93 -- 1 file changed, 93 deletions(-) diff --git a/14.0.0/gentoo/75_all_PR113734_middle_end_update_vector_loop_bounds.patch b/14.0.0/gentoo/75_all_PR113734_middle_end_update_vector_loop_bounds.patch deleted file mode 100644 index dcc52df..000 --- a/14.0.0/gentoo/75_all_PR113734_middle_end_update_vector_loop_bounds.patch +++ /dev/null @@ -1,93 +0,0 @@ -https://gcc.gnu.org/PR113734 - -From 491e57451df47cda88f658601a92d6d006ae09d7 Mon Sep 17 00:00:00 2001 -From: Tamar Christina -Date: Tue, 13 Feb 2024 11:04:38 + -Subject: [PATCH] middle-end: update vector loop upper bounds when early break - vect [PR113734] - -When doing early break vectorization we should treat the final iteration as -possibly being partial. This so that when we calculate the vector loop upper -bounds we take into account that final iteration could have done some work. - -The attached testcase shows that if we don't then cunroll may unroll the loop an -if the upper bound is wrong we lose a vector iteration. - -This is similar to how we adjust the scalar loop bounds for the PEELED case. - -gcc/ChangeLog: - - PR tree-optimization/113734 - * tree-vect-loop.cc (vect_transform_loop): Treat the final iteration of - an early break loop as partial. - -gcc/testsuite/ChangeLog: - - PR tree-optimization/113734 - * gcc.dg/vect/vect-early-break_117-pr113734.c: New test. - .../vect/vect-early-break_117-pr113734.c | 37 +++ - gcc/tree-vect-loop.cc | 3 +- - 2 files changed, 39 insertions(+), 1 deletion(-) - create mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_117-pr113734.c - -diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_117-pr113734.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_117-pr113734.c -new file mode 100644 -index ..36ae09483dfd /dev/null -+++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_117-pr113734.c -@@ -0,0 +1,37 @@ -+/* { dg-add-options vect_early_break } */ -+/* { dg-require-effective-target vect_early_break_hw } */ -+/* { dg-require-effective-target vect_int } */ -+/* { dg-additional-options "-O3" } */ -+ -+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */ -+ -+#include "tree-vect.h" -+ -+#define N 306 -+#define NEEDLE 136 -+ -+int table[N]; -+ -+__attribute__ ((noipa)) -+int foo (int i, unsigned short parse_tables_n) -+{ -+ parse_tables_n >>= 9; -+ parse_tables_n += 11; -+ while (i < N && parse_tables_n--) -+table[i++] = 0; -+ -+ return table[NEEDLE]; -+} -+ -+int main () -+{ -+ check_vect (); -+ -+ for (int j = 0; j < N; j++) -+table[j] = -1; -+ -+ if (foo (0, 0x) != 0) -+__builtin_abort (); -+ -+ return 0; -+} -diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc -index 04f4b5b6b2fa..367077965fd9 100644 a/gcc/tree-vect-loop.cc -+++ b/gcc/tree-vect-loop.cc -@@ -12174,7 +12174,8 @@ vect_transform_loop (loop_vec_info loop_vinfo, gimple *loop_vectorized_call) - /* True if the final iteration might not handle a full vector's - worth of scalar iterations. */ - bool final_iter_may_be_partial --= LOOP_VINFO_USING_PARTIAL_VECTORS_P (loop_vinfo); -+= LOOP_VINFO_USING_PARTIAL_VECTORS_P (loop_vinfo) -+ || LOOP_VINFO_EARLY_BREAKS (loop_vinfo); - /* The minimum number of iterations performed by the epilogue. This - is 1 when peeling for gaps because we always need a final scalar - iteration. */ --- -2.43.1 -
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: 62e7698eec17981d7d48b5f248a100149fe41514 Author: Sam James gentoo org> AuthorDate: Tue Feb 13 11:16:25 2024 + Commit: Sam James gentoo org> CommitDate: Tue Feb 13 11:17:03 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=62e7698e 14.0.0: add 75_all_PR113734_middle_end_update_vector_loop_bounds.patch Bug: https://gcc.gnu.org/PR113734 Signed-off-by: Sam James gentoo.org> ...3734_middle_end_update_vector_loop_bounds.patch | 93 ++ 14.0.0/gentoo/README.history | 4 + 2 files changed, 97 insertions(+) diff --git a/14.0.0/gentoo/75_all_PR113734_middle_end_update_vector_loop_bounds.patch b/14.0.0/gentoo/75_all_PR113734_middle_end_update_vector_loop_bounds.patch new file mode 100644 index 000..dcc52df --- /dev/null +++ b/14.0.0/gentoo/75_all_PR113734_middle_end_update_vector_loop_bounds.patch @@ -0,0 +1,93 @@ +https://gcc.gnu.org/PR113734 + +From 491e57451df47cda88f658601a92d6d006ae09d7 Mon Sep 17 00:00:00 2001 +From: Tamar Christina +Date: Tue, 13 Feb 2024 11:04:38 + +Subject: [PATCH] middle-end: update vector loop upper bounds when early break + vect [PR113734] + +When doing early break vectorization we should treat the final iteration as +possibly being partial. This so that when we calculate the vector loop upper +bounds we take into account that final iteration could have done some work. + +The attached testcase shows that if we don't then cunroll may unroll the loop an +if the upper bound is wrong we lose a vector iteration. + +This is similar to how we adjust the scalar loop bounds for the PEELED case. + +gcc/ChangeLog: + + PR tree-optimization/113734 + * tree-vect-loop.cc (vect_transform_loop): Treat the final iteration of + an early break loop as partial. + +gcc/testsuite/ChangeLog: + + PR tree-optimization/113734 + * gcc.dg/vect/vect-early-break_117-pr113734.c: New test. +--- + .../vect/vect-early-break_117-pr113734.c | 37 +++ + gcc/tree-vect-loop.cc | 3 +- + 2 files changed, 39 insertions(+), 1 deletion(-) + create mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_117-pr113734.c + +diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_117-pr113734.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_117-pr113734.c +new file mode 100644 +index ..36ae09483dfd +--- /dev/null b/gcc/testsuite/gcc.dg/vect/vect-early-break_117-pr113734.c +@@ -0,0 +1,37 @@ ++/* { dg-add-options vect_early_break } */ ++/* { dg-require-effective-target vect_early_break_hw } */ ++/* { dg-require-effective-target vect_int } */ ++/* { dg-additional-options "-O3" } */ ++ ++/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */ ++ ++#include "tree-vect.h" ++ ++#define N 306 ++#define NEEDLE 136 ++ ++int table[N]; ++ ++__attribute__ ((noipa)) ++int foo (int i, unsigned short parse_tables_n) ++{ ++ parse_tables_n >>= 9; ++ parse_tables_n += 11; ++ while (i < N && parse_tables_n--) ++table[i++] = 0; ++ ++ return table[NEEDLE]; ++} ++ ++int main () ++{ ++ check_vect (); ++ ++ for (int j = 0; j < N; j++) ++table[j] = -1; ++ ++ if (foo (0, 0x) != 0) ++__builtin_abort (); ++ ++ return 0; ++} +diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc +index 04f4b5b6b2fa..367077965fd9 100644 +--- a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc +@@ -12174,7 +12174,8 @@ vect_transform_loop (loop_vec_info loop_vinfo, gimple *loop_vectorized_call) + /* True if the final iteration might not handle a full vector's + worth of scalar iterations. */ + bool final_iter_may_be_partial +-= LOOP_VINFO_USING_PARTIAL_VECTORS_P (loop_vinfo); ++= LOOP_VINFO_USING_PARTIAL_VECTORS_P (loop_vinfo) ++ || LOOP_VINFO_EARLY_BREAKS (loop_vinfo); + /* The minimum number of iterations performed by the epilogue. This + is 1 when peeling for gaps because we always need a final scalar + iteration. */ +-- +2.43.1 + diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history index c175cb7..8cfb3c2 100644 --- a/14.0.0/gentoo/README.history +++ b/14.0.0/gentoo/README.history @@ -1,3 +1,7 @@ +22 13 Feb 2024 + + + 75_all_PR113734_middle_end_update_vector_loop_bounds.patch + 21 12 Feb 2024 - 75_all_PR113731_fix-ICE-when-moving-statements-to-empty-B.patch
[gentoo-commits] proj/gcc-patches:master commit in: 13.2.0/gentoo/
commit: fa67a66af82ec9fd027c01acb862fe6dbd86bf78 Author: Sam James gentoo org> AuthorDate: Mon Feb 12 05:56:45 2024 + Commit: Sam James gentoo org> CommitDate: Mon Feb 12 05:57:09 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=fa67a66a 13.2.0: drop 91_all_PR113258_libstdc-Prefer-posix_memalign-for-aligned-new.patch Backported upstream. Signed-off-by: Sam James gentoo.org> ...tdc-Prefer-posix_memalign-for-aligned-new.patch | 97 -- 13.2.0/gentoo/README.history | 4 + 2 files changed, 4 insertions(+), 97 deletions(-) diff --git a/13.2.0/gentoo/91_all_PR113258_libstdc-Prefer-posix_memalign-for-aligned-new.patch b/13.2.0/gentoo/91_all_PR113258_libstdc-Prefer-posix_memalign-for-aligned-new.patch deleted file mode 100644 index a03f268..000 --- a/13.2.0/gentoo/91_all_PR113258_libstdc-Prefer-posix_memalign-for-aligned-new.patch +++ /dev/null @@ -1,97 +0,0 @@ -https://gcc.gnu.org/PR113258 -https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=f50f2efae9fb0965d8ccdb62cfdb698336d5a933 - -From d17158058fee187e7efb918145c87bdfff9cbfa3 Mon Sep 17 00:00:00 2001 -From: Jonathan Wakely -Date: Tue, 9 Jan 2024 15:22:46 + -Subject: [PATCH] libstdc++: Prefer posix_memalign for aligned-new [PR113258] - -As described in PR libstdc++/113258 there are old versions of tcmalloc -which replace malloc and related APIs, but do not repalce aligned_alloc -because it didn't exist at the time they were released. This means that -when operator new(size_t, align_val_t) uses aligned_alloc to obtain -memory, it comes from libc's aligned_alloc not from tcmalloc. But when -operator delete(void*, size_t, align_val_t) uses free to deallocate the -memory, that goes to tcmalloc's replacement version of free, which -doesn't know how to free it. - -If we give preference to the older posix_memalign instead of -aligned_alloc then we're more likely to use a function that will be -compatible with the replacement version of free. Because posix_memalign -has been around for longer, it's more likely that old third-party malloc -replacements will also replace posix_memalign alongside malloc and free. - -libstdc++-v3/ChangeLog: - - PR libstdc++/113258 - * libsupc++/new_opa.cc: Prefer to use posix_memalign if - available. - -(cherry picked from commit f50f2efae9fb0965d8ccdb62cfdb698336d5a933) - libstdc++-v3/libsupc++/new_opa.cc | 26 +++--- - 1 file changed, 15 insertions(+), 11 deletions(-) - -diff --git a/libstdc++-v3/libsupc++/new_opa.cc b/libstdc++-v3/libsupc++/new_opa.cc -index 6eb136fa8fc7..29767c1cfaad 100644 a/libstdc++-v3/libsupc++/new_opa.cc -+++ b/libstdc++-v3/libsupc++/new_opa.cc -@@ -46,12 +46,12 @@ using std::bad_alloc; - using std::size_t; - extern "C" - { --# if _GLIBCXX_HAVE_ALIGNED_ALLOC -+# if _GLIBCXX_HAVE_POSIX_MEMALIGN -+ void *posix_memalign(void **, size_t alignment, size_t size); -+# elif _GLIBCXX_HAVE_ALIGNED_ALLOC - void *aligned_alloc(size_t alignment, size_t size); - # elif _GLIBCXX_HAVE__ALIGNED_MALLOC - void *_aligned_malloc(size_t size, size_t alignment); --# elif _GLIBCXX_HAVE_POSIX_MEMALIGN -- void *posix_memalign(void **, size_t alignment, size_t size); - # elif _GLIBCXX_HAVE_MEMALIGN - void *memalign(size_t alignment, size_t size); - # else -@@ -63,13 +63,10 @@ extern "C" - #endif - - namespace __gnu_cxx { --#if _GLIBCXX_HAVE_ALIGNED_ALLOC --using ::aligned_alloc; --#elif _GLIBCXX_HAVE__ALIGNED_MALLOC --static inline void* --aligned_alloc (std::size_t al, std::size_t sz) --{ return _aligned_malloc(sz, al); } --#elif _GLIBCXX_HAVE_POSIX_MEMALIGN -+// Prefer posix_memalign if available, because it's older than aligned_alloc -+// and so more likely to be provided by replacement malloc libraries that -+// predate the addition of aligned_alloc. See PR libstdc++/113258. -+#if _GLIBCXX_HAVE_POSIX_MEMALIGN - static inline void* - aligned_alloc (std::size_t al, std::size_t sz) - { -@@ -83,6 +80,12 @@ aligned_alloc (std::size_t al, std::size_t sz) - return ptr; - return nullptr; - } -+#elif _GLIBCXX_HAVE_ALIGNED_ALLOC -+using ::aligned_alloc; -+#elif _GLIBCXX_HAVE__ALIGNED_MALLOC -+static inline void* -+aligned_alloc (std::size_t al, std::size_t sz) -+{ return _aligned_malloc(sz, al); } - #elif _GLIBCXX_HAVE_MEMALIGN - static inline void* - aligned_alloc (std::size_t al, std::size_t sz) -@@ -128,7 +131,8 @@ operator new (std::size_t sz, std::align_val_t al) - if (__builtin_expect (sz == 0, false)) - sz = 1; - --#if _GLIBCXX_HAVE_ALIGNED_ALLOC -+#if _GLIBCXX_HAVE_POSIX_MEMALIGN -+#elif _GLIBCXX_HAVE_ALIGNED_ALLOC - # if defined _AIX || defined __APPLE__ - /* AIX 7.2.0.0 aligned_alloc incorrectly has posix_memalign's requirement -* that alignment is a multiple of sizeof(void*). --- -2.43.0 diff --git a/13.2.0/gentoo/README.history b/13.2.0/gentoo/README.history index 3a6ad75..125a634 100644 --- a/13.2.0/gentoo/README.history +++
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: e6628b8411533cc14470a9404cca9047df81cb0f Author: Sam James gentoo org> AuthorDate: Mon Feb 12 06:26:19 2024 + Commit: Sam James gentoo org> CommitDate: Mon Feb 12 06:26:19 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=e6628b84 14.0.0: drop upstream patches Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/README.history | 7 +++ 1 file changed, 7 insertions(+) diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history index dd2e0a0..c175cb7 100644 --- a/14.0.0/gentoo/README.history +++ b/14.0.0/gentoo/README.history @@ -1,3 +1,10 @@ +21 12 Feb 2024 + + - 75_all_PR113731_fix-ICE-when-moving-statements-to-empty-B.patch + - 76_all_PR113750_fix-ICE-when-destination-BB-for-stores-st.patch + - 77_all_PR113808-middle-end-don-t-cache-restart_loop-in-vectorizable.patch + - 78_all_PR113776-c-boolean-conversion.patch + 20 8 Feb 2024 + 75_all_PR113731_fix-ICE-when-moving-statements-to-empty-B.patch
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: 29fc9edc64e0e00a0ade3065238365a4aa46ec59 Author: Sam James gentoo org> AuthorDate: Thu Feb 8 10:48:38 2024 + Commit: Sam James gentoo org> CommitDate: Thu Feb 8 10:53:06 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=29fc9edc 14.0.0: backport more vectorisation fixes & postgres const expression fix Bug: https://gcc.gnu.org/PR113808 Bug: https://gcc.gnu.org/PR113750 Bug: https://gcc.gnu.org/PR113731 Bug: https://gcc.gnu.org/PR113734 (should be same as PR113808) Bug: https://gcc.gnu.org/PR113776 Bug: https://bugs.gentoo.org/923804 Bug: https://bugs.gentoo.org/923936 Signed-off-by: Sam James gentoo.org> ...fix-ICE-when-moving-statements-to-empty-B.patch | 129 +++ ...fix-ICE-when-destination-BB-for-stores-st.patch | 250 + ...-don-t-cache-restart_loop-in-vectorizable.patch | 93 .../78_all_PR113776-c-boolean-conversion.patch | 117 ++ 14.0.0/gentoo/README.history | 7 + 5 files changed, 596 insertions(+) diff --git a/14.0.0/gentoo/75_all_PR113731_fix-ICE-when-moving-statements-to-empty-B.patch b/14.0.0/gentoo/75_all_PR113731_fix-ICE-when-moving-statements-to-empty-B.patch new file mode 100644 index 000..1146246 --- /dev/null +++ b/14.0.0/gentoo/75_all_PR113731_fix-ICE-when-moving-statements-to-empty-B.patch @@ -0,0 +1,129 @@ +From c22a0c0ca1a5c31d107f90efd2221eb8bc198205 Mon Sep 17 00:00:00 2001 +From: Tamar Christina +Date: Wed, 7 Feb 2024 10:58:25 + +Subject: [PATCH 1/3] middle-end: fix ICE when moving statements to empty BB + [PR113731] + +We use gsi_move_before (_gsi, _gsi); to request that the new statement +be placed before any other statement. Typically this then moves the current +pointer to be after the statement we just inserted. + +However it looks like when the BB is empty, this does not happen and the CUR +pointer stays NULL. There's a comment in the source of gsi_insert_before that +explains: + +/* If CUR is NULL, we link at the end of the sequence (this case happens + +This adds a default parameter to gsi_move_before to allow us to control where +the insertion happens. + +gcc/ChangeLog: + + PR tree-optimization/113731 + * gimple-iterator.cc (gsi_move_before): Take new parameter for update + method. + * gimple-iterator.h (gsi_move_before): Default new param to + GSI_SAME_STMT. + * tree-vect-loop.cc (move_early_exit_stmts): Call gsi_move_before with + GSI_NEW_STMT. + +gcc/testsuite/ChangeLog: + + PR tree-optimization/113731 + * gcc.dg/vect/vect-early-break_111-pr113731.c: New test. + +(cherry picked from commit 8f6ed71d8fff3c3c6249651a72aee084e31ffb9e) +--- + gcc/gimple-iterator.cc| 7 +++--- + gcc/gimple-iterator.h | 3 ++- + .../vect/vect-early-break_111-pr113731.c | 22 +++ + gcc/tree-vect-loop.cc | 3 +-- + 4 files changed, 29 insertions(+), 6 deletions(-) + create mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_111-pr113731.c + +diff --git a/gcc/gimple-iterator.cc b/gcc/gimple-iterator.cc +index 517c53376f05..55ef3198c52b 100644 +--- a/gcc/gimple-iterator.cc b/gcc/gimple-iterator.cc +@@ -666,10 +666,11 @@ gsi_move_after (gimple_stmt_iterator *from, gimple_stmt_iterator *to) + + + /* Move the statement at FROM so it comes right before the statement +- at TO. */ ++ at TO using method M. M defaults to GSI_SAME_STMT. */ + + void +-gsi_move_before (gimple_stmt_iterator *from, gimple_stmt_iterator *to) ++gsi_move_before (gimple_stmt_iterator *from, gimple_stmt_iterator *to, ++ gsi_iterator_update m) + { + gimple *stmt = gsi_stmt (*from); + gsi_remove (from, false); +@@ -677,7 +678,7 @@ gsi_move_before (gimple_stmt_iterator *from, gimple_stmt_iterator *to) + /* For consistency with gsi_move_after, it might be better to have + GSI_NEW_STMT here; however, that breaks several places that expect + that TO does not change. */ +- gsi_insert_before (to, stmt, GSI_SAME_STMT); ++ gsi_insert_before (to, stmt, m); + } + + +diff --git a/gcc/gimple-iterator.h b/gcc/gimple-iterator.h +index 2e83a9660efc..78014a43cb93 100644 +--- a/gcc/gimple-iterator.h b/gcc/gimple-iterator.h +@@ -86,7 +86,8 @@ extern gimple_stmt_iterator gsi_for_stmt (gimple *); + extern gimple_stmt_iterator gsi_for_stmt (gimple *, gimple_seq *); + extern gphi_iterator gsi_for_phi (gphi *); + extern void gsi_move_after (gimple_stmt_iterator *, gimple_stmt_iterator *); +-extern void gsi_move_before (gimple_stmt_iterator *, gimple_stmt_iterator *); ++extern void gsi_move_before (gimple_stmt_iterator *, gimple_stmt_iterator *, ++ gsi_iterator_update = GSI_SAME_STMT); + extern void gsi_move_to_bb_end (gimple_stmt_iterator *, basic_block); + extern void gsi_insert_on_edge (edge, gimple *); + extern void gsi_insert_seq_on_edge (edge, gimple_seq); +diff --git
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: fe1bf105eb3e4f607a8d3b533c7b971b8a951085 Author: Sam James gentoo org> AuthorDate: Thu Feb 8 11:01:58 2024 + Commit: Sam James gentoo org> CommitDate: Thu Feb 8 11:01:58 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=fe1bf105 14.0.0: drop upstream patches Signed-off-by: Sam James gentoo.org> ...fix-ICE-when-moving-statements-to-empty-B.patch | 129 --- ...fix-ICE-when-destination-BB-for-stores-st.patch | 250 - ...-don-t-cache-restart_loop-in-vectorizable.patch | 93 .../78_all_PR113776-c-boolean-conversion.patch | 117 -- 4 files changed, 589 deletions(-) diff --git a/14.0.0/gentoo/75_all_PR113731_fix-ICE-when-moving-statements-to-empty-B.patch b/14.0.0/gentoo/75_all_PR113731_fix-ICE-when-moving-statements-to-empty-B.patch deleted file mode 100644 index 1146246..000 --- a/14.0.0/gentoo/75_all_PR113731_fix-ICE-when-moving-statements-to-empty-B.patch +++ /dev/null @@ -1,129 +0,0 @@ -From c22a0c0ca1a5c31d107f90efd2221eb8bc198205 Mon Sep 17 00:00:00 2001 -From: Tamar Christina -Date: Wed, 7 Feb 2024 10:58:25 + -Subject: [PATCH 1/3] middle-end: fix ICE when moving statements to empty BB - [PR113731] - -We use gsi_move_before (_gsi, _gsi); to request that the new statement -be placed before any other statement. Typically this then moves the current -pointer to be after the statement we just inserted. - -However it looks like when the BB is empty, this does not happen and the CUR -pointer stays NULL. There's a comment in the source of gsi_insert_before that -explains: - -/* If CUR is NULL, we link at the end of the sequence (this case happens - -This adds a default parameter to gsi_move_before to allow us to control where -the insertion happens. - -gcc/ChangeLog: - - PR tree-optimization/113731 - * gimple-iterator.cc (gsi_move_before): Take new parameter for update - method. - * gimple-iterator.h (gsi_move_before): Default new param to - GSI_SAME_STMT. - * tree-vect-loop.cc (move_early_exit_stmts): Call gsi_move_before with - GSI_NEW_STMT. - -gcc/testsuite/ChangeLog: - - PR tree-optimization/113731 - * gcc.dg/vect/vect-early-break_111-pr113731.c: New test. - -(cherry picked from commit 8f6ed71d8fff3c3c6249651a72aee084e31ffb9e) - gcc/gimple-iterator.cc| 7 +++--- - gcc/gimple-iterator.h | 3 ++- - .../vect/vect-early-break_111-pr113731.c | 22 +++ - gcc/tree-vect-loop.cc | 3 +-- - 4 files changed, 29 insertions(+), 6 deletions(-) - create mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_111-pr113731.c - -diff --git a/gcc/gimple-iterator.cc b/gcc/gimple-iterator.cc -index 517c53376f05..55ef3198c52b 100644 a/gcc/gimple-iterator.cc -+++ b/gcc/gimple-iterator.cc -@@ -666,10 +666,11 @@ gsi_move_after (gimple_stmt_iterator *from, gimple_stmt_iterator *to) - - - /* Move the statement at FROM so it comes right before the statement -- at TO. */ -+ at TO using method M. M defaults to GSI_SAME_STMT. */ - - void --gsi_move_before (gimple_stmt_iterator *from, gimple_stmt_iterator *to) -+gsi_move_before (gimple_stmt_iterator *from, gimple_stmt_iterator *to, -+ gsi_iterator_update m) - { - gimple *stmt = gsi_stmt (*from); - gsi_remove (from, false); -@@ -677,7 +678,7 @@ gsi_move_before (gimple_stmt_iterator *from, gimple_stmt_iterator *to) - /* For consistency with gsi_move_after, it might be better to have - GSI_NEW_STMT here; however, that breaks several places that expect - that TO does not change. */ -- gsi_insert_before (to, stmt, GSI_SAME_STMT); -+ gsi_insert_before (to, stmt, m); - } - - -diff --git a/gcc/gimple-iterator.h b/gcc/gimple-iterator.h -index 2e83a9660efc..78014a43cb93 100644 a/gcc/gimple-iterator.h -+++ b/gcc/gimple-iterator.h -@@ -86,7 +86,8 @@ extern gimple_stmt_iterator gsi_for_stmt (gimple *); - extern gimple_stmt_iterator gsi_for_stmt (gimple *, gimple_seq *); - extern gphi_iterator gsi_for_phi (gphi *); - extern void gsi_move_after (gimple_stmt_iterator *, gimple_stmt_iterator *); --extern void gsi_move_before (gimple_stmt_iterator *, gimple_stmt_iterator *); -+extern void gsi_move_before (gimple_stmt_iterator *, gimple_stmt_iterator *, -+ gsi_iterator_update = GSI_SAME_STMT); - extern void gsi_move_to_bb_end (gimple_stmt_iterator *, basic_block); - extern void gsi_insert_on_edge (edge, gimple *); - extern void gsi_insert_seq_on_edge (edge, gimple_seq); -diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_111-pr113731.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_111-pr113731.c -new file mode 100644 -index ..b205f470660a /dev/null -+++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_111-pr113731.c -@@ -0,0 +1,22 @@ -+/* { dg-do compile } */ -+/* { dg-add-options vect_early_break } */ -+/* {
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: 31395f8bba7e15cd156c631946646f7c7799540d Author: Sam James gentoo org> AuthorDate: Wed Feb 7 19:01:36 2024 + Commit: Sam James gentoo org> CommitDate: Wed Feb 7 19:01:36 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=31395f8b 14.0.0: drop upstream 76_all_PR113731-vect-crash.patch Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/76_all_PR113731-vect-crash.patch | 13 - 1 file changed, 13 deletions(-) diff --git a/14.0.0/gentoo/76_all_PR113731-vect-crash.patch b/14.0.0/gentoo/76_all_PR113731-vect-crash.patch deleted file mode 100644 index 671f11f..000 --- a/14.0.0/gentoo/76_all_PR113731-vect-crash.patch +++ /dev/null @@ -1,13 +0,0 @@ -https://gcc.gnu.org/PR113731 a/gcc/tree-vect-loop.cc -+++ b/gcc/tree-vect-loop.cc -@@ -11801,7 +11801,8 @@ move_early_exit_stmts (loop_vec_info loop_vinfo) - - gimple_stmt_iterator stmt_gsi = gsi_for_stmt (stmt); - gsi_move_before (_gsi, _gsi); -- gsi_prev (_gsi); -+ if (!gsi_end_p (dest_gsi)) -+ gsi_prev (_gsi); - } - - /* Update all the stmts with their new reaching VUSES. */
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: 4b42344808c61e309c43ca557fb2e77182d121d4 Author: Sam James gentoo org> AuthorDate: Mon Feb 5 00:01:18 2024 + Commit: Sam James gentoo org> CommitDate: Mon Feb 5 00:01:18 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=4b423448 14.0.0: cut patchset 19 Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/README.history | 5 + 1 file changed, 5 insertions(+) diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history index cb088b2..afaa988 100644 --- a/14.0.0/gentoo/README.history +++ b/14.0.0/gentoo/README.history @@ -1,3 +1,8 @@ +19 5 Feb 2024 + + - 76_all_PR113467-vect-miscompile.patch + + 76_all_PR113731-vect-crash.patch + 18 30 Jan 2024 + 50_all_PR111632_system_cxx_headers_libcxx.patch
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: 3ab6b70bf9ee185da7e092e1df20753cdc35d710 Author: Sam James gentoo org> AuthorDate: Sat Feb 3 07:52:17 2024 + Commit: Sam James gentoo org> CommitDate: Sat Feb 3 07:52:17 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=3ab6b70b 14.0.0: add PR113731 crash fix Bug: https://gcc.gnu.org/PR113731 Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/76_all_PR113731-vect-crash.patch | 13 + 1 file changed, 13 insertions(+) diff --git a/14.0.0/gentoo/76_all_PR113731-vect-crash.patch b/14.0.0/gentoo/76_all_PR113731-vect-crash.patch new file mode 100644 index 000..671f11f --- /dev/null +++ b/14.0.0/gentoo/76_all_PR113731-vect-crash.patch @@ -0,0 +1,13 @@ +https://gcc.gnu.org/PR113731 +--- a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc +@@ -11801,7 +11801,8 @@ move_early_exit_stmts (loop_vec_info loop_vinfo) + + gimple_stmt_iterator stmt_gsi = gsi_for_stmt (stmt); + gsi_move_before (_gsi, _gsi); +- gsi_prev (_gsi); ++ if (!gsi_end_p (dest_gsi)) ++ gsi_prev (_gsi); + } + + /* Update all the stmts with their new reaching VUSES. */
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: e000e7f8aad97476d77372cc0ef8791901de1195 Author: Sam James gentoo org> AuthorDate: Sat Feb 3 00:08:49 2024 + Commit: Sam James gentoo org> CommitDate: Sat Feb 3 00:08:49 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=e000e7f8 14.0.0: drop 76_all_PR113467-vect-miscompile.patch Fixed upstream so we don't need this workaround anymore. Bug: https://gcc.gnu.org/PR113467 Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/76_all_PR113467-vect-miscompile.patch | 15 --- 1 file changed, 15 deletions(-) diff --git a/14.0.0/gentoo/76_all_PR113467-vect-miscompile.patch b/14.0.0/gentoo/76_all_PR113467-vect-miscompile.patch deleted file mode 100644 index aee5ddf..000 --- a/14.0.0/gentoo/76_all_PR113467-vect-miscompile.patch +++ /dev/null @@ -1,15 +0,0 @@ -https://gcc.gnu.org/PR113467 - -Disable early-exit peeling variants. a/gcc/tree-vect-loop.cc -+++ b/gcc/tree-vect-loop.cc -@@ -998,6 +998,9 @@ vec_init_loop_exit_info (class loop *loop) - } - } - -+ if (candidate && candidate->src != EDGE_PRED (loop->latch, 0)->src) -+return NULL; -+ - return candidate; - } -
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: a3d9af415d651d202c24b7cb235713852e406c9d Author: Sam James gentoo org> AuthorDate: Tue Jan 30 15:16:40 2024 + Commit: Sam James gentoo org> CommitDate: Tue Jan 30 15:16:40 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=a3d9af41 14.0.0: cut patchset 18 Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/README.history | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history index bd9cd16..cb088b2 100644 --- a/14.0.0/gentoo/README.history +++ b/14.0.0/gentoo/README.history @@ -1,4 +1,4 @@ -?/ ?? ??? 2024 +18 30 Jan 2024 + 50_all_PR111632_system_cxx_headers_libcxx.patch
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: 7144ab534c85495f8519e0e90f1705b8aad89472 Author: Sam James gentoo org> AuthorDate: Tue Jan 30 15:16:08 2024 + Commit: Sam James gentoo org> CommitDate: Tue Jan 30 15:16:08 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=7144ab53 14.0.0: add 50_all_PR111632_system_cxx_headers_libcxx.patch Bug: https://gcc.gnu.org/PR111632 Signed-off-by: Sam James gentoo.org> ...50_all_PR111632_system_cxx_headers_libcxx.patch | 134 + 14.0.0/gentoo/README.history | 4 + 2 files changed, 138 insertions(+) diff --git a/14.0.0/gentoo/50_all_PR111632_system_cxx_headers_libcxx.patch b/14.0.0/gentoo/50_all_PR111632_system_cxx_headers_libcxx.patch new file mode 100644 index 000..af6c286 --- /dev/null +++ b/14.0.0/gentoo/50_all_PR111632_system_cxx_headers_libcxx.patch @@ -0,0 +1,134 @@ +https://bugs.gentoo.org/912035 +https://inbox.sourceware.org/gcc-patches/0623e896-6b99-49ec-9144-b41bc5108...@andric.com +https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274038 +https://gcc.gnu.org/PR111632 + +commit 8992952bfa95e769a554bd97581cf332987383d8 +Author: Dimitry Andric +Date: 2023-09-28T17:40:29+02:00 + +Include safe-ctype.h after C++ standard headers, to avoid over-poisoning + +When building gcc's C++ sources against recent libc++, the poisoning of +the ctype macros due to including safe-ctype.h before including C++ +standard headers such as , , etc, causes many compilation +errors, similar to: + + In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23: + In file included from /home/dim/src/gcc/master/gcc/system.h:233: + In file included from /usr/include/c++/v1/vector:321: + In file included from + /usr/include/c++/v1/__format/formatter_bool.h:20: + In file included from + /usr/include/c++/v1/__format/formatter_integral.h:32: + In file included from /usr/include/c++/v1/locale:202: + /usr/include/c++/v1/__locale:546:5: error: '__abi_tag__' attribute + only applies to structs, variables, functions, and namespaces +546 | _LIBCPP_INLINE_VISIBILITY +| ^ + /usr/include/c++/v1/__config:813:37: note: expanded from macro + '_LIBCPP_INLINE_VISIBILITY' +813 | # define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI +| ^ + /usr/include/c++/v1/__config:792:26: note: expanded from macro + '_LIBCPP_HIDE_FROM_ABI' +792 | +__attribute__((__abi_tag__(_LIBCPP_TOSTRING( + _LIBCPP_VERSIONED_IDENTIFIER +| ^ + In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23: + In file included from /home/dim/src/gcc/master/gcc/system.h:233: + In file included from /usr/include/c++/v1/vector:321: + In file included from + /usr/include/c++/v1/__format/formatter_bool.h:20: + In file included from + /usr/include/c++/v1/__format/formatter_integral.h:32: + In file included from /usr/include/c++/v1/locale:202: + /usr/include/c++/v1/__locale:547:37: error: expected ';' at end of + declaration list +547 | char_type toupper(char_type __c) const +| ^ + /usr/include/c++/v1/__locale:553:48: error: too many arguments + provided to function-like macro invocation +553 | const char_type* toupper(char_type* __low, const +char_type* __high) const +|^ + /home/dim/src/gcc/master/gcc/../include/safe-ctype.h:146:9: note: + macro 'toupper' defined here +146 | #define toupper(c) do_not_use_toupper_with_safe_ctype +| ^ + +This is because libc++ uses different transitive includes than +libstdc++, and some of those transitive includes pull in various ctype +declarations (typically via ). + +There was already a special case for including before +safe-ctype.h, so move the rest of the C++ standard header includes to +the same location, to fix the problem. + +Signed-off-by: Dimitry Andric + +diff --git a/gcc/system.h b/gcc/system.h +index e924152ad4c..7a516b11438 100644 +--- a/gcc/system.h b/gcc/system.h +@@ -194,27 +194,8 @@ extern int fprintf_unlocked (FILE *, const char *, ...); + #undef fread_unlocked + #undef fwrite_unlocked + +-/* Include before "safe-ctype.h" to avoid GCC poisoning +- the ctype macros through safe-ctype.h */ +- +-#ifdef __cplusplus +-#ifdef INCLUDE_STRING +-# include +-#endif +-#endif +- +-/* There are an extraordinary number of issues with . +- The last straw is that it varies with the locale. Use libiberty's +- replacement instead. */ +-#include "safe-ctype.h" +- +-#include +- +-#include +- +-#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO +-extern int errno; +-#endif ++/*
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: d560ef1c4e57321434d7ac686b1ba6de31e0b424 Author: Sam James gentoo org> AuthorDate: Sun Jan 28 23:01:41 2024 + Commit: Sam James gentoo org> CommitDate: Sun Jan 28 23:01:53 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=d560ef1c 14.0.0: cut 17 patchset Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/README.history | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history index 3b7309d..e452982 100644 --- a/14.0.0/gentoo/README.history +++ b/14.0.0/gentoo/README.history @@ -1,4 +1,4 @@ -17 ?? ??? 2024 +17 28 Jan 2024 - 75_all_PR113364-vect.patch
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: ddeac849ac4c3fecdf591ab6fb075cc6c5afdbff Author: Sam James gentoo org> AuthorDate: Wed Jan 24 13:53:06 2024 + Commit: Sam James gentoo org> CommitDate: Wed Jan 24 13:53:06 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=ddeac849 14.0.0: drop 75_all_PR113364-vect.patch Fixed upstream. Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/75_all_PR113364-vect.patch | 13 - 14.0.0/gentoo/README.history | 4 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/14.0.0/gentoo/75_all_PR113364-vect.patch b/14.0.0/gentoo/75_all_PR113364-vect.patch deleted file mode 100644 index 8922158..000 --- a/14.0.0/gentoo/75_all_PR113364-vect.patch +++ /dev/null @@ -1,13 +0,0 @@ -https://gcc.gnu.org/PR113364 a/gcc/tree-vect-loop.cc -+++ b/gcc/tree-vect-loop.cc -@@ -5965,7 +5965,8 @@ vect_create_epilog_for_reduction (loop_vec_info loop_vinfo, - loop-closed PHI of the inner loop which we remember as - def for the reduction PHI generation. */ - bool double_reduc = false; -- bool main_exit_p = LOOP_VINFO_IV_EXIT (loop_vinfo) == loop_exit; -+ bool main_exit_p = LOOP_VINFO_IV_EXIT (loop_vinfo) == loop_exit -+&& !LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo); - stmt_vec_info rdef_info = stmt_info; - if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_double_reduction_def) - { diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history index 7ae98b3..3b7309d 100644 --- a/14.0.0/gentoo/README.history +++ b/14.0.0/gentoo/README.history @@ -1,3 +1,7 @@ +17 ?? ??? 2024 + + - 75_all_PR113364-vect.patch + 16 15 Jan 2024 - 75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: a1e21703f86e5d60a68a53839774535ccdb8403e Author: Sam James gentoo org> AuthorDate: Fri Jan 19 07:44:41 2024 + Commit: Sam James gentoo org> CommitDate: Fri Jan 19 07:44:41 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=a1e21703 14.0.0: add 76_all_PR113467-vect-miscompile.patch Bug: https://gcc.gnu.org/PR113467 Bug: https://bugs.gentoo.org/922195 Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/76_all_PR113467-vect-miscompile.patch | 15 +++ 1 file changed, 15 insertions(+) diff --git a/14.0.0/gentoo/76_all_PR113467-vect-miscompile.patch b/14.0.0/gentoo/76_all_PR113467-vect-miscompile.patch new file mode 100644 index 000..aee5ddf --- /dev/null +++ b/14.0.0/gentoo/76_all_PR113467-vect-miscompile.patch @@ -0,0 +1,15 @@ +https://gcc.gnu.org/PR113467 + +Disable early-exit peeling variants. +--- a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc +@@ -998,6 +998,9 @@ vec_init_loop_exit_info (class loop *loop) + } + } + ++ if (candidate && candidate->src != EDGE_PRED (loop->latch, 0)->src) ++return NULL; ++ + return candidate; + } +
[gentoo-commits] proj/gcc-patches:master commit in: 13.2.0/gentoo/
commit: 953476b6862099862501b7c2cfed7b91ccb8573c Author: Sam James gentoo org> AuthorDate: Wed Jan 17 01:05:33 2024 + Commit: Sam James gentoo org> CommitDate: Wed Jan 17 01:05:45 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=953476b6 13.2.0: add 91_all_PR113258_libstdc-Prefer-posix_memalign-for-aligned-new.patch This helps some Steam games. Bug: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7367 Bug: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8133 Bug: https://github.com/ValveSoftware/csgo-osx-linux/issues/2659 Bug: https://gcc.gnu.org/PR113258 Signed-off-by: Sam James gentoo.org> ...tdc-Prefer-posix_memalign-for-aligned-new.patch | 97 ++ 13.2.0/gentoo/README.history | 4 + 2 files changed, 101 insertions(+) diff --git a/13.2.0/gentoo/91_all_PR113258_libstdc-Prefer-posix_memalign-for-aligned-new.patch b/13.2.0/gentoo/91_all_PR113258_libstdc-Prefer-posix_memalign-for-aligned-new.patch new file mode 100644 index 000..a03f268 --- /dev/null +++ b/13.2.0/gentoo/91_all_PR113258_libstdc-Prefer-posix_memalign-for-aligned-new.patch @@ -0,0 +1,97 @@ +https://gcc.gnu.org/PR113258 +https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=f50f2efae9fb0965d8ccdb62cfdb698336d5a933 + +From d17158058fee187e7efb918145c87bdfff9cbfa3 Mon Sep 17 00:00:00 2001 +From: Jonathan Wakely +Date: Tue, 9 Jan 2024 15:22:46 + +Subject: [PATCH] libstdc++: Prefer posix_memalign for aligned-new [PR113258] + +As described in PR libstdc++/113258 there are old versions of tcmalloc +which replace malloc and related APIs, but do not repalce aligned_alloc +because it didn't exist at the time they were released. This means that +when operator new(size_t, align_val_t) uses aligned_alloc to obtain +memory, it comes from libc's aligned_alloc not from tcmalloc. But when +operator delete(void*, size_t, align_val_t) uses free to deallocate the +memory, that goes to tcmalloc's replacement version of free, which +doesn't know how to free it. + +If we give preference to the older posix_memalign instead of +aligned_alloc then we're more likely to use a function that will be +compatible with the replacement version of free. Because posix_memalign +has been around for longer, it's more likely that old third-party malloc +replacements will also replace posix_memalign alongside malloc and free. + +libstdc++-v3/ChangeLog: + + PR libstdc++/113258 + * libsupc++/new_opa.cc: Prefer to use posix_memalign if + available. + +(cherry picked from commit f50f2efae9fb0965d8ccdb62cfdb698336d5a933) +--- + libstdc++-v3/libsupc++/new_opa.cc | 26 +++--- + 1 file changed, 15 insertions(+), 11 deletions(-) + +diff --git a/libstdc++-v3/libsupc++/new_opa.cc b/libstdc++-v3/libsupc++/new_opa.cc +index 6eb136fa8fc7..29767c1cfaad 100644 +--- a/libstdc++-v3/libsupc++/new_opa.cc b/libstdc++-v3/libsupc++/new_opa.cc +@@ -46,12 +46,12 @@ using std::bad_alloc; + using std::size_t; + extern "C" + { +-# if _GLIBCXX_HAVE_ALIGNED_ALLOC ++# if _GLIBCXX_HAVE_POSIX_MEMALIGN ++ void *posix_memalign(void **, size_t alignment, size_t size); ++# elif _GLIBCXX_HAVE_ALIGNED_ALLOC + void *aligned_alloc(size_t alignment, size_t size); + # elif _GLIBCXX_HAVE__ALIGNED_MALLOC + void *_aligned_malloc(size_t size, size_t alignment); +-# elif _GLIBCXX_HAVE_POSIX_MEMALIGN +- void *posix_memalign(void **, size_t alignment, size_t size); + # elif _GLIBCXX_HAVE_MEMALIGN + void *memalign(size_t alignment, size_t size); + # else +@@ -63,13 +63,10 @@ extern "C" + #endif + + namespace __gnu_cxx { +-#if _GLIBCXX_HAVE_ALIGNED_ALLOC +-using ::aligned_alloc; +-#elif _GLIBCXX_HAVE__ALIGNED_MALLOC +-static inline void* +-aligned_alloc (std::size_t al, std::size_t sz) +-{ return _aligned_malloc(sz, al); } +-#elif _GLIBCXX_HAVE_POSIX_MEMALIGN ++// Prefer posix_memalign if available, because it's older than aligned_alloc ++// and so more likely to be provided by replacement malloc libraries that ++// predate the addition of aligned_alloc. See PR libstdc++/113258. ++#if _GLIBCXX_HAVE_POSIX_MEMALIGN + static inline void* + aligned_alloc (std::size_t al, std::size_t sz) + { +@@ -83,6 +80,12 @@ aligned_alloc (std::size_t al, std::size_t sz) + return ptr; + return nullptr; + } ++#elif _GLIBCXX_HAVE_ALIGNED_ALLOC ++using ::aligned_alloc; ++#elif _GLIBCXX_HAVE__ALIGNED_MALLOC ++static inline void* ++aligned_alloc (std::size_t al, std::size_t sz) ++{ return _aligned_malloc(sz, al); } + #elif _GLIBCXX_HAVE_MEMALIGN + static inline void* + aligned_alloc (std::size_t al, std::size_t sz) +@@ -128,7 +131,8 @@ operator new (std::size_t sz, std::align_val_t al) + if (__builtin_expect (sz == 0, false)) + sz = 1; + +-#if _GLIBCXX_HAVE_ALIGNED_ALLOC ++#if _GLIBCXX_HAVE_POSIX_MEMALIGN ++#elif _GLIBCXX_HAVE_ALIGNED_ALLOC + # if defined _AIX || defined __APPLE__ + /* AIX 7.2.0.0 aligned_alloc incorrectly has posix_memalign's requirement +* that alignment is a
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: 4b55a8e4b87cf08d2b043fade9284d52e7af71df Author: Sam James gentoo org> AuthorDate: Mon Jan 15 00:07:42 2024 + Commit: Sam James gentoo org> CommitDate: Mon Jan 15 00:07:53 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=4b55a8e4 14.0.0: cut patchset 16 Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/75_all_PR113364-vect.patch | 13 + 14.0.0/gentoo/README.history | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/14.0.0/gentoo/75_all_PR113364-vect.patch b/14.0.0/gentoo/75_all_PR113364-vect.patch new file mode 100644 index 000..8922158 --- /dev/null +++ b/14.0.0/gentoo/75_all_PR113364-vect.patch @@ -0,0 +1,13 @@ +https://gcc.gnu.org/PR113364 +--- a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc +@@ -5965,7 +5965,8 @@ vect_create_epilog_for_reduction (loop_vec_info loop_vinfo, + loop-closed PHI of the inner loop which we remember as + def for the reduction PHI generation. */ + bool double_reduc = false; +- bool main_exit_p = LOOP_VINFO_IV_EXIT (loop_vinfo) == loop_exit; ++ bool main_exit_p = LOOP_VINFO_IV_EXIT (loop_vinfo) == loop_exit ++&& !LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo); + stmt_vec_info rdef_info = stmt_info; + if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_double_reduction_def) + { diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history index 8e1b87e..7ae98b3 100644 --- a/14.0.0/gentoo/README.history +++ b/14.0.0/gentoo/README.history @@ -1,4 +1,4 @@ -?? ?? ??? +16 15 Jan 2024 - 75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch - 76_all_Revert-testsuite-un-xfail-TSVC-loops-that-check-for-.patch @@ -8,6 +8,7 @@ - 80_all_Revert_middle-end_support_vectorization_of_loops_with_mult.patch - 81_all_Revert-middle-end-prevent-LIM-from-hoising-vector-co.patch - 82_all_testsuite_Add_more_pragma_novector_to_new_tests.patch + + 75_all_PR113364-vect.patch 15 8 Jan 2024
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: 31de670a01566db841c795577bbdc3f2a5d35f21 Author: Sam James gentoo org> AuthorDate: Mon Jan 8 08:10:06 2024 + Commit: Sam James gentoo org> CommitDate: Mon Jan 8 08:10:06 2024 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=31de670a 14.0.0: cut patchset 15 richi is back this week so this should be the last time we need to keep reverting these as the fixes are pending his review. Signed-off-by: Sam James gentoo.org> ...le-end-explicitly-initialize-vec_stmts-PR.patch | 6 +- ...suite-un-xfail-TSVC-loops-that-check-for-.patch | 4 +- ..._Add_Advanced_SIMD_cbranch_implementation.patch | 341 + ..._add_tests_for_early_break_vectorization.patch} | 14 +- ...64_add_implementation_for_vector_cbranch.patch} | 6 +- ...support_vectorization_of_loops_with_mult.patch} | 20 +- ...e-end-prevent-LIM-from-hoising-vector-co.patch} | 6 +- ...te_Add_more_pragma_novector_to_new_tests.patch} | 4 +- 14.0.0/gentoo/README.history | 11 + 9 files changed, 382 insertions(+), 30 deletions(-) diff --git a/14.0.0/gentoo/75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch b/14.0.0/gentoo/75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch index b113f1e..93bf96b 100644 --- a/14.0.0/gentoo/75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch +++ b/14.0.0/gentoo/75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch @@ -1,7 +1,7 @@ -From a648fe2c0121414ac82926e9f8a70b33e347b930 Mon Sep 17 00:00:00 2001 +From 0d9351ff8ab23e79edc7a468a255a7c009695f21 Mon Sep 17 00:00:00 2001 From: Sam James Date: Mon, 25 Dec 2023 16:57:10 + -Subject: [PATCH 1/7] Revert "middle-end: explicitly initialize vec_stmts +Subject: [PATCH 1/8] Revert "middle-end: explicitly initialize vec_stmts [PR113132]" This reverts commit fd032cce216e003d58b2394f7e61b03dee27e81a. @@ -15,7 +15,7 @@ Signed-off-by: Sam James 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc -index f51ae3e719e7..88261a3a4f57 100644 +index a06771611ac8..2bd96b56006a 100644 --- a/gcc/tree-vect-loop.cc +++ b/gcc/tree-vect-loop.cc @@ -6207,7 +6207,7 @@ vect_create_epilog_for_reduction (loop_vec_info loop_vinfo, diff --git a/14.0.0/gentoo/76_all_Revert-testsuite-un-xfail-TSVC-loops-that-check-for-.patch b/14.0.0/gentoo/76_all_Revert-testsuite-un-xfail-TSVC-loops-that-check-for-.patch index 1e4b825..d22a7ae 100644 --- a/14.0.0/gentoo/76_all_Revert-testsuite-un-xfail-TSVC-loops-that-check-for-.patch +++ b/14.0.0/gentoo/76_all_Revert-testsuite-un-xfail-TSVC-loops-that-check-for-.patch @@ -1,7 +1,7 @@ -From 846bfbdd30d437e40e10ce8bcd896f263436dfc1 Mon Sep 17 00:00:00 2001 +From 21f952dd33ae6037ff1a18cfe1c52dcc9becce19 Mon Sep 17 00:00:00 2001 From: Sam James Date: Mon, 25 Dec 2023 16:57:12 + -Subject: [PATCH 2/7] Revert "testsuite: un-xfail TSVC loops that check for +Subject: [PATCH 2/8] Revert "testsuite: un-xfail TSVC loops that check for exit control flow vectorization" This reverts commit a657c7e3518fcfc796f223d47385cad5e97dc9a5. diff --git a/14.0.0/gentoo/77_all_Revert_arm_Add_Advanced_SIMD_cbranch_implementation.patch b/14.0.0/gentoo/77_all_Revert_arm_Add_Advanced_SIMD_cbranch_implementation.patch new file mode 100644 index 000..e284b9d --- /dev/null +++ b/14.0.0/gentoo/77_all_Revert_arm_Add_Advanced_SIMD_cbranch_implementation.patch @@ -0,0 +1,341 @@ +From f7dfd5052edeaa7f433bc296fd3c8b9c5239edb3 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Mon, 8 Jan 2024 07:09:10 + +Subject: [PATCH 3/8] Revert "arm: Add Advanced SIMD cbranch implementation" + +This reverts commit d9dd04f9f17e36854387899eb630c64a0c8d1a17. + +Bug: https://gcc.gnu.org/PR113135 +Bug: https://gcc.gnu.org/PR113136 +Bug: https://gcc.gnu.org/PR113137 +Signed-off-by: Sam James +--- + gcc/config/arm/neon.md| 49 --- + .../gcc.dg/vect/vect-early-break_2.c | 2 +- + .../gcc.dg/vect/vect-early-break_7.c | 2 +- + .../gcc.dg/vect/vect-early-break_75.c | 2 +- + .../gcc.dg/vect/vect-early-break_77.c | 2 +- + .../gcc.dg/vect/vect-early-break_82.c | 2 +- + .../gcc.dg/vect/vect-early-break_88.c | 2 +- + .../gcc.target/arm/vect-early-break-cbranch.c | 138 -- + gcc/testsuite/lib/target-supports.exp | 7 - + 9 files changed, 6 insertions(+), 200 deletions(-) + delete mode 100644 gcc/testsuite/gcc.target/arm/vect-early-break-cbranch.c + +diff --git a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md +index bb6e28ff4e74..91ca7e804555 100644 +--- a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md +@@ -408,55 +408,6 @@ (define_insn "vec_extract" + [(set_attr "type" "neon_store1_one_lane,neon_to_gp")] + ) + +-;; Patterns comparing two vectors and conditionally jump. +-;; Avdanced SIMD lacks a vector != comparison, but this is a quite common +-;;
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: ff3336c450f32a41e1907a87b2e12aedbdc2c209 Author: Sam James gentoo org> AuthorDate: Sun Dec 31 22:45:26 2023 + Commit: Sam James gentoo org> CommitDate: Sun Dec 31 23:02:35 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=ff3336c4 14.0.0: cut patchset 14 13 seems to have been a mess where I'd already done it and used it in 14.0.0_pre20231224-r1. Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/README.history | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history index b0f3170..b3ba265 100644 --- a/14.0.0/gentoo/README.history +++ b/14.0.0/gentoo/README.history @@ -1,6 +1,10 @@ -13 ?? ??? +14 31 Dec 2023 -+ 75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch + + 75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch + +13 25 Dec 2023 + + N/A 12 25 Dec 2023
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: 3dc22ec055dae66d6f92b138ae946f284d0a6abb Author: Sam James gentoo org> AuthorDate: Tue Dec 26 18:51:09 2023 + Commit: Sam James gentoo org> CommitDate: Tue Dec 26 18:51:31 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=3dc22ec0 Revert "14.0.0: drop erroneous patch" This reverts commit 5055fa1426b3a9ebab80d799ea30b6c65ad2ac74. We need this for master/. Signed-off-by: Sam James gentoo.org> ...le-end-explicitly-initialize-vec_stmts-PR.patch | 32 ++ 14.0.0/gentoo/README.history | 5 ++-- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/14.0.0/gentoo/75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch b/14.0.0/gentoo/75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch new file mode 100644 index 000..b113f1e --- /dev/null +++ b/14.0.0/gentoo/75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch @@ -0,0 +1,32 @@ +From a648fe2c0121414ac82926e9f8a70b33e347b930 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Mon, 25 Dec 2023 16:57:10 + +Subject: [PATCH 1/7] Revert "middle-end: explicitly initialize vec_stmts + [PR113132]" + +This reverts commit fd032cce216e003d58b2394f7e61b03dee27e81a. + +Bug: https://gcc.gnu.org/PR113135 +Bug: https://gcc.gnu.org/PR113136 +Bug: https://gcc.gnu.org/PR113137 +Signed-off-by: Sam James +--- + gcc/tree-vect-loop.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc +index f51ae3e719e7..88261a3a4f57 100644 +--- a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc +@@ -6207,7 +6207,7 @@ vect_create_epilog_for_reduction (loop_vec_info loop_vinfo, + exit_bb = loop_exit->dest; + exit_gsi = gsi_after_labels (exit_bb); + reduc_inputs.create (slp_node ? vec_num : ncopies); +- vec vec_stmts = vNULL; ++ vec vec_stmts; + for (unsigned i = 0; i < vec_num; i++) + { + gimple_seq stmts = NULL; +-- +2.43.0 + diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history index 90ab9ed..b0f3170 100644 --- a/14.0.0/gentoo/README.history +++ b/14.0.0/gentoo/README.history @@ -1,10 +1,9 @@ -13 25 Dec 2023 +13 ?? ??? - - 75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch ++ 75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch 12 25 Dec 2023 - + 75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch + 76_all_Revert-testsuite-un-xfail-TSVC-loops-that-check-for-.patch + 77_all_Revert-testsuite-Add-tests-for-early-break-vectoriza.patch + 78_all_Revert-AArch64-Add-implementation-for-vector-cbranch.patch
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: 5055fa1426b3a9ebab80d799ea30b6c65ad2ac74 Author: Sam James gentoo org> AuthorDate: Mon Dec 25 17:09:58 2023 + Commit: Sam James gentoo org> CommitDate: Mon Dec 25 17:09:58 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=5055fa14 14.0.0: drop erroneous patch 75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch reverts something which wasn't in the snapshot (but is a fix for the vect stuff). Signed-off-by: Sam James gentoo.org> ...le-end-explicitly-initialize-vec_stmts-PR.patch | 32 -- 14.0.0/gentoo/README.history | 4 +++ 2 files changed, 4 insertions(+), 32 deletions(-) diff --git a/14.0.0/gentoo/75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch b/14.0.0/gentoo/75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch deleted file mode 100644 index b113f1e..000 --- a/14.0.0/gentoo/75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch +++ /dev/null @@ -1,32 +0,0 @@ -From a648fe2c0121414ac82926e9f8a70b33e347b930 Mon Sep 17 00:00:00 2001 -From: Sam James -Date: Mon, 25 Dec 2023 16:57:10 + -Subject: [PATCH 1/7] Revert "middle-end: explicitly initialize vec_stmts - [PR113132]" - -This reverts commit fd032cce216e003d58b2394f7e61b03dee27e81a. - -Bug: https://gcc.gnu.org/PR113135 -Bug: https://gcc.gnu.org/PR113136 -Bug: https://gcc.gnu.org/PR113137 -Signed-off-by: Sam James - gcc/tree-vect-loop.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc -index f51ae3e719e7..88261a3a4f57 100644 a/gcc/tree-vect-loop.cc -+++ b/gcc/tree-vect-loop.cc -@@ -6207,7 +6207,7 @@ vect_create_epilog_for_reduction (loop_vec_info loop_vinfo, - exit_bb = loop_exit->dest; - exit_gsi = gsi_after_labels (exit_bb); - reduc_inputs.create (slp_node ? vec_num : ncopies); -- vec vec_stmts = vNULL; -+ vec vec_stmts; - for (unsigned i = 0; i < vec_num; i++) - { - gimple_seq stmts = NULL; --- -2.43.0 - diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history index ad540db..90ab9ed 100644 --- a/14.0.0/gentoo/README.history +++ b/14.0.0/gentoo/README.history @@ -1,3 +1,7 @@ +13 25 Dec 2023 + + - 75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch + 12 25 Dec 2023 + 75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: 2250dc0cc8c46999ad1c1d79b9aeed9056459bb6 Author: Sam James gentoo org> AuthorDate: Sun Dec 17 23:59:55 2023 + Commit: Sam James gentoo org> CommitDate: Sun Dec 17 23:59:55 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=2250dc0c 14.0.0: cut 11 patchset Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/README.history | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history index c535708..802a99a 100644 --- a/14.0.0/gentoo/README.history +++ b/14.0.0/gentoo/README.history @@ -1,4 +1,4 @@ -11 ?? ??? 2023 +11 17 Dec 2023 - 76_all_PR112869_cxx.patch
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: 8280462977fca22bf0c859ca8427b66ac7e665ab Author: Sam James gentoo org> AuthorDate: Thu Dec 14 21:23:01 2023 + Commit: Sam James gentoo org> CommitDate: Thu Dec 14 21:23:01 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=82804629 14.0.0: drop obsolete 76_all_PR112869_cxx.patch Fixed upstream. Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/76_all_PR112869_cxx.patch | 20 14.0.0/gentoo/README.history| 4 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/14.0.0/gentoo/76_all_PR112869_cxx.patch b/14.0.0/gentoo/76_all_PR112869_cxx.patch deleted file mode 100644 index 7ec000b..000 --- a/14.0.0/gentoo/76_all_PR112869_cxx.patch +++ /dev/null @@ -1,20 +0,0 @@ -https://gcc.gnu.org/PR112869 (https://gcc.gnu.org/PR112869#c2) -https://gcc.gnu.org/PR112907 a/gcc/cp/cp-gimplify.cc -+++ b/gcc/cp/cp-gimplify.cc -@@ -1177,13 +1177,9 @@ cp_fold_immediate_r (tree *stmt_p, int *walk_subtrees, void *data_) - ? tf_error : tf_none); - const tree_code code = TREE_CODE (stmt); - -- /* No need to look into types or unevaluated operands. -- NB: This affects cp_fold_r as well. */ -+ /* No need to look into types or unevaluated operands. */ - if (TYPE_P (stmt) || unevaluated_p (code) || in_immediate_context ()) --{ -- *walk_subtrees = 0; -- return NULL_TREE; --} -+return NULL_TREE; - - tree decl = NULL_TREE; - bool call_p = false; diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history index 4359548..c535708 100644 --- a/14.0.0/gentoo/README.history +++ b/14.0.0/gentoo/README.history @@ -1,3 +1,7 @@ +11 ?? ??? 2023 + + - 76_all_PR112869_cxx.patch + 10 10 Dec 2023 - 75_all_PR112572-missing-notes-update.patch
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: 6ea4cfc078ef8e37f206e79fc8940fa109237cd1 Author: Sam James gentoo org> AuthorDate: Sun Dec 10 22:42:14 2023 + Commit: Sam James gentoo org> CommitDate: Sun Dec 10 22:42:14 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=6ea4cfc0 14.0.0: cut patchset 10 Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/README.history | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history index a8dc8d4..4359548 100644 --- a/14.0.0/gentoo/README.history +++ b/14.0.0/gentoo/README.history @@ -1,4 +1,4 @@ -10 ?? ??? 2023 +10 10 Dec 2023 - 75_all_PR112572-missing-notes-update.patch + 76_all_PR112869_cxx.patch
[gentoo-commits] proj/gcc-patches:master commit in: 11.4.0/gentoo/
commit: f50aa864f4c7e2fd6265065baf5f838d352189da Author: Sam James gentoo org> AuthorDate: Sat Dec 9 13:35:48 2023 + Commit: Sam James gentoo org> CommitDate: Sat Dec 9 13:35:54 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=f50aa864 11.4.0: cut 12 patchset Signed-off-by: Sam James gentoo.org> 11.4.0/gentoo/README.history | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/11.4.0/gentoo/README.history b/11.4.0/gentoo/README.history index c16ac1e..8c88904 100644 --- a/11.4.0/gentoo/README.history +++ b/11.4.0/gentoo/README.history @@ -1,4 +1,4 @@ -12 ?? ??? 2023 +12 9 Dec 2023 - 77_all_all_PR112823_13_libiberty-warning.patch
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: cf2708c1e396fac46e374abba252b8b7b10f3270 Author: Sam James gentoo org> AuthorDate: Thu Dec 7 18:39:36 2023 + Commit: Sam James gentoo org> CommitDate: Thu Dec 7 18:40:00 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=cf2708c1 14.0.0: add botan/openmpt ICE patch Bug: https://gcc.gnu.org/PR112869 Bug: https://gcc.gnu.org/PR112907 Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/76_all_PR112869_cxx.patch | 20 14.0.0/gentoo/README.history| 1 + 2 files changed, 21 insertions(+) diff --git a/14.0.0/gentoo/76_all_PR112869_cxx.patch b/14.0.0/gentoo/76_all_PR112869_cxx.patch new file mode 100644 index 000..7ec000b --- /dev/null +++ b/14.0.0/gentoo/76_all_PR112869_cxx.patch @@ -0,0 +1,20 @@ +https://gcc.gnu.org/PR112869 (https://gcc.gnu.org/PR112869#c2) +https://gcc.gnu.org/PR112907 +--- a/gcc/cp/cp-gimplify.cc b/gcc/cp/cp-gimplify.cc +@@ -1177,13 +1177,9 @@ cp_fold_immediate_r (tree *stmt_p, int *walk_subtrees, void *data_) + ? tf_error : tf_none); + const tree_code code = TREE_CODE (stmt); + +- /* No need to look into types or unevaluated operands. +- NB: This affects cp_fold_r as well. */ ++ /* No need to look into types or unevaluated operands. */ + if (TYPE_P (stmt) || unevaluated_p (code) || in_immediate_context ()) +-{ +- *walk_subtrees = 0; +- return NULL_TREE; +-} ++return NULL_TREE; + + tree decl = NULL_TREE; + bool call_p = false; diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history index dd1bec0..a8dc8d4 100644 --- a/14.0.0/gentoo/README.history +++ b/14.0.0/gentoo/README.history @@ -1,6 +1,7 @@ 10 ?? ??? 2023 - 75_all_PR112572-missing-notes-update.patch + + 76_all_PR112869_cxx.patch 9 20 Nov 2023
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: 79bab9e66fc190741117eb485fe425aeb5096b0a Author: Sam James gentoo org> AuthorDate: Wed Dec 6 10:51:25 2023 + Commit: Sam James gentoo org> CommitDate: Wed Dec 6 10:52:16 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=79bab9e6 14.0.0: drop 75_all_PR112572-missing-notes-update.patch Per https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112572#c33, this shouldn't be needed anymore. Bug: https://gcc.gnu.org/PR112760 Bug: https://gcc.gnu.org/PR112572 Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch | 14 -- 14.0.0/gentoo/README.history | 4 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch b/14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch deleted file mode 100644 index 33d2e4f..000 --- a/14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch +++ /dev/null @@ -1,14 +0,0 @@ -https://gcc.gnu.org/PR112568 -https://gcc.gnu.org/PR112572 (specifically https://gcc.gnu.org/PR112572#c18 for the patch) -https://bugs.gentoo.org/917496 -https://bugs.gentoo.org/917486 a/gcc/compare-elim.cc -+++ b/gcc/compare-elim.cc -@@ -908,6 +908,7 @@ static unsigned int - execute_compare_elim_after_reload (void) - { - df_set_flags (DF_LR_RUN_DCE); -+ df_note_add_problem (); - df_analyze (); - - gcc_checking_assert (!all_compares.exists ()); diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history index 9d7a939..dd1bec0 100644 --- a/14.0.0/gentoo/README.history +++ b/14.0.0/gentoo/README.history @@ -1,3 +1,7 @@ +10 ?? ??? 2023 + + - 75_all_PR112572-missing-notes-update.patch + 9 20 Nov 2023 + 75_all_PR112572-missing-notes-update.patch
[gentoo-commits] proj/gcc-patches:master commit in: 11.4.0/gentoo/
commit: 185baffd2265d79d52d9c42050ecdf9239195923 Author: Sam James gentoo org> AuthorDate: Wed Dec 6 10:52:41 2023 + Commit: Sam James gentoo org> CommitDate: Wed Dec 6 10:52:41 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=185baffd 11.4.0: drop now obsolete 77_all_all_PR112823_13_libiberty-warning.patch Merged upstream. Bug: https://gcc.gnu.org/PR112823 Signed-off-by: Sam James gentoo.org> .../77_all_all_PR112823_13_libiberty-warning.patch | 36 -- 11.4.0/gentoo/README.history | 4 +++ 2 files changed, 4 insertions(+), 36 deletions(-) diff --git a/11.4.0/gentoo/77_all_all_PR112823_13_libiberty-warning.patch b/11.4.0/gentoo/77_all_all_PR112823_13_libiberty-warning.patch deleted file mode 100644 index 26d38af..000 --- a/11.4.0/gentoo/77_all_all_PR112823_13_libiberty-warning.patch +++ /dev/null @@ -1,36 +0,0 @@ -https://gcc.gnu.org/PR112823 -https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=38757aa88735ab - -From 38757aa88735ab2e511bc428e2407a5a5e9fa0be Mon Sep 17 00:00:00 2001 -From: Iain Sandoe -Date: Mon, 23 Aug 2021 17:34:43 +0100 -Subject: [PATCH] libiberty, Darwin: Fix a build warning. - -r12-3005-g220c410162ebece4f missed a cast for the set_32 call. -Fixed thus. - -Signed-off-by: Iain Sandoe - -libiberty/ChangeLog: - - * simple-object-mach-o.c (simple_object_mach_o_write_segment): - Cast the first argument to set_32 as needed. - libiberty/simple-object-mach-o.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libiberty/simple-object-mach-o.c b/libiberty/simple-object-mach-o.c -index 72b69d19c21..a8869e7c639 100644 a/libiberty/simple-object-mach-o.c -+++ b/libiberty/simple-object-mach-o.c -@@ -1228,7 +1228,7 @@ simple_object_mach_o_write_segment (simple_object_write *sobj, int descriptor, - /* Swap the indices, if required. */ - - for (i = 0; i < (nsects_in * 4); ++i) -- set_32 ([i], index[i]); -+ set_32 ((unsigned char *) [i], index[i]); - - sechdr_offset += sechdrsize; - --- -2.39.3 diff --git a/11.4.0/gentoo/README.history b/11.4.0/gentoo/README.history index 436fcb5..c16ac1e 100644 --- a/11.4.0/gentoo/README.history +++ b/11.4.0/gentoo/README.history @@ -1,3 +1,7 @@ +12 ?? ??? 2023 + + - 77_all_all_PR112823_13_libiberty-warning.patch + 11 2 Dec 2023 + 77_all_all_PR112823_13_libiberty-warning.patch
[gentoo-commits] proj/gcc-patches:master commit in: 13.2.0/gentoo/
commit: 4645a0fbda11a783b7545ae92d8a7e1783a7f583 Author: Sam James gentoo org> AuthorDate: Sun Dec 3 03:17:22 2023 + Commit: Sam James gentoo org> CommitDate: Sun Dec 3 03:17:22 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=4645a0fb 13.2.0: cut patchset 11 Signed-off-by: Sam James gentoo.org> 13.2.0/gentoo/README.history | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/13.2.0/gentoo/README.history b/13.2.0/gentoo/README.history index e306264..69f7809 100644 --- a/13.2.0/gentoo/README.history +++ b/13.2.0/gentoo/README.history @@ -1,4 +1,4 @@ -11 ?? ??? 2023 +11 3 Dec 2023 U 76_all_match.pd-don-t-emit-label-if-not-needed.patch U 77_all_match.pd-Remove-commented-out-line-pragmas-unless-vv.patch
[gentoo-commits] proj/gcc-patches:master commit in: 11.4.0/gentoo/
commit: a0a1379a3be2a614058045a6bf24eb67d6007044 Author: Sam James gentoo org> AuthorDate: Sat Dec 2 05:18:29 2023 + Commit: Sam James gentoo org> CommitDate: Sat Dec 2 05:18:29 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=a0a1379a 11.4.0: add 77_all_all_PR112823_13_libiberty-warning.patch Bug: https://gcc.gnu.org/PR112823 Signed-off-by: Sam James gentoo.org> .../77_all_all_PR112823_13_libiberty-warning.patch | 36 ++ 11.4.0/gentoo/README.history | 3 ++ 2 files changed, 39 insertions(+) diff --git a/11.4.0/gentoo/77_all_all_PR112823_13_libiberty-warning.patch b/11.4.0/gentoo/77_all_all_PR112823_13_libiberty-warning.patch new file mode 100644 index 000..26d38af --- /dev/null +++ b/11.4.0/gentoo/77_all_all_PR112823_13_libiberty-warning.patch @@ -0,0 +1,36 @@ +https://gcc.gnu.org/PR112823 +https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=38757aa88735ab + +From 38757aa88735ab2e511bc428e2407a5a5e9fa0be Mon Sep 17 00:00:00 2001 +From: Iain Sandoe +Date: Mon, 23 Aug 2021 17:34:43 +0100 +Subject: [PATCH] libiberty, Darwin: Fix a build warning. + +r12-3005-g220c410162ebece4f missed a cast for the set_32 call. +Fixed thus. + +Signed-off-by: Iain Sandoe + +libiberty/ChangeLog: + + * simple-object-mach-o.c (simple_object_mach_o_write_segment): + Cast the first argument to set_32 as needed. +--- + libiberty/simple-object-mach-o.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libiberty/simple-object-mach-o.c b/libiberty/simple-object-mach-o.c +index 72b69d19c21..a8869e7c639 100644 +--- a/libiberty/simple-object-mach-o.c b/libiberty/simple-object-mach-o.c +@@ -1228,7 +1228,7 @@ simple_object_mach_o_write_segment (simple_object_write *sobj, int descriptor, + /* Swap the indices, if required. */ + + for (i = 0; i < (nsects_in * 4); ++i) +- set_32 ([i], index[i]); ++ set_32 ((unsigned char *) [i], index[i]); + + sechdr_offset += sechdrsize; + +-- +2.39.3 diff --git a/11.4.0/gentoo/README.history b/11.4.0/gentoo/README.history index b578306..436fcb5 100644 --- a/11.4.0/gentoo/README.history +++ b/11.4.0/gentoo/README.history @@ -1,3 +1,6 @@ +11 2 Dec 2023 + + 77_all_all_PR112823_13_libiberty-warning.patch + 10 5 May 2023 - 77_all_all_PR109585_13_rtl-alias-analysis-typo.patch
[gentoo-commits] proj/gcc-patches:master commit in: 13.2.0/gentoo/
commit: 1e31431a93ba11e6905e7914a9e470b4a3e928ec Author: Sam James gentoo org> AuthorDate: Wed Nov 29 20:24:57 2023 + Commit: Sam James gentoo org> CommitDate: Wed Nov 29 20:24:57 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=1e31431a 13.2.0: rebase patches Signed-off-by: Sam James gentoo.org> ...l_Remove-DEFAULT_MATCHPD_PARTITIONS-macro.patch | 24 ++-- in-Make-TM_P_H-depend-on-TREE_H-PR111021.patch | 8 +++ ...in-Make-recog.h-depend-on-TREE_H-PR111021.patch | 9 ...genemit-Split-insn-emit.cc-into-ten-files.patch | 26 +++--- 13.2.0/gentoo/README.history | 4 5 files changed, 38 insertions(+), 33 deletions(-) diff --git a/13.2.0/gentoo/87_all_Remove-DEFAULT_MATCHPD_PARTITIONS-macro.patch b/13.2.0/gentoo/87_all_Remove-DEFAULT_MATCHPD_PARTITIONS-macro.patch index 5cbeb48..5e6a81d 100644 --- a/13.2.0/gentoo/87_all_Remove-DEFAULT_MATCHPD_PARTITIONS-macro.patch +++ b/13.2.0/gentoo/87_all_Remove-DEFAULT_MATCHPD_PARTITIONS-macro.patch @@ -1,9 +1,9 @@ https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=bc45e18d433f879a02e369d027829f90f9e85724 -From f68becb26d43428a8e35ff2528c2bce719a7bb0a Mon Sep 17 00:00:00 2001 +From e351a8c9975b93e3e98e52342cb77b6a2969257f Mon Sep 17 00:00:00 2001 From: Tamar Christina Date: Mon, 12 Jun 2023 14:06:08 +0100 -Subject: [PATCH 2/6] Remove DEFAULT_MATCHPD_PARTITIONS macro +Subject: [PATCH 10/14] Remove DEFAULT_MATCHPD_PARTITIONS macro As Jakub pointed out, DEFAULT_MATCHPD_PARTITIONS is now unused and can be removed. @@ -21,10 +21,10 @@ gcc/ChangeLog: 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/gcc/configure b/gcc/configure -index 843fd5449dd..3750f77fd03 100755 +index 2c124f1b0337..61c18a13ab7b 100755 --- a/gcc/configure +++ b/gcc/configure -@@ -7908,11 +7908,6 @@ if (test $DEFAULT_MATCHPD_PARTITIONS -lt 1); then +@@ -7914,11 +7914,6 @@ if (test $DEFAULT_MATCHPD_PARTITIONS -lt 1); then fi @@ -36,26 +36,26 @@ index 843fd5449dd..3750f77fd03 100755 # Enable __cxa_atexit for C++. # Check whether --enable-__cxa_atexit was given. -@@ -19850,7 +19845,7 @@ else +@@ -19873,7 +19868,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF --#line 19853 "configure" -+#line 19848 "configure" +-#line 19876 "configure" ++#line 19871 "configure" #include "confdefs.h" #if HAVE_DLFCN_H -@@ -19956,7 +19951,7 @@ else +@@ -19979,7 +19974,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF --#line 19959 "configure" -+#line 19954 "configure" +-#line 19982 "configure" ++#line 19977 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gcc/configure.ac b/gcc/configure.ac -index de5e3aef2c8..7f8aa5329c7 100644 +index 526ce0665a3e..c15b65367419 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -932,8 +932,6 @@ if (test $DEFAULT_MATCHPD_PARTITIONS -lt 1); then @@ -68,5 +68,5 @@ index de5e3aef2c8..7f8aa5329c7 100644 # Enable __cxa_atexit for C++. -- -2.42.0 +2.43.0 diff --git a/13.2.0/gentoo/88_all_Makefile.in-Make-TM_P_H-depend-on-TREE_H-PR111021.patch b/13.2.0/gentoo/88_all_Makefile.in-Make-TM_P_H-depend-on-TREE_H-PR111021.patch index bd738cb..aa6a0f3 100644 --- a/13.2.0/gentoo/88_all_Makefile.in-Make-TM_P_H-depend-on-TREE_H-PR111021.patch +++ b/13.2.0/gentoo/88_all_Makefile.in-Make-TM_P_H-depend-on-TREE_H-PR111021.patch @@ -1,9 +1,9 @@ https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=8353b9c5f5af0e65cb04fcbb7325d6a566006cd4 -From c60ffbdd0b7bee758672d66187b65eaf1a59d4a1 Mon Sep 17 00:00:00 2001 +From f9139ea69c23448a874cbb64c2d201cf9f7ece2f Mon Sep 17 00:00:00 2001 From: Kewen Lin Date: Fri, 18 Aug 2023 05:03:40 -0500 -Subject: [PATCH 4/6] Makefile.in: Make TM_P_H depend on $(TREE_H) [PR111021] +Subject: [PATCH 12/14] Makefile.in: Make TM_P_H depend on $(TREE_H) [PR111021] As PR111021 shows, the below ${port}-protos.h include tree.h for code_helper and tree_code: @@ -48,7 +48,7 @@ gcc/ChangeLog: 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/Makefile.in b/gcc/Makefile.in -index 975fbb61ea8..115d2a6d9b7 100644 +index 975fbb61ea8a..115d2a6d9b76 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -886,7 +886,8 @@ OPTIONS_C_EXTRA = $(PRETTY_PRINT_H) @@ -62,5 +62,5 @@ index 975fbb61ea8..115d2a6d9b7 100644 GTM_H = tm.h $(tm_file_list) insn-constants.h TM_H = $(GTM_H) insn-flags.h $(OPTIONS_H) -- -2.42.0 +2.43.0 diff --git a/13.2.0/gentoo/89_all_Makefile.in-Make-recog.h-depend-on-TREE_H-PR111021.patch b/13.2.0/gentoo/89_all_Makefile.in-Make-recog.h-depend-on-TREE_H-PR111021.patch index 7254215..330503a 100644 --- a/13.2.0/gentoo/89_all_Makefile.in-Make-recog.h-depend-on-TREE_H-PR111021.patch +++
[gentoo-commits] proj/gcc-patches:master commit in: 13.2.0/gentoo/
commit: 27a129d42cd0e4a96d591d5ccadf5d220f441e06 Author: Sam James gentoo org> AuthorDate: Wed Nov 29 20:15:37 2023 + Commit: Sam James gentoo org> CommitDate: Wed Nov 29 20:15:49 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=27a129d4 13.2.0: rebase patches U 76_all_match.pd-don-t-emit-label-if-not-needed.patch U 77_all_match.pd-Remove-commented-out-line-pragmas-unless-vv.patch U 78_all_match.pd-CSE-the-dump-output-check.patch U 79_all_genmatch-split-shared-code-to-gimple-match-exports.c.patch U 80_all_match.pd-automatically-partition-match.cc-files.patch U 81_all_match.pd-Use-splits-in-makefile-and-make-configurabl.patch + 82_all_Makefile.in-clean-up-match.pd-related-dependencies.patch Signed-off-by: Sam James gentoo.org> ...l_match.pd-don-t-emit-label-if-not-needed.patch | 24 - ...move-commented-out-line-pragmas-unless-vv.patch | 10 ++-- ...78_all_match.pd-CSE-the-dump-output-check.patch | 16 +++--- ...lit-shared-code-to-gimple-match-exports.c.patch | 18 +++ ...pd-automatically-partition-match.cc-files.patch | 36 ++--- ...e-splits-in-makefile-and-make-configurabl.patch | 28 +- ...in-clean-up-match.pd-related-dependencies.patch | 60 ++ 13.2.0/gentoo/README.history | 10 8 files changed, 136 insertions(+), 66 deletions(-) diff --git a/13.2.0/gentoo/76_all_match.pd-don-t-emit-label-if-not-needed.patch b/13.2.0/gentoo/76_all_match.pd-don-t-emit-label-if-not-needed.patch index ac9efe6..9d702eb 100644 --- a/13.2.0/gentoo/76_all_match.pd-don-t-emit-label-if-not-needed.patch +++ b/13.2.0/gentoo/76_all_match.pd-don-t-emit-label-if-not-needed.patch @@ -1,9 +1,9 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109927#c21 -From 6894f8e1fafe211a5f14ecbb534c92c2b78beb3a Mon Sep 17 00:00:00 2001 +From 30f78d42a215686cab9c7276076f11e5ea08341d Mon Sep 17 00:00:00 2001 From: Tamar Christina Date: Fri, 5 May 2023 13:35:17 +0100 -Subject: [PATCH 1/6] match.pd: don't emit label if not needed +Subject: [PATCH 02/14] match.pd: don't emit label if not needed This is a small QoL codegen improvement for match.pd to not emit labels when they are not needed. The codegen is nice and there is a small (but consistent) @@ -20,10 +20,10 @@ gcc/ChangeLog: 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/gcc/genmatch.cc b/gcc/genmatch.cc -index 4fab4135347..638606b2502 100644 +index 98b429a9d0bb..0c5a19aca8ed 100644 --- a/gcc/genmatch.cc +++ b/gcc/genmatch.cc -@@ -3352,6 +3352,7 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) +@@ -3354,6 +3354,7 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) char local_fail_label[256]; snprintf (local_fail_label, 256, "next_after_fail%u", ++fail_label_cnt); fail_label = local_fail_label; @@ -31,7 +31,7 @@ index 4fab4135347..638606b2502 100644 /* Analyze captures and perform early-outs on the incoming arguments that cover cases we cannot handle. */ -@@ -3366,6 +3367,7 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) +@@ -3368,6 +3369,7 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) fprintf_indent (f, indent, "if (TREE_SIDE_EFFECTS (_p%d)) goto %s;\n", i, fail_label); @@ -39,7 +39,7 @@ index 4fab4135347..638606b2502 100644 if (verbose >= 1) warning_at (as_a (s->match)->ops[i]->location, "forcing toplevel operand to have no " -@@ -3381,6 +3383,7 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) +@@ -3383,6 +3385,7 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) fprintf_indent (f, indent, "if (TREE_SIDE_EFFECTS (captures[%d])) " "goto %s;\n", i, fail_label); @@ -47,7 +47,7 @@ index 4fab4135347..638606b2502 100644 if (verbose >= 1) warning_at (cinfo.info[i].c->location, "forcing captured operand to have no " -@@ -3423,7 +3426,10 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) +@@ -3425,7 +3428,10 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) } if (s->kind == simplify::SIMPLIFY) @@ -59,7 +59,7 @@ index 4fab4135347..638606b2502 100644 fprintf_indent (f, indent, "if (UNLIKELY (dump_file && (dump_flags & TDF_FOLDING))) " "fprintf (dump_file, \"%s ", -@@ -3496,9 +3502,12 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) +@@ -3498,9 +3504,12 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) "res_op->resimplify (%s, valueize);\n", !e->force_leaf ? "lseq" : "NULL"); if
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: de8083fe20394a4c7d05f60631b7524a26f39986 Author: Sam James gentoo org> AuthorDate: Mon Nov 20 06:52:35 2023 + Commit: Sam James gentoo org> CommitDate: Mon Nov 20 06:52:42 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=de8083fe 14.0.0: cut patchset 9 Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/README.history | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history index 415eb03..9d7a939 100644 --- a/14.0.0/gentoo/README.history +++ b/14.0.0/gentoo/README.history @@ -1,4 +1,4 @@ -9 ?? ??? 2023 +9 20 Nov 2023 + 75_all_PR112572-missing-notes-update.patch
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: a701b1aeb797c8a449217874a9675547dc80fca3 Author: Sam James gentoo org> AuthorDate: Sun Nov 19 11:05:31 2023 + Commit: Sam James gentoo org> CommitDate: Sun Nov 19 11:05:31 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=a701b1ae 75_all_PR112572-missing-notes-update.patch: add specific comment ref Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch b/14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch index 74e42d3..33d2e4f 100644 --- a/14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch +++ b/14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch @@ -1,5 +1,5 @@ https://gcc.gnu.org/PR112568 -https://gcc.gnu.org/PR112572 +https://gcc.gnu.org/PR112572 (specifically https://gcc.gnu.org/PR112572#c18 for the patch) https://bugs.gentoo.org/917496 https://bugs.gentoo.org/917486 --- a/gcc/compare-elim.cc
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: fb2901cba5026337511402c7745b2eb317e9b35c Author: Sam James gentoo org> AuthorDate: Sun Nov 19 11:03:42 2023 + Commit: Sam James gentoo org> CommitDate: Sun Nov 19 11:03:52 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=fb2901cb 14.0.0: add 75_all_PR112572-missing-notes-update.patch Fixes LLVM, mesa, pipewire miscompilation. Bug: https://gcc.gnu.org/PR112568 Bug: https://gcc.gnu.org/PR112572 Bug: https://bugs.gentoo.org/917496 Bug: https://bugs.gentoo.org/917486 Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch | 14 ++ 14.0.0/gentoo/README.history | 4 2 files changed, 18 insertions(+) diff --git a/14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch b/14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch new file mode 100644 index 000..74e42d3 --- /dev/null +++ b/14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch @@ -0,0 +1,14 @@ +https://gcc.gnu.org/PR112568 +https://gcc.gnu.org/PR112572 +https://bugs.gentoo.org/917496 +https://bugs.gentoo.org/917486 +--- a/gcc/compare-elim.cc b/gcc/compare-elim.cc +@@ -908,6 +908,7 @@ static unsigned int + execute_compare_elim_after_reload (void) + { + df_set_flags (DF_LR_RUN_DCE); ++ df_note_add_problem (); + df_analyze (); + + gcc_checking_assert (!all_compares.exists ()); diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history index bcf2394..415eb03 100644 --- a/14.0.0/gentoo/README.history +++ b/14.0.0/gentoo/README.history @@ -1,3 +1,7 @@ +9 ?? ??? 2023 + + + 75_all_PR112572-missing-notes-update.patch + 8 05 Nov 2023 - 75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: 35bb529f420ff5863fdae51049e6935ab927ff3d Author: Sam James gentoo org> AuthorDate: Tue Nov 14 07:10:56 2023 + Commit: Sam James gentoo org> CommitDate: Tue Nov 14 07:11:13 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=35bb529f 14.0.0: drop 25_all_lto-intl-workaround-PR95194.patch The built-in intl/ was dropped in upstream commit fbe4e64365ec7fc68536bbf351c2fb246afaf7e6 by our very own Arsen, so this is obsolete. Bug: https://bugs.gentoo.org/723370 Bug: https://gcc.gnu.org/PR95194 Signed-off-by: Sam James gentoo.org> .../gentoo/25_all_lto-intl-workaround-PR95194.patch | 20 1 file changed, 20 deletions(-) diff --git a/14.0.0/gentoo/25_all_lto-intl-workaround-PR95194.patch b/14.0.0/gentoo/25_all_lto-intl-workaround-PR95194.patch deleted file mode 100644 index 9613216..000 --- a/14.0.0/gentoo/25_all_lto-intl-workaround-PR95194.patch +++ /dev/null @@ -1,20 +0,0 @@ -Trick libintl not to use '_INTL_REDIRECT_ASM' mode as it's -incompatible with LTO builds. - -glibc does not normally use libintl implementations and uses -it's own primitives. But musl ond others do fall back to libintl. - -Reported-by: Andrew Savchenko -Bug: https://bugs.gentoo.org/723370 -Bug: https://gcc.gnu.org/PR95194 a/intl/libgnuintl.h -+++ b/intl/libgnuintl.h -@@ -93,7 +93,7 @@ extern "C" { -If he doesn't, we choose the method. A third possible method is -_INTL_REDIRECT_ASM, supported only by GCC. */ - #if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS) --# if __GNUC__ >= 2 && !defined __APPLE_CC__ && (defined __STDC__ || defined __cplusplus) -+# if __GNUC__ >= 2 && !defined __APPLE_CC__ && (defined __STDC__ || defined __cplusplus) && USE_ASM_ALIASES_THAT_BREAK_LTO - # define _INTL_REDIRECT_ASM - # else - # ifdef __cplusplus
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: 8474a5ef92cb94c0a6a0dfc0ca7a152fe62a9546 Author: Sam James gentoo org> AuthorDate: Sun Nov 5 22:39:45 2023 + Commit: Sam James gentoo org> CommitDate: Sun Nov 5 22:39:45 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=8474a5ef 14.0.0: cut new patchset Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/README.history | 4 1 file changed, 4 insertions(+) diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history index 4bd7684..bcf2394 100644 --- a/14.0.0/gentoo/README.history +++ b/14.0.0/gentoo/README.history @@ -1,3 +1,7 @@ +8 05 Nov 2023 + + - 75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch + 7 28 Oct 2023 U 75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: 2b02f083e67e97f8187d3ec023c3d281f49232c0 Author: Sam James gentoo org> AuthorDate: Tue Oct 31 19:56:42 2023 + Commit: Sam James gentoo org> CommitDate: Tue Oct 31 19:56:42 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=2b02f083 14.0.0: drop upstreamed 75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch For the benefit of users. Signed-off-by: Sam James gentoo.org> ...genemit-Split-insn-emit.cc-into-ten-files.patch | 1405 1 file changed, 1405 deletions(-) diff --git a/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch b/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch deleted file mode 100644 index bd31760..000 --- a/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch +++ /dev/null @@ -1,1405 +0,0 @@ -https://gcc.gnu.org/PR54179 -https://inbox.sourceware.org/gcc-patches/de0f7bdc-d236-4f5b-9504-d5bfb215d...@gmail.com/ - -From a3804c98c5f73c02b3732b06a15dc4a397e60dad Mon Sep 17 00:00:00 2001 -From: Robin Dapp -Date: Fri, 27 Oct 2023 21:04:25 +0200 -Subject: [PATCH] genemit: Split insn-emit.cc into ten files. - -After working with Sam off-list (thanks) I managed to get hppa to -build. Initially it looked as if hppa just had a very small number of -instruction patterns so we wouldn't generate all 10 output files. -However, the actual issue (which we will only hit with a low -pattern count) was with counting all the patterns vs only counting -the patterns that will be output. A wrong pattern count lead to -prematurely stopping to write output files. - -With that corrected, hppa "just works" until I hit linker errors -due to relocations - most likely unrelated: - -bin/ld: unwind-dw2-fde-dip_s.o(.data.rel.ro+0): cannot handle -R_PARISC_FPTR64 for __pthread_key_create@@GLIBC_2.34 - -Attached is v3 that has been bootstrapped and tested on x86 and power10, -aarch64 bootstrap was ok, testsuite is still running. A riscv build and -testsuite run was successful as well. - -Regards - Robin - ->From 248744c328440bff9cc339d2bf622852cbaac343 Mon Sep 17 00:00:00 2001 -From: Robin Dapp -Date: Thu, 12 Oct 2023 11:23:26 +0200 -Subject: [PATCH v3] genemit: Split insn-emit.cc into several partitions. - -On riscv insn-emit.cc has grown to over 1.2 mio lines of code and -compiling it takes considerable time. -Therefore, this patch adjust genemit to create several partitions -(insn-emit-1.cc to insn-emit-n.cc). The available patterns are -written to the given files in a sequential fashion. - -Similar to match.pd a configure option --with-emitinsn-partitions=num -is introduced that makes the number of partition configurable. - -gcc/ChangeLog: - - PR bootstrap/84402 - PR target/111600 - - * Makefile.in: Handle split insn-emit.cc. - * configure: Regenerate. - * configure.ac: Add --with-insnemit-partitions. - * genemit.cc (output_peephole2_scratches): Print to file instead - of stdout. - (print_code): Ditto. - (gen_rtx_scratch): Ditto. - (gen_exp): Ditto. - (gen_emit_seq): Ditto. - (emit_c_code): Ditto. - (gen_insn): Ditto. - (gen_expand): Ditto. - (gen_split): Ditto. - (output_add_clobbers): Ditto. - (output_added_clobbers_hard_reg_p): Ditto. - (print_overload_arguments): Ditto. - (print_overload_test): Ditto. - (handle_overloaded_code_for): Ditto. - (handle_overloaded_gen): Ditto. - (print_header): New function. - (handle_arg): New function. - (main): Split output into 10 files. - * gensupport.cc (count_patterns): New function. - * gensupport.h (count_patterns): Define. - * read-md.cc (md_reader::print_md_ptr_loc): Add file argument. - * read-md.h (class md_reader): Change definition. - gcc/Makefile.in | 36 ++- - gcc/configure | 24 +- - gcc/configure.ac | 13 ++ - gcc/genemit.cc| 542 +- - gcc/gensupport.cc | 55 + - gcc/gensupport.h | 1 + - gcc/read-md.cc| 4 +- - gcc/read-md.h | 2 +- - 8 files changed, 422 insertions(+), 255 deletions(-) - -diff --git a/gcc/Makefile.in b/gcc/Makefile.in -index 91d6bfbea4d0..d8bfad8de154 100644 a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -236,6 +236,13 @@ GIMPLE_MATCH_PD_SEQ_O = $(patsubst %, gimple-match-%.o, $(MATCH_SPLITS_SEQ)) - GENERIC_MATCH_PD_SEQ_SRC = $(patsubst %, generic-match-%.cc, $(MATCH_SPLITS_SEQ)) - GENERIC_MATCH_PD_SEQ_O = $(patsubst %, generic-match-%.o, $(MATCH_SPLITS_SEQ)) - -+# The number of splits to be made for the insn-emit files. -+NUM_INSNEMIT_SPLITS = @DEFAULT_INSNEMIT_PARTITIONS@ -+INSNEMIT_SPLITS_SEQ = $(wordlist 1,$(NUM_INSNEMIT_SPLITS),$(one_to_)) -+INSNEMIT_SEQ_SRC = $(patsubst %, insn-emit-%.cc, $(INSNEMIT_SPLITS_SEQ)) -+INSNEMIT_SEQ_TMP = $(patsubst %, tmp-emit-%.cc, $(INSNEMIT_SPLITS_SEQ)) -+INSNEMIT_SEQ_O =
[gentoo-commits] proj/gcc-patches:master commit in: 13.2.0/gentoo/
commit: 4e7cf4e3cf83a83932fd23c7dfb6a31903d09dd7 Author: Sam James gentoo org> AuthorDate: Fri Oct 27 23:39:42 2023 + Commit: Sam James gentoo org> CommitDate: Fri Oct 27 23:39:42 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=4e7cf4e3 13.2.0: update 90_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch Signed-off-by: Sam James gentoo.org> ...genemit-Split-insn-emit.cc-into-ten-files.patch | 164 - 13.2.0/gentoo/README.history | 4 + 2 files changed, 100 insertions(+), 68 deletions(-) diff --git a/13.2.0/gentoo/90_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch b/13.2.0/gentoo/90_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch index 19352ac..6a2f3ed 100644 --- a/13.2.0/gentoo/90_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch +++ b/13.2.0/gentoo/90_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch @@ -1,44 +1,42 @@ https://gcc.gnu.org/PR54179 -https://gcc.gnu.org/PR84402 -https://gcc.gnu.org/PR111600 -https://inbox.sourceware.org/gcc-patches/87il76kgk2@gentoo.org/T/ +https://inbox.sourceware.org/gcc-patches/de0f7bdc-d236-4f5b-9504-d5bfb215d...@gmail.com/ -From 6b25a6ca295528805d8dedd59e1ed2f1e218a819 Mon Sep 17 00:00:00 2001 +From a71bcc136fee1c5a5ec6639f802daf1b22a1aab6 Mon Sep 17 00:00:00 2001 From: Robin Dapp -Date: Mon, 16 Oct 2023 12:17:07 +0200 -Subject: [PATCH 6/6] genemit: Split insn-emit.cc into ten files. +Date: Fri, 27 Oct 2023 21:04:25 +0200 +Subject: [PATCH] genemit: Split insn-emit.cc into ten files. -Hi, +After working with Sam off-list (thanks) I managed to get hppa to +build. Initially it looked as if hppa just had a very small number of +instruction patterns so we wouldn't generate all 10 output files. +However, the actual issue (which we will only hit with a low +pattern count) was with counting all the patterns vs only counting +the patterns that will be output. A wrong pattern count lead to +prematurely stopping to write output files. -the attached v2 includes Tamar's suggestion of keeping the current -stdout behavior. When no output files are passed (via -O) the output -is written to stdout as before. +With that corrected, hppa "just works" until I hit linker errors +due to relocations - most likely unrelated: -Tamar also mentioned off-list that, similar to match.pd, it might make -sense to balance the partitions in a better way than a fixed number -of patterns threshold. That's a good idea but I'd rather do that -separately as the current approach already helps considerably. +bin/ld: unwind-dw2-fde-dip_s.o(.data.rel.ro+0): cannot handle +R_PARISC_FPTR64 for __pthread_key_create@@GLIBC_2.34 -Attached v2 was bootstrapped and regtested on power10, aarch64 and -x86 are still running. -Stefan also tested v1 on s390 where the partitioning does not help -but also doesn't slow anything down. insn-emit.cc isn't very large -to begin with on s390. +Attached is v3 that has been bootstrapped and tested on x86 and power10, +aarch64 bootstrap was ok, testsuite is still running. A riscv build and +testsuite run was successful as well. Regards Robin ->From 34d05113a4e3c7e83a4731020307e26c1144af69 Mon Sep 17 00:00:00 2001 +>From 248744c328440bff9cc339d2bf622852cbaac343 Mon Sep 17 00:00:00 2001 From: Robin Dapp Date: Thu, 12 Oct 2023 11:23:26 +0200 -Subject: [PATCH v2] genemit: Split insn-emit.cc into several partitions. +Subject: [PATCH v3] genemit: Split insn-emit.cc into several partitions. On riscv insn-emit.cc has grown to over 1.2 mio lines of code and compiling it takes considerable time. Therefore, this patch adjust genemit to create several partitions -(insn-emit-1.cc to insn-emit-n.cc). In order to do so it first counts -the number of available patterns, calculates the number of patterns per -file and starts a new file whenever that number is reached. +(insn-emit-1.cc to insn-emit-n.cc). The available patterns are +written to the given files in a sequential fashion. Similar to match.pd a configure option --with-emitinsn-partitions=num is introduced that makes the number of partition configurable. @@ -74,21 +72,19 @@ gcc/ChangeLog: * gensupport.h (count_patterns): Define. * read-md.cc (md_reader::print_md_ptr_loc): Add file argument. * read-md.h (class md_reader): Change definition. - -(cherry picked from commit 646ee18fef30ade65e5ff2e7445e4915a0f9a3ad) --- - gcc/Makefile.in | 38 +++- - gcc/configure | 22 +- + gcc/Makefile.in | 36 ++- + gcc/configure | 24 +- gcc/configure.ac | 13 ++ - gcc/genemit.cc| 536 +- - gcc/gensupport.cc | 36 + gcc/genemit.cc| 542 +- + gcc/gensupport.cc | 55 + gcc/gensupport.h | 1 + gcc/read-md.cc| 4 +- gcc/read-md.h | 2 +- - 8 files changed, 398 insertions(+), 254 deletions(-) + 8 files changed,
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: a8500ccbb951d8e6b395cab78c3a67be3f7c0018 Author: Sam James gentoo org> AuthorDate: Fri Oct 27 23:41:21 2023 + Commit: Sam James gentoo org> CommitDate: Fri Oct 27 23:41:21 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=a8500ccb 14.0.0: update 75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch Signed-off-by: Sam James gentoo.org> ...genemit-Split-insn-emit.cc-into-ten-files.patch | 154 - 14.0.0/gentoo/README.history | 4 + 2 files changed, 122 insertions(+), 36 deletions(-) diff --git a/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch b/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch index 988c0f4..bd31760 100644 --- a/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch +++ b/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch @@ -1,10 +1,36 @@ https://gcc.gnu.org/PR54179 https://inbox.sourceware.org/gcc-patches/de0f7bdc-d236-4f5b-9504-d5bfb215d...@gmail.com/ -From 544943ea6b4d0e9a57408ca92464e22b84ffcb12 Mon Sep 17 00:00:00 2001 +From a3804c98c5f73c02b3732b06a15dc4a397e60dad Mon Sep 17 00:00:00 2001 From: Robin Dapp -Date: Fri, 20 Oct 2023 13:27:41 +0200 -Subject: [PATCH] genemit: Split insn-emit.cc into several partitions. +Date: Fri, 27 Oct 2023 21:04:25 +0200 +Subject: [PATCH] genemit: Split insn-emit.cc into ten files. + +After working with Sam off-list (thanks) I managed to get hppa to +build. Initially it looked as if hppa just had a very small number of +instruction patterns so we wouldn't generate all 10 output files. +However, the actual issue (which we will only hit with a low +pattern count) was with counting all the patterns vs only counting +the patterns that will be output. A wrong pattern count lead to +prematurely stopping to write output files. + +With that corrected, hppa "just works" until I hit linker errors +due to relocations - most likely unrelated: + +bin/ld: unwind-dw2-fde-dip_s.o(.data.rel.ro+0): cannot handle +R_PARISC_FPTR64 for __pthread_key_create@@GLIBC_2.34 + +Attached is v3 that has been bootstrapped and tested on x86 and power10, +aarch64 bootstrap was ok, testsuite is still running. A riscv build and +testsuite run was successful as well. + +Regards + Robin + +>From 248744c328440bff9cc339d2bf622852cbaac343 Mon Sep 17 00:00:00 2001 +From: Robin Dapp +Date: Thu, 12 Oct 2023 11:23:26 +0200 +Subject: [PATCH v3] genemit: Split insn-emit.cc into several partitions. On riscv insn-emit.cc has grown to over 1.2 mio lines of code and compiling it takes considerable time. @@ -46,6 +72,19 @@ gcc/ChangeLog: * gensupport.h (count_patterns): Define. * read-md.cc (md_reader::print_md_ptr_loc): Add file argument. * read-md.h (class md_reader): Change definition. +--- + gcc/Makefile.in | 36 ++- + gcc/configure | 24 +- + gcc/configure.ac | 13 ++ + gcc/genemit.cc| 542 +- + gcc/gensupport.cc | 55 + + gcc/gensupport.h | 1 + + gcc/read-md.cc| 4 +- + gcc/read-md.h | 2 +- + 8 files changed, 422 insertions(+), 255 deletions(-) + +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index 91d6bfbea4d0..d8bfad8de154 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -236,6 +236,13 @@ GIMPLE_MATCH_PD_SEQ_O = $(patsubst %, gimple-match-%.o, $(MATCH_SPLITS_SEQ)) @@ -71,7 +110,7 @@ gcc/ChangeLog: insn-extract.o \ insn-latencytab.o \ insn-modes.o \ -@@ -1856,7 +1863,8 @@ TREECHECKING = @TREECHECKING@ +@@ -1857,7 +1864,8 @@ TREECHECKING = @TREECHECKING@ FULL_DRIVER_NAME=$(target_noncanonical)-gcc-$(version)$(exeext) MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \ @@ -81,7 +120,7 @@ gcc/ChangeLog: insn-attr.h insn-attr-common.h insn-attrtab.cc insn-dfatab.cc \ insn-latencytab.cc insn-opinit.cc insn-opinit.h insn-preds.cc insn-constants.h \ tm-preds.h tm-constrs.h checksum-options $(GIMPLE_MATCH_PD_SEQ_SRC) \ -@@ -2488,11 +2496,11 @@ $(common_out_object_file): $(common_out_file) +@@ -2489,11 +2497,11 @@ $(common_out_object_file): $(common_out_file) # and compile them. .PRECIOUS: insn-config.h insn-flags.h insn-codes.h insn-constants.h \ @@ -98,7 +137,7 @@ gcc/ChangeLog: # Dependencies for the md file. The first time through, we just assume # the md file itself and the generated dependency file (in order to get -@@ -2515,7 +2523,7 @@ s-mddeps: $(md_file) $(MD_INCLUDES) build/genmddeps$(build_exeext) +@@ -2516,7 +2524,7 @@ s-mddeps: $(md_file) $(MD_INCLUDES) build/genmddeps$(build_exeext) simple_rtl_generated_h= insn-attr.h insn-attr-common.h insn-codes.h \ insn-config.h insn-flags.h insn-target-def.h @@ -107,7 +146,7 @@ gcc/ChangeLog: insn-extract.cc insn-output.cc \ insn-peep.cc insn-recog.cc -@@
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: aabcc9fe95c292c890038c9ba56c27cada2070bc Author: Sam James gentoo org> AuthorDate: Sun Oct 22 22:51:45 2023 + Commit: Sam James gentoo org> CommitDate: Sun Oct 22 22:51:51 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=aabcc9fe 14.0.0: rebase 75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch Signed-off-by: Sam James gentoo.org> ...genemit-Split-insn-emit.cc-into-ten-files.patch | 68 +++--- 14.0.0/gentoo/README.history | 4 ++ 2 files changed, 24 insertions(+), 48 deletions(-) diff --git a/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch b/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch index 723d78a..988c0f4 100644 --- a/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch +++ b/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch @@ -1,3 +1,6 @@ +https://gcc.gnu.org/PR54179 +https://inbox.sourceware.org/gcc-patches/de0f7bdc-d236-4f5b-9504-d5bfb215d...@gmail.com/ + From 544943ea6b4d0e9a57408ca92464e22b84ffcb12 Mon Sep 17 00:00:00 2001 From: Robin Dapp Date: Fri, 20 Oct 2023 13:27:41 +0200 @@ -43,19 +46,6 @@ gcc/ChangeLog: * gensupport.h (count_patterns): Define. * read-md.cc (md_reader::print_md_ptr_loc): Add file argument. * read-md.h (class md_reader): Change definition. - gcc/Makefile.in | 36 +++- - gcc/configure | 24 ++- - gcc/configure.ac | 13 ++ - gcc/genemit.cc| 536 +- - gcc/gensupport.cc | 36 - gcc/gensupport.h | 1 + - gcc/read-md.cc| 4 +- - gcc/read-md.h | 2 +- - 8 files changed, 397 insertions(+), 255 deletions(-) - -diff --git a/gcc/Makefile.in b/gcc/Makefile.in -index a25a1e32fbc..dc63c67409b 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -236,6 +236,13 @@ GIMPLE_MATCH_PD_SEQ_O = $(patsubst %, gimple-match-%.o, $(MATCH_SPLITS_SEQ)) @@ -72,7 +62,7 @@ index a25a1e32fbc..dc63c67409b 100644 # These files are to have specific diagnostics suppressed, or are not to # be subject to -Werror: # flex output may yield harmless "no previous prototype" warnings -@@ -1354,7 +1361,7 @@ OBJS = \ +@@ -1356,7 +1363,7 @@ OBJS = \ insn-attrtab.o \ insn-automata.o \ insn-dfatab.o \ @@ -81,7 +71,7 @@ index a25a1e32fbc..dc63c67409b 100644 insn-extract.o \ insn-latencytab.o \ insn-modes.o \ -@@ -1854,7 +1861,8 @@ TREECHECKING = @TREECHECKING@ +@@ -1856,7 +1863,8 @@ TREECHECKING = @TREECHECKING@ FULL_DRIVER_NAME=$(target_noncanonical)-gcc-$(version)$(exeext) MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \ @@ -91,7 +81,7 @@ index a25a1e32fbc..dc63c67409b 100644 insn-attr.h insn-attr-common.h insn-attrtab.cc insn-dfatab.cc \ insn-latencytab.cc insn-opinit.cc insn-opinit.h insn-preds.cc insn-constants.h \ tm-preds.h tm-constrs.h checksum-options $(GIMPLE_MATCH_PD_SEQ_SRC) \ -@@ -2483,11 +2491,11 @@ $(common_out_object_file): $(common_out_file) +@@ -2488,11 +2496,11 @@ $(common_out_object_file): $(common_out_file) # and compile them. .PRECIOUS: insn-config.h insn-flags.h insn-codes.h insn-constants.h \ @@ -108,7 +98,7 @@ index a25a1e32fbc..dc63c67409b 100644 # Dependencies for the md file. The first time through, we just assume # the md file itself and the generated dependency file (in order to get -@@ -2510,7 +2518,7 @@ s-mddeps: $(md_file) $(MD_INCLUDES) build/genmddeps$(build_exeext) +@@ -2515,7 +2523,7 @@ s-mddeps: $(md_file) $(MD_INCLUDES) build/genmddeps$(build_exeext) simple_rtl_generated_h= insn-attr.h insn-attr-common.h insn-codes.h \ insn-config.h insn-flags.h insn-target-def.h @@ -117,7 +107,7 @@ index a25a1e32fbc..dc63c67409b 100644 insn-extract.cc insn-output.cc \ insn-peep.cc insn-recog.cc -@@ -2539,8 +2547,20 @@ $(simple_generated_c:insn-%.cc=s-%): s-%: build/gen%$(build_exeext) +@@ -2544,8 +2552,20 @@ $(simple_generated_c:insn-%.cc=s-%): s-%: build/gen%$(build_exeext) $(SHELL) $(srcdir)/../move-if-change tmp-$*.cc insn-$*.cc $(STAMP) s-$* @@ -139,10 +129,10 @@ index a25a1e32fbc..dc63c67409b 100644 s-check : build/gencheck$(build_exeext) $(RUN_GEN) build/gencheck$(build_exeext) > tmp-check.h diff --git a/gcc/configure b/gcc/configure -index 9f5b7081992..cf35b8fac89 100755 +index c47a8c5..0e4e0e4 100755 --- a/gcc/configure +++ b/gcc/configure -@@ -842,6 +842,7 @@ enable_gcov +@@ -844,6 +844,7 @@ enable_gcov enable_shared enable_fixed_point enable_decimal_float @@ -150,7 +140,7 @@ index 9f5b7081992..cf35b8fac89 100755 DEFAULT_MATCHPD_PARTITIONS with_float with_cpu -@@ -971,6 +972,7 @@ enable_multilib +@@ -973,6 +974,7 @@ enable_multilib enable_multiarch with_stack_clash_protection_guard_size with_matchpd_partitions @@
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: 990901f6580beef856459bb679b3f6f69d410b85 Author: Sam James gentoo org> AuthorDate: Sat Oct 21 17:42:04 2023 + Commit: Sam James gentoo org> CommitDate: Sat Oct 21 17:42:20 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=990901f6 14.0.0: update 75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch Pull in a version from private email w/ Robin for more testing. Signed-off-by: Sam James gentoo.org> ...genemit-Split-insn-emit.cc-into-ten-files.patch | 142 +++-- 14.0.0/gentoo/README.history | 4 + 2 files changed, 24 insertions(+), 122 deletions(-) diff --git a/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch b/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch index dbcea97..723d78a 100644 --- a/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch +++ b/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch @@ -1,111 +1,13 @@ -https://gcc.gnu.org/PR54179 -https://inbox.sourceware.org/gcc-patches/de0f7bdc-d236-4f5b-9504-d5bfb215d...@gmail.com/ - -From mboxrd@z Thu Jan 1 00:00:00 1970 -Return-Path: -Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) - by sourceware.org (Postfix) with ESMTPS id 494063858D33 - for ; Mon, 16 Oct 2023 10:17:21 + (GMT) -DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 494063858D33 -Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com -Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com -ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 494063858D33 -Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::435 -ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697451446; cv=none; - b=p7qdXp6tA02vcm8FYp8Z94RsTNBTMF12iWlVcXVLWFaSW8HGwwCYhMGYoGFaifZQRu4UKyuAB+IzEF6a/yAg4YIoSatzLygSXd8C4Y5pTzNOedtsXKySOf2H5tU0JllZhFiL0j839yK0ULkru902Fm5qYfCWOI/oclFGFv0QJhk= -ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; - t=1697451446; c=relaxed/simple; - bh=F5nvjfODgAkwvN6oz045m/y2cCq1Y5w/bjL6/Zx7/us=; - h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=Irn6EDwgJ++gSjzeSooV3KQnHee12GYc2RQmTDoYZo/FSdddOhiPTfdaC7P29HmOXa4CPBOS8Yv9BTZMwm6YLK9J2wCQws5N76sMTuINsJ4seyvCF4hUO/2icjNn/K1NCpiAh/hGfqdO7ASiqbVBoFfgM7fwtCOYLKF6sIY1lyM= -ARC-Authentication-Results: i=1; server2.sourceware.org -Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-32d834ec222so4107319f8f.0 -for ; Mon, 16 Oct 2023 03:17:21 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; -d=gmail.com; s=20230601; t=1697451440; x=1698056240; darn=gcc.gnu.org; -h=content-transfer-encoding:in-reply-to:from:references:to - :content-language:subject:cc:user-agent:mime-version:date:message-id - :from:to:cc:subject:date:message-id:reply-to; -bh=wq5w+s2m/P53eb5oT6XaK+NiaOj7NqTTS7VH5l0hPUk=; -b=ir8fQ9LhX/rsjkKQE99tm5M/K+iNNIYZ/1cdZ5bz4WDndMrk52oidsfzruyMfSbRhB - rHSI1uSAzTr3Hp0f3ugYQInO3KFgdrvSiZ1sUhIcSA9SG7fCECczgD7GcW6OZn6F8c9u - XbFgqbWLIFtqXeKsmQs+CY2nS4KS/CRT9eoUafES8rZNYXDOe9QVbHjblx7rtXWO2HXQ - lmfzqTktf3I7JxtYpl0r0MYMcjSfcq0DOuL80NWyMDlBWOQT3IBAdyulrLAEW+jH/Z8p - xQ15SULgu0m2yiv/KGWXTkZfr7tvRGnSmmdtRRH0FCoXSf8jg/zHFTkl/j+SzlSzDwGs - c1qg== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; -d=1e100.net; s=20230601; t=1697451440; x=1698056240; -h=content-transfer-encoding:in-reply-to:from:references:to - :content-language:subject:cc:user-agent:mime-version:date:message-id - :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; -bh=wq5w+s2m/P53eb5oT6XaK+NiaOj7NqTTS7VH5l0hPUk=; -b=kKfXLuOWBPVcAyFOUh31XizZ+aCfxMvezPMmblFS/UpzD2W/C0uFKwEGnChfefXi2/ - +bzYReU5vtLu8pAloncEatu5L4GV1u+WdTSbW1T5xIy+5oMx++9PpyY4AE247J0yd86k - 1y7iJTKapjRfltZuFYEXFXtk+EUb6KM8JtlwJvoxl1WA5eUMF3QS7mrB/a4aM4x6i+Eg - YlOoTXYO0bLGOCdeXOLJfjDEkck1ELrHj2LtlRHyrlB9cfOgf17T6ndeeHGFfXNQHPZ9 - 6ozlhvhckpJQgI9lmwx9y62sUeq7EvLbrq6iRQm/urmU7ONjSXtvH9MhuU6vUBxvHZ7m - L7/Q== -X-Gm-Message-State: AOJu0Yx8eFwSIp03QtdxQpmlUlQqKK5PYRJxvpOd/sAQ1a6DUl745e7C - /BMIbVYdWvfmdTlOA4Fq7wwu2tV7IwY= -X-Google-Smtp-Source: AGHT+IHxbooDFrEU9aYJYA4rfQo2Hg5vBRYXtzpX5blf0iOYdzDMzsRxuyqHl6Jlfcy9/43ovuJMnQ== -X-Received: by 2002:a5d:4402:0:b0:32d:8907:2b18 with SMTP id z2-20020a5d440200b0032d89072b18mr12076090wrq.66.1697451439584; -Mon, 16 Oct 2023 03:17:19 -0700 (PDT) -Received: from [192.168.1.23] (ip-046-223-203-173.um13.pools.vodafone-ip.de. [46.223.203.173]) -by smtp.gmail.com with ESMTPSA id e10-20020a5d65ca00b0032da6f17ffdsm4983379wrw.38.2023.10.16.03.17.18 -(version=TLS1_3
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: cfe1a42149964e54a250698e9d8dc50f4745caf9 Author: Sam James gentoo org> AuthorDate: Mon Oct 16 12:33:30 2023 + Commit: Sam James gentoo org> CommitDate: Mon Oct 16 12:40:58 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=cfe1a421 14.0.0: backport insn-emit split patches For parity with 13.x. This is a continuation of 7a6b2d23ec02e75475a6123254ccd44d73827f39 ('13.2.0: backport split match.pd changes') in a sense - see that commit for rationale for backporting. Motivated here again by more reports of OOMs with insn-match.cc. Bug: https://gcc.gnu.org/PR54179 Bug: https://gcc.gnu.org/PR84402 Bug: https://gcc.gnu.org/PR111600 Signed-off-by: Sam James gentoo.org> ...genemit-Split-insn-emit.cc-into-ten-files.patch | 1453 14.0.0/gentoo/README.history |6 + 2 files changed, 1459 insertions(+) diff --git a/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch b/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch new file mode 100644 index 000..dbcea97 --- /dev/null +++ b/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch @@ -0,0 +1,1453 @@ +https://gcc.gnu.org/PR54179 +https://inbox.sourceware.org/gcc-patches/de0f7bdc-d236-4f5b-9504-d5bfb215d...@gmail.com/ + +From mboxrd@z Thu Jan 1 00:00:00 1970 +Return-Path: +Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) + by sourceware.org (Postfix) with ESMTPS id 494063858D33 + for ; Mon, 16 Oct 2023 10:17:21 + (GMT) +DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 494063858D33 +Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com +Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com +ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 494063858D33 +Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::435 +ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697451446; cv=none; + b=p7qdXp6tA02vcm8FYp8Z94RsTNBTMF12iWlVcXVLWFaSW8HGwwCYhMGYoGFaifZQRu4UKyuAB+IzEF6a/yAg4YIoSatzLygSXd8C4Y5pTzNOedtsXKySOf2H5tU0JllZhFiL0j839yK0ULkru902Fm5qYfCWOI/oclFGFv0QJhk= +ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; + t=1697451446; c=relaxed/simple; + bh=F5nvjfODgAkwvN6oz045m/y2cCq1Y5w/bjL6/Zx7/us=; + h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=Irn6EDwgJ++gSjzeSooV3KQnHee12GYc2RQmTDoYZo/FSdddOhiPTfdaC7P29HmOXa4CPBOS8Yv9BTZMwm6YLK9J2wCQws5N76sMTuINsJ4seyvCF4hUO/2icjNn/K1NCpiAh/hGfqdO7ASiqbVBoFfgM7fwtCOYLKF6sIY1lyM= +ARC-Authentication-Results: i=1; server2.sourceware.org +Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-32d834ec222so4107319f8f.0 +for ; Mon, 16 Oct 2023 03:17:21 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; +d=gmail.com; s=20230601; t=1697451440; x=1698056240; darn=gcc.gnu.org; +h=content-transfer-encoding:in-reply-to:from:references:to + :content-language:subject:cc:user-agent:mime-version:date:message-id + :from:to:cc:subject:date:message-id:reply-to; +bh=wq5w+s2m/P53eb5oT6XaK+NiaOj7NqTTS7VH5l0hPUk=; +b=ir8fQ9LhX/rsjkKQE99tm5M/K+iNNIYZ/1cdZ5bz4WDndMrk52oidsfzruyMfSbRhB + rHSI1uSAzTr3Hp0f3ugYQInO3KFgdrvSiZ1sUhIcSA9SG7fCECczgD7GcW6OZn6F8c9u + XbFgqbWLIFtqXeKsmQs+CY2nS4KS/CRT9eoUafES8rZNYXDOe9QVbHjblx7rtXWO2HXQ + lmfzqTktf3I7JxtYpl0r0MYMcjSfcq0DOuL80NWyMDlBWOQT3IBAdyulrLAEW+jH/Z8p + xQ15SULgu0m2yiv/KGWXTkZfr7tvRGnSmmdtRRH0FCoXSf8jg/zHFTkl/j+SzlSzDwGs + c1qg== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; +d=1e100.net; s=20230601; t=1697451440; x=1698056240; +h=content-transfer-encoding:in-reply-to:from:references:to + :content-language:subject:cc:user-agent:mime-version:date:message-id + :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; +bh=wq5w+s2m/P53eb5oT6XaK+NiaOj7NqTTS7VH5l0hPUk=; +b=kKfXLuOWBPVcAyFOUh31XizZ+aCfxMvezPMmblFS/UpzD2W/C0uFKwEGnChfefXi2/ + +bzYReU5vtLu8pAloncEatu5L4GV1u+WdTSbW1T5xIy+5oMx++9PpyY4AE247J0yd86k + 1y7iJTKapjRfltZuFYEXFXtk+EUb6KM8JtlwJvoxl1WA5eUMF3QS7mrB/a4aM4x6i+Eg + YlOoTXYO0bLGOCdeXOLJfjDEkck1ELrHj2LtlRHyrlB9cfOgf17T6ndeeHGFfXNQHPZ9 + 6ozlhvhckpJQgI9lmwx9y62sUeq7EvLbrq6iRQm/urmU7ONjSXtvH9MhuU6vUBxvHZ7m + L7/Q== +X-Gm-Message-State: AOJu0Yx8eFwSIp03QtdxQpmlUlQqKK5PYRJxvpOd/sAQ1a6DUl745e7C + /BMIbVYdWvfmdTlOA4Fq7wwu2tV7IwY= +X-Google-Smtp-Source: AGHT+IHxbooDFrEU9aYJYA4rfQo2Hg5vBRYXtzpX5blf0iOYdzDMzsRxuyqHl6Jlfcy9/43ovuJMnQ== +X-Received: by 2002:a5d:4402:0:b0:32d:8907:2b18 with SMTP id z2-20020a5d440200b0032d89072b18mr12076090wrq.66.1697451439584; +Mon, 16 Oct 2023 03:17:19 -0700 (PDT) +Received: from [192.168.1.23]
[gentoo-commits] proj/gcc-patches:master commit in: 13.2.0/gentoo/
commit: 6e02b91080e891bbc57ced4d3140fcf6ba3d7088 Author: Sam James gentoo org> AuthorDate: Mon Oct 16 12:10:48 2023 + Commit: Sam James gentoo org> CommitDate: Mon Oct 16 12:40:58 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=6e02b910 13.2.0: backport insn-emit split patches This is a continuation of 7a6b2d23ec02e75475a6123254ccd44d73827f39 ('13.2.0: backport split match.pd changes') in a sense - see that commit for rationale for backporting. Motivated here again by more reports of OOMs with insn-match.cc. Bug: https://gcc.gnu.org/PR54179 Bug: https://gcc.gnu.org/PR84402 Bug: https://gcc.gnu.org/PR111600 Signed-off-by: Sam James gentoo.org> ...ce-seq-for-portability-with-GNU-Make-vari.patch | 72 + ...l_Remove-DEFAULT_MATCHPD_PARTITIONS-macro.patch | 72 + in-Make-TM_P_H-depend-on-TREE_H-PR111021.patch | 66 + ...in-Make-recog.h-depend-on-TREE_H-PR111021.patch | 44 + ...genemit-Split-insn-emit.cc-into-ten-files.patch | 1376 13.2.0/gentoo/README.history |8 + 6 files changed, 1638 insertions(+) diff --git a/13.2.0/gentoo/86_all_build-Replace-seq-for-portability-with-GNU-Make-vari.patch b/13.2.0/gentoo/86_all_build-Replace-seq-for-portability-with-GNU-Make-vari.patch new file mode 100644 index 000..9b88852 --- /dev/null +++ b/13.2.0/gentoo/86_all_build-Replace-seq-for-portability-with-GNU-Make-vari.patch @@ -0,0 +1,72 @@ +https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=319aef8d2fde32be5cfed99f321c7f90e33d1f1d + +From 3fd5922104168eb1a88ee6209d84ccc9e72a4bfa Mon Sep 17 00:00:00 2001 +From: Jakub Jelinek +Date: Sat, 6 May 2023 02:32:17 +0200 +Subject: [PATCH 1/6] build: Replace seq for portability with GNU Make variant + +Some hosts like AIX don't have seq command, this patch replaces it +with something that uses just GNU make features we've been using +for this already before for the parallel make check. + +2023-05-06 Jakub Jelinek + + * Makefile.in (check_p_numbers): Rename to one_to_, move + earlier with helper variables also renamed. + (MATCH_SPLUT_SEQ): Use $(wordlist 1,$(NUM_MATCH_SPLITS),$(one_to_)) + instead of $(shell seq 1 $(NUM_MATCH_SPLITS)). + (check_p_subdirs): Use $(one_to_) instead of $(check_p_numbers). + +(cherry picked from commit 319aef8d2fde32be5cfed99f321c7f90e33d1f1d) +--- + gcc/Makefile.in | 22 -- + 1 file changed, 12 insertions(+), 10 deletions(-) + +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index fe3af5c8008..975fbb61ea8 100644 +--- a/gcc/Makefile.in b/gcc/Makefile.in +@@ -214,9 +214,19 @@ rtl-ssa-warn = $(STRICT_WARN) + GCC_WARN_CFLAGS = $(LOOSE_WARN) $(C_LOOSE_WARN) $($(@D)-warn) $(if $(filter-out $(STRICT_WARN),$($(@D)-warn)),,$(C_STRICT_WARN)) $(NOCOMMON_FLAG) $($@-warn) + GCC_WARN_CXXFLAGS = $(LOOSE_WARN) $($(@D)-warn) $(NOCOMMON_FLAG) $($@-warn) + ++# 1 2 3 ... ++one_to__0:=1 2 3 4 5 6 7 8 9 ++one_to__1:=0 $(one_to__0) ++one_to__2:=$(foreach i,$(one_to__0),$(addprefix $(i),$(one_to__1))) ++one_to__3:=$(addprefix 0,$(one_to__1)) $(one_to__2) ++one_to__4:=$(foreach i,$(one_to__0),$(addprefix $(i),$(one_to__3))) ++one_to__5:=$(addprefix 0,$(one_to__3)) $(one_to__4) ++one_to__6:=$(foreach i,$(one_to__0),$(addprefix $(i),$(one_to__5))) ++one_to_:=$(one_to__0) $(one_to__2) $(one_to__4) $(one_to__6) ++ + # The number of splits to be made for the match.pd files. + NUM_MATCH_SPLITS = @DEFAULT_MATCHPD_PARTITIONS@ +-MATCH_SPLITS_SEQ = $(shell seq 1 $(NUM_MATCH_SPLITS)) ++MATCH_SPLITS_SEQ = $(wordlist 1,$(NUM_MATCH_SPLITS),$(one_to_)) + GIMPLE_MATCH_PD_SEQ_SRC = $(patsubst %, gimple-match-%.cc, $(MATCH_SPLITS_SEQ)) + GIMPLE_MATCH_PD_SEQ_O = $(patsubst %, gimple-match-%.o, $(MATCH_SPLITS_SEQ)) + GENERIC_MATCH_PD_SEQ_SRC = $(patsubst %, generic-match-%.cc, $(MATCH_SPLITS_SEQ)) +@@ -4220,18 +4230,10 @@ $(patsubst %,%-subtargets,$(lang_checks)): check-%-subtargets: + check_p_tool=$(firstword $(subst _, ,$*)) + check_p_count=$(check_$(check_p_tool)_parallelize) + check_p_subno=$(word 2,$(subst _, ,$*)) +-check_p_numbers0:=1 2 3 4 5 6 7 8 9 +-check_p_numbers1:=0 $(check_p_numbers0) +-check_p_numbers2:=$(foreach i,$(check_p_numbers0),$(addprefix $(i),$(check_p_numbers1))) +-check_p_numbers3:=$(addprefix 0,$(check_p_numbers1)) $(check_p_numbers2) +-check_p_numbers4:=$(foreach i,$(check_p_numbers0),$(addprefix $(i),$(check_p_numbers3))) +-check_p_numbers5:=$(addprefix 0,$(check_p_numbers3)) $(check_p_numbers4) +-check_p_numbers6:=$(foreach i,$(check_p_numbers0),$(addprefix $(i),$(check_p_numbers5))) +-check_p_numbers:=$(check_p_numbers0) $(check_p_numbers2) $(check_p_numbers4) $(check_p_numbers6) + check_p_subdir=$(subst _,,$*) + check_p_subdirs=$(wordlist 1,$(check_p_count),$(wordlist 1, \ + $(if $(GCC_TEST_PARALLEL_SLOTS),$(GCC_TEST_PARALLEL_SLOTS),128), \ +-
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: 72cde8ad25618f62dbfbe941dade77351dd358d8 Author: Sam James gentoo org> AuthorDate: Mon Oct 2 13:13:32 2023 + Commit: Sam James gentoo org> CommitDate: Mon Oct 2 13:13:53 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=72cde8ad 14.0.0: rebase 26_all_enable-cet.patch Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/26_all_enable-cet.patch | 20 ++-- 14.0.0/gentoo/README.history | 3 +++ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/14.0.0/gentoo/26_all_enable-cet.patch b/14.0.0/gentoo/26_all_enable-cet.patch index b13abab..b9bbbf0 100644 --- a/14.0.0/gentoo/26_all_enable-cet.patch +++ b/14.0.0/gentoo/26_all_enable-cet.patch @@ -18,7 +18,7 @@ Only supported on amd64. - " %(cc1_options) %2" + " %(cc1_options) %(default_flag_cf_spec) %2" " %{!fsyntax-only:" - "%{!S:-o %g.s%V}" + "%{!S:-o %g.s}" "%{!fmodule-*:%{!fmodules-*:%{!fdump-ada-spec*:" @@ -72,7 +72,7 @@ along with GCC; see the file COPYING3. If not see " %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}" @@ -27,7 +27,7 @@ Only supported on amd64. - " %(cc1_options) %2" + " %(cc1_options) %(default_flag_cf_spec) %2" " %{!fsyntax-only:" - "%{!S:-o %g.s%V}" + "%{!S:-o %g.s}" "%{!fmodule-*:%{!fmodules-*:%{!fdump-ada-spec*:" @@ -92,7 +92,7 @@ along with GCC; see the file COPYING3. If not see " %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}" @@ -36,7 +36,7 @@ Only supported on amd64. - " %(cc1_options) %2" + " %(cc1_options) %(default_flag_cf_spec) %2" " %{!fsyntax-only:" - "%{!S:-o %g.s%V}" + "%{!S:-o %g.s}" "%{!fmodule-*:%{!fmodules-*:%{!fdump-ada-spec*:" @@ -107,7 +107,7 @@ along with GCC; see the file COPYING3. If not see " cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed" @@ -58,7 +58,7 @@ Only supported on amd64. "%{!fmodule-only:%{!fmodule-header*:%(invoke_as)}}}" --- a/gcc/gcc.cc +++ b/gcc/gcc.cc -@@ -994,6 +994,18 @@ proper position among the other output files. */ +@@ -999,6 +999,18 @@ proper position among the other output files. */ #define LINK_NOW_SPEC "" #endif @@ -77,7 +77,7 @@ Only supported on amd64. #ifdef ENABLE_DEFAULT_PIE #define PIE_SPEC "!no-pie" #define NO_FPIE1_SPEC "fno-pie" -@@ -1196,6 +1208,7 @@ static const char *cpp_spec = CPP_SPEC; +@@ -1201,6 +1213,7 @@ static const char *cpp_spec = CPP_SPEC; static const char *cc1_spec = CC1_SPEC OS_CC1_SPEC; static const char *cc1plus_spec = CC1PLUS_SPEC; static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC; @@ -85,7 +85,7 @@ Only supported on amd64. static const char *link_ssp_spec = LINK_SSP_SPEC; static const char *asm_spec = ASM_SPEC; static const char *asm_final_spec = ASM_FINAL_SPEC; -@@ -1254,7 +1267,7 @@ static const char *cpp_options = +@@ -1261,7 +1274,7 @@ static const char *cpp_options = "%(cpp_unique_options) %1 %{m*} %{std*} %{W**} %{w}\ %{f*} %{g*:%{%:debug-level-gt(0):%{g*}\ %{!fno-working-directory:-fworking-directory}}} %{O*}\ @@ -94,7 +94,7 @@ Only supported on amd64. /* Pass -d* flags, possibly modifying -dumpdir, -dumpbase et al. -@@ -1448,9 +1461,9 @@ static const struct compiler default_compilers[] = +@@ -1455,9 +1468,9 @@ static const struct compiler default_compilers[] = %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \ %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\ cc1 -fpreprocessed %{save-temps*:%b.i} %{!save-temps*:%g.i} \ @@ -106,8 +106,8 @@ Only supported on amd64. %{!fsyntax-only:%(invoke_as)", 0, 0, 1}, {"-", "%{!E:%e-E or -x required when input is from standard input}\ -@@ -1475,7 +1488,7 @@ static const struct compiler default_compilers[] = - %W{o*:--output-pch %*}}%V}}}", 0, 0, 0}, +@@ -1482,7 +1495,7 @@ static const struct compiler default_compilers[] = + %W{o*:--output-pch %w%*}}%{!S:%V", 0, 0, 0}, {".i", "@cpp-output", 0, 0, 0}, {"@cpp-output", - "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)", 0, 0, 0}, @@ -115,7 +115,7 @@ Only supported on amd64. {".s", "@assembler", 0, 0, 0}, {"@assembler", "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A ", 0, 0, 0}, -@@ -1707,6 +1720,7 @@ static struct spec_list static_specs[] = +@@ -1714,6 +1727,7 @@ static struct spec_list static_specs[] = INIT_STATIC_SPEC ("cc1_options",_options), INIT_STATIC_SPEC ("cc1plus",_spec), INIT_STATIC_SPEC ("link_gcc_c_sequence",_gcc_c_sequence_spec), diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history index 3d72078..0e5fac9 100644
[gentoo-commits] proj/gcc-patches:master commit in: 13.2.0/gentoo/
commit: a2b85f16e79253103389731d9ac60b6868435b48 Author: Sam James gentoo org> AuthorDate: Sun Oct 1 02:02:13 2023 + Commit: Sam James gentoo org> CommitDate: Sun Oct 1 02:28:48 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=a2b85f16 13.2.0: rebase 31_all_gm2_make_P_var.patch Signed-off-by: Sam James gentoo.org> 13.2.0/gentoo/31_all_gm2_make_P_var.patch | 16 +++- 13.2.0/gentoo/README.history | 2 ++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/13.2.0/gentoo/31_all_gm2_make_P_var.patch b/13.2.0/gentoo/31_all_gm2_make_P_var.patch index ef34288..74b3925 100644 --- a/13.2.0/gentoo/31_all_gm2_make_P_var.patch +++ b/13.2.0/gentoo/31_all_gm2_make_P_var.patch @@ -12,33 +12,33 @@ r0-31149-gb8dad04b688e9c. gcc/m2/ChangeLog: - * Make-lang.in: Remove references to $(P). - * Make-maintainer.in: Ditto. + * Make-lang.in: Remove references to $(P). + * Make-maintainer.in: Ditto. (cherry picked from commit 79c73122fab213f218b85b2c579ffe3cf5e98ad0) --- a/gcc/m2/Make-lang.in +++ b/gcc/m2/Make-lang.in -@@ -515,7 +515,7 @@ GM2_LIBS_BOOT = m2/gm2-compiler-boot/gm2.a \ +@@ -532,7 +532,7 @@ m2_OBJS = $(GM2_C_OBJS) m2/gm2-gcc/rtegraph.o \ cc1gm2$(exeext): m2/stage1/cc1gm2$(exeext) $(m2.prev) cp -p $< $@ -m2/stage2/cc1gm2$(exeext): m2/stage1/cc1gm2$(exeext) m2/gm2-compiler/m2flex.o $(P) \ +m2/stage2/cc1gm2$(exeext): m2/stage1/cc1gm2$(exeext) m2/gm2-compiler/m2flex.o \ $(GM2_C_OBJS) $(BACKEND) $(LIBDEPS) $(GM2_LIBS) \ - m2/gm2-gcc/rtegraph.o plugin/m2rte$(soext) + m2/gm2-gcc/rtegraph.o $(M2RTE_PLUGIN_SO) -test -d $(@D) || $(mkinstalldirs) $(@D) -@@ -528,7 +528,7 @@ m2/stage2/cc1gm2$(exeext): m2/stage1/cc1gm2$(exeext) m2/gm2-compiler/m2flex.o $( +@@ -545,7 +545,7 @@ m2/stage2/cc1gm2$(exeext): m2/stage1/cc1gm2$(exeext) m2/gm2-compiler/m2flex.o $( @$(call LINK_PROGRESS,$(INDEX.m2),end) m2/stage1/cc1gm2$(exeext): gm2$(exeext) m2/gm2-compiler-boot/m2flex.o \ -$(P) $(GM2_C_OBJS) $(BACKEND) $(LIBDEPS) \ +$(GM2_C_OBJS) $(BACKEND) $(LIBDEPS) \ $(GM2_LIBS_BOOT) $(MC_LIBS) \ - m2/gm2-gcc/rtegraph.o plugin/m2rte$(soext) \ + m2/gm2-gcc/rtegraph.o $(M2RTE_PLUGIN_SO) \ $(m2.prev) --- a/gcc/m2/Make-maintainer.in +++ b/gcc/m2/Make-maintainer.in -@@ -848,7 +848,7 @@ GM2_LIBS_PARANOID = m2/gm2-compiler-paranoid/gm2.a \ +@@ -852,7 +852,7 @@ GM2_LIBS_PARANOID = m2/gm2-compiler-paranoid/gm2.a \ gm2.paranoid: m2/m2obj3/cc1gm2$(exeext) gm2.verifyparanoid m2/m2obj3/cc1gm2$(exeext): m2/m2obj2/cc1gm2$(exeext) m2/gm2-compiler-paranoid/m2flex.o \ @@ -47,5 +47,3 @@ gcc/m2/ChangeLog: m2/gm2-gcc/rtegraph.o plugin/m2rte$(exeext).so -test -d m2/m2obj3 || $(mkinstalldirs) m2/m2obj3 @$(call LINK_PROGRESS,$(INDEX.m2),start) --- -2.41.0 diff --git a/13.2.0/gentoo/README.history b/13.2.0/gentoo/README.history index 449fcee..1ab8e80 100644 --- a/13.2.0/gentoo/README.history +++ b/13.2.0/gentoo/README.history @@ -1,4 +1,6 @@ 8 1 Oct 2023 + + U 31_all_gm2_make_P_var.patch + 50_all_system_cxx_headers_libcxx.patch - 83_all_all_PR110315_crash_large_std_vector.patch
[gentoo-commits] proj/gcc-patches:master commit in: 13.2.0/gentoo/
commit: 9e320b0781c3505e9f6ff49b84f5b35d6016c653 Author: Sam James gentoo org> AuthorDate: Sun Oct 1 01:50:47 2023 + Commit: Sam James gentoo org> CommitDate: Sun Oct 1 02:28:48 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=9e320b07 13.2.0: add 50_all_PR111632_system_cxx_headers_libcxx.patch Bug: https://gcc.gnu.org/PR111632 Bug: https://bugs.gentoo.org/912035 Signed-off-by: Sam James gentoo.org> ...50_all_PR111632_system_cxx_headers_libcxx.patch | 134 + 13.2.0/gentoo/README.history | 1 + 2 files changed, 135 insertions(+) diff --git a/13.2.0/gentoo/50_all_PR111632_system_cxx_headers_libcxx.patch b/13.2.0/gentoo/50_all_PR111632_system_cxx_headers_libcxx.patch new file mode 100644 index 000..af6c286 --- /dev/null +++ b/13.2.0/gentoo/50_all_PR111632_system_cxx_headers_libcxx.patch @@ -0,0 +1,134 @@ +https://bugs.gentoo.org/912035 +https://inbox.sourceware.org/gcc-patches/0623e896-6b99-49ec-9144-b41bc5108...@andric.com +https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274038 +https://gcc.gnu.org/PR111632 + +commit 8992952bfa95e769a554bd97581cf332987383d8 +Author: Dimitry Andric +Date: 2023-09-28T17:40:29+02:00 + +Include safe-ctype.h after C++ standard headers, to avoid over-poisoning + +When building gcc's C++ sources against recent libc++, the poisoning of +the ctype macros due to including safe-ctype.h before including C++ +standard headers such as , , etc, causes many compilation +errors, similar to: + + In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23: + In file included from /home/dim/src/gcc/master/gcc/system.h:233: + In file included from /usr/include/c++/v1/vector:321: + In file included from + /usr/include/c++/v1/__format/formatter_bool.h:20: + In file included from + /usr/include/c++/v1/__format/formatter_integral.h:32: + In file included from /usr/include/c++/v1/locale:202: + /usr/include/c++/v1/__locale:546:5: error: '__abi_tag__' attribute + only applies to structs, variables, functions, and namespaces +546 | _LIBCPP_INLINE_VISIBILITY +| ^ + /usr/include/c++/v1/__config:813:37: note: expanded from macro + '_LIBCPP_INLINE_VISIBILITY' +813 | # define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI +| ^ + /usr/include/c++/v1/__config:792:26: note: expanded from macro + '_LIBCPP_HIDE_FROM_ABI' +792 | +__attribute__((__abi_tag__(_LIBCPP_TOSTRING( + _LIBCPP_VERSIONED_IDENTIFIER +| ^ + In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23: + In file included from /home/dim/src/gcc/master/gcc/system.h:233: + In file included from /usr/include/c++/v1/vector:321: + In file included from + /usr/include/c++/v1/__format/formatter_bool.h:20: + In file included from + /usr/include/c++/v1/__format/formatter_integral.h:32: + In file included from /usr/include/c++/v1/locale:202: + /usr/include/c++/v1/__locale:547:37: error: expected ';' at end of + declaration list +547 | char_type toupper(char_type __c) const +| ^ + /usr/include/c++/v1/__locale:553:48: error: too many arguments + provided to function-like macro invocation +553 | const char_type* toupper(char_type* __low, const +char_type* __high) const +|^ + /home/dim/src/gcc/master/gcc/../include/safe-ctype.h:146:9: note: + macro 'toupper' defined here +146 | #define toupper(c) do_not_use_toupper_with_safe_ctype +| ^ + +This is because libc++ uses different transitive includes than +libstdc++, and some of those transitive includes pull in various ctype +declarations (typically via ). + +There was already a special case for including before +safe-ctype.h, so move the rest of the C++ standard header includes to +the same location, to fix the problem. + +Signed-off-by: Dimitry Andric + +diff --git a/gcc/system.h b/gcc/system.h +index e924152ad4c..7a516b11438 100644 +--- a/gcc/system.h b/gcc/system.h +@@ -194,27 +194,8 @@ extern int fprintf_unlocked (FILE *, const char *, ...); + #undef fread_unlocked + #undef fwrite_unlocked + +-/* Include before "safe-ctype.h" to avoid GCC poisoning +- the ctype macros through safe-ctype.h */ +- +-#ifdef __cplusplus +-#ifdef INCLUDE_STRING +-# include +-#endif +-#endif +- +-/* There are an extraordinary number of issues with . +- The last straw is that it varies with the locale. Use libiberty's +- replacement instead. */ +-#include "safe-ctype.h" +- +-#include +- +-#include +- +-#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
[gentoo-commits] proj/gcc-patches:master commit in: 13.2.0/gentoo/
commit: d10e29b8069920831f8c63a63e58f0dfe46ee3fe Author: Sam James gentoo org> AuthorDate: Sun Oct 1 01:45:42 2023 + Commit: Sam James gentoo org> CommitDate: Sun Oct 1 02:28:48 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=d10e29b8 13.2.0: drop upstreamed 83_all_all_PR110315_crash_large_std_vector.patch Signed-off-by: Sam James gentoo.org> ...3_all_all_PR110315_crash_large_std_vector.patch | 353 - 13.2.0/gentoo/README.history | 3 + 2 files changed, 3 insertions(+), 353 deletions(-) diff --git a/13.2.0/gentoo/83_all_all_PR110315_crash_large_std_vector.patch b/13.2.0/gentoo/83_all_all_PR110315_crash_large_std_vector.patch deleted file mode 100644 index 7c854ff..000 --- a/13.2.0/gentoo/83_all_all_PR110315_crash_large_std_vector.patch +++ /dev/null @@ -1,353 +0,0 @@ -https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110315 (specifically https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110315#c7) - -From 777aa930b106fea2dd6ed9fe22b42a2717f1472d Mon Sep 17 00:00:00 2001 -From: Aldy Hernandez -Date: Mon, 15 May 2023 12:25:58 +0200 -Subject: [PATCH] [GCC13] Add auto-resizing capability to irange's [PR109695] - -Backport the following from trunk. - - Note that the patch has been adapted to trees. - - The numbers for various sub-ranges on GCC13 are: - < 2> = 64 bytes, -3.02% for VRP. - < 3> = 80 bytes, -2.67% for VRP. - < 8> = 160 bytes, -2.46% for VRP. - <16> = 288 bytes, -2.40% for VRP. - - -We can now have int_range for automatically -resizable ranges. int_range_max is now int_range<3, true> -for a 69X reduction in size from current trunk, and 6.9X reduction from -GCC12. This incurs a 5% performance penalty for VRP that is more than -covered by our > 13% improvements recently. - - -int_range_max is the temporary range object we use in the ranger for -integers. With the conversion to wide_int, this structure bloated up -significantly because wide_ints are huge (80 bytes a piece) and are -about 10 times as big as a plain tree. Since the temporary object -requires 255 sub-ranges, that's 255 * 80 * 2, plus the control word. -This means the structure grew from 4112 bytes to 40912 bytes. - -This patch adds the ability to resize ranges as needed, defaulting to -no resizing, while int_range_max now defaults to 3 sub-ranges (instead -of 255) and grows to 255 when the range being calculated does not fit. - -For example: - -int_range<1> foo; // 1 sub-range with no resizing. -int_range<5> foo; // 5 sub-ranges with no resizing. -int_range<5, true> foo;// 5 sub-ranges with resizing. - -I ran some tests and found that 3 sub-ranges cover 99% of cases, so -I've set the int_range_max default to that: - - typedef int_range<3, /*RESIZABLE=*/true> int_range_max; - -We don't bother growing incrementally, since the default covers most -cases and we have a 255 hard-limit. This hard limit could be reduced -to 128, since my tests never saw a range needing more than 124, but we -could do that as a follow-up if needed. - -With 3-subranges, int_range_max is now 592 bytes versus 40912 for -trunk, and versus 4112 bytes for GCC12! The penalty is 5.04% for VRP -and 3.02% for threading, with no noticeable change in overall -compilation (0.27%). This is more than covered by our 13.26% -improvements for the legacy removal + wide_int conversion. - -I think this approach is a good alternative, while providing us with -flexibility going forward. For example, we could try defaulting to a -8 sub-ranges for a noticeable improvement in VRP. We could also use -large sub-ranges for switch analysis to avoid resizing. - -Another approach I tried was always resizing. With this, we could -drop the whole int_range nonsense, and have irange just hold a -resizable range. This simplified things, but incurred a 7% penalty on -ipa_cp. This was hard to pinpoint, and I'm not entirely convinced -this wasn't some artifact of valgrind. However, until we're sure, -let's avoid massive changes, especially since IPA changes are coming -up. - -For the curious, a particular hot spot for IPA in this area was: - -ipcp_vr_lattice::meet_with_1 (const value_range *other_vr) -{ -... -... - value_range save (m_vr); - m_vr.union_ (*other_vr); - return m_vr != save; -} - -The problem isn't the resizing (since we do that at most once) but the -fact that for some functions with lots of callers we end up a huge -range that gets copied and compared for every meet operation. Maybe -the IPA algorithm could be adjusted somehow??. - -Anywhooo... for now there is nothing to worry about, since value_range -still has 2 subranges and is not resizable. But we should probably -think what if anything we want to do here, as I envision IPA using -infinite ranges here (well, int_range_max) and handling frange's, etc. - -gcc/ChangeLog: - - PR tree-optimization/109695 - *
[gentoo-commits] proj/gcc-patches:master commit in: 13.2.0/gentoo/
commit: d0b55776a4e1d2f293db5ba0e4a04aefed055ec4 Author: Sam James gentoo org> AuthorDate: Sun Aug 13 00:37:58 2023 + Commit: Sam James gentoo org> CommitDate: Mon Aug 14 09:30:03 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=d0b55776 13.2.0: add extra trivial test fix Signed-off-by: Sam James gentoo.org> ...y-clobber-issues-with-rot32di2-test-fixup.patch | 39 ++ 13.2.0/gentoo/README.history | 3 ++ 2 files changed, 42 insertions(+) diff --git a/13.2.0/gentoo/85_all_x86_PR110792-Early-clobber-issues-with-rot32di2-test-fixup.patch b/13.2.0/gentoo/85_all_x86_PR110792-Early-clobber-issues-with-rot32di2-test-fixup.patch new file mode 100644 index 000..059f68c --- /dev/null +++ b/13.2.0/gentoo/85_all_x86_PR110792-Early-clobber-issues-with-rot32di2-test-fixup.patch @@ -0,0 +1,39 @@ +From 529909f9e92dd3b0ed0383f45a44d2b5f8a58958 Mon Sep 17 00:00:00 2001 +From: Roger Sayle +Date: Sun, 6 Aug 2023 23:19:10 +0100 +Subject: [PATCH] [Committed] Avoid FAIL of gcc.target/i386/pr110792.c + +My apologies (again), I managed to mess up the 64-bit version of the +test case for PR 110792. Unlike the 32-bit version, the 64-bit case +contains exactly the same load instructions, just in a different order +making the correct and incorrect behaviours impossible to distinguish +with a scan-assembler-not. Somewhere between checking that this test +failed in a clean tree without the patch, and getting the escaping +correct, I'd failed to notice that this also FAILs in the patched tree. +Doh! Instead of removing the test completely, I've left it as a +compilation test. + +The original fix is tested by the 32-bit test case. + +Committed to mainline as obvious. Sorry for the incovenience. + +2023-08-06 Roger Sayle + +gcc/testsuite/ChangeLog + PR target/110792 + * gcc.target/i386/pr110792.c: Remove dg-final scan-assembler-not. +--- + gcc/testsuite/gcc.target/i386/pr110792.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/gcc/testsuite/gcc.target/i386/pr110792.c b/gcc/testsuite/gcc.target/i386/pr110792.c +index b65125c48b62..eea4e1877dbb 100644 +--- a/gcc/testsuite/gcc.target/i386/pr110792.c b/gcc/testsuite/gcc.target/i386/pr110792.c +@@ -15,4 +15,3 @@ unsigned __int128 whirl(unsigned char x0) +asm("":::"memory"); +return tt; + } +-/* { dg-final { scan-assembler-not "movq\tWHIRL_S\\+8\\(%rdi\\), %rdi" } } */ +-- +2.39.3 diff --git a/13.2.0/gentoo/README.history b/13.2.0/gentoo/README.history index 2f1fc73..24a8367 100644 --- a/13.2.0/gentoo/README.history +++ b/13.2.0/gentoo/README.history @@ -1,3 +1,6 @@ +7 13 Aug 2023 + + 85_all_x86_PR110792-Early-clobber-issues-with-rot32di2-test-fixup.patch + 6 13 Aug 2023 + 84_all_x86_PR110792-Early-clobber-issues-with-rot32di2.patch
[gentoo-commits] proj/gcc-patches:master commit in: 13.2.0/gentoo/
commit: 7b28599cfed98fc831c16f1b528f15fd99011dae Author: Sam James gentoo org> AuthorDate: Sun Aug 13 00:20:39 2023 + Commit: Sam James gentoo org> CommitDate: Sun Aug 13 00:20:39 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=7b28599c 13.2.0: add patch for Botan miscompilation Bug: https://github.com/randombit/botan/issues/3637 Bug: https://gcc.gnu.org/PR110792 Signed-off-by: Sam James gentoo.org> ...110792-Early-clobber-issues-with-rot32di2.patch | 186 + 13.2.0/gentoo/README.history | 3 + 2 files changed, 189 insertions(+) diff --git a/13.2.0/gentoo/84_all_x86_PR110792-Early-clobber-issues-with-rot32di2.patch b/13.2.0/gentoo/84_all_x86_PR110792-Early-clobber-issues-with-rot32di2.patch new file mode 100644 index 000..e3c09cc --- /dev/null +++ b/13.2.0/gentoo/84_all_x86_PR110792-Early-clobber-issues-with-rot32di2.patch @@ -0,0 +1,186 @@ +https://gcc.gnu.org/PR110792 +https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=790c1f60a5662b16eb19eb4b81922995863c7571 +https://github.com/randombit/botan/issues/3637 + +From 85628c5653ff40963158a24c60eeec6a3b5a8e56 Mon Sep 17 00:00:00 2001 +From: Roger Sayle +Date: Thu, 3 Aug 2023 07:12:04 +0100 +Subject: [PATCH] PR target/110792: Early clobber issues with + rot32di2_doubleword on i386. + +This patch is a conservative fix for PR target/110792, a wrong-code +regression affecting doubleword rotations by BITS_PER_WORD, which +effectively swaps the highpart and lowpart words, when the source to be +rotated resides in memory. The issue is that if the register used to +hold the lowpart of the destination is mentioned in the address of +the memory operand, the current define_insn_and_split unintentionally +clobbers it before reading the highpart. + +Hence, for the testcase, the incorrectly generated code looks like: + +salq$4, %rdi // calculate address +movqWHIRL_S+8(%rdi), %rdi // accidentally clobber addr +movqWHIRL_S(%rdi), %rbp// load (wrong) lowpart + +Traditionally, the textbook way to fix this would be to add an +explicit early clobber to the instruction's constraints. + + (define_insn_and_split "32di2_doubleword" +- [(set (match_operand:DI 0 "register_operand" "=r,r,r") ++ [(set (match_operand:DI 0 "register_operand" "=r,r,") +(any_rotate:DI (match_operand:DI 1 "nonimmediate_operand" "0,r,o") + (const_int 32)))] + +but unfortunately this currently generates significantly worse code, +due to a strange choice of reloads (effectively memcpy), which ends up +looking like: + +salq$4, %rdi // calculate address +movdqa WHIRL_S(%rdi), %xmm0 // load the double word in SSE reg. +movaps %xmm0, -16(%rsp) // store the SSE reg back to the stack +movq-8(%rsp), %rdi // load highpart +movq-16(%rsp), %rbp// load lowpart + +Note that reload's "&" doesn't distinguish between the memory being +early clobbered, vs the registers used in an addressing mode being +early clobbered. + +The fix proposed in this patch is to remove the third alternative, that +allowed offsetable memory as an operand, forcing reload to place the +operand into a register before the rotation. This results in: + +salq$4, %rdi +movqWHIRL_S(%rdi), %rax +movqWHIRL_S+8(%rdi), %rdi +movq%rax, %rbp + +I believe there's a more advanced solution, by swapping the order of +the loads (if first destination register is mentioned in the address), +or inserting a lea insn (if both destination registers are mentioned +in the address), but this fix is a minimal "safe" solution, that +should hopefully be suitable for backporting. + +2023-08-03 Roger Sayle + +gcc/ChangeLog + PR target/110792 + * config/i386/i386.md (ti3): For rotations by 64 bits + place operand in a register before gen_64ti2_doubleword. + (di3): Likewise, for rotations by 32 bits, place + operand in a register before gen_32di2_doubleword. + (32di2_doubleword): Constrain operand to be in register. + (64ti2_doubleword): Likewise. + +gcc/testsuite/ChangeLog + PR target/110792 + * g++.target/i386/pr110792.C: New 32-bit C++ test case. + * gcc.target/i386/pr110792.c: New 64-bit C test case. + +(cherry picked from commit 790c1f60a5662b16eb19eb4b81922995863c7571) +--- + gcc/config/i386/i386.md | 18 -- + gcc/testsuite/g++.target/i386/pr110792.C | 16 + gcc/testsuite/gcc.target/i386/pr110792.c | 18 ++ + 3 files changed, 46 insertions(+), 6 deletions(-) + create mode 100644 gcc/testsuite/g++.target/i386/pr110792.C + create mode 100644 gcc/testsuite/gcc.target/i386/pr110792.c + +diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md +index f3a3305..a71e837 100644 +--- a/gcc/config/i386/i386.md
[gentoo-commits] proj/gcc-patches:master commit in: 13.2.0/gentoo/
commit: 78f6c61007a059d12df76503152c689f5c76dc03 Author: Sam James gentoo org> AuthorDate: Sat Aug 5 22:53:05 2023 + Commit: Sam James gentoo org> CommitDate: Sat Aug 5 22:53:05 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=78f6c610 13.2: drop obsolete upstream patch (82_all_arm64_PR110280_ICE_fold-const.patch) In latest snapshot. Signed-off-by: Sam James gentoo.org> .../82_all_arm64_PR110280_ICE_fold-const.patch | 53 -- 13.2.0/gentoo/README.history | 3 ++ 2 files changed, 3 insertions(+), 53 deletions(-) diff --git a/13.2.0/gentoo/82_all_arm64_PR110280_ICE_fold-const.patch b/13.2.0/gentoo/82_all_arm64_PR110280_ICE_fold-const.patch deleted file mode 100644 index d27ca7a..000 --- a/13.2.0/gentoo/82_all_arm64_PR110280_ICE_fold-const.patch +++ /dev/null @@ -1,53 +0,0 @@ -https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110280 -https://inbox.sourceware.org/gcc-patches/nycvar.yfh.7.77.849.2307270634430.12...@jbgna.fhfr.qr/T/#t - -From 85d8e0d8d5342ec8b4e6a54e22741c30b33c6f04 Mon Sep 17 00:00:00 2001 -From: Prathamesh Kulkarni -Date: Fri, 23 Jun 2023 15:27:17 +0530 -Subject: [PATCH] [aarch64/match.pd] Fix ICE observed in PR110280. - -gcc/ChangeLog: - PR tree-optimization/110280 - * match.pd (vec_perm_expr(v, v, mask) -> v): Explicitly build vector - using build_vector_from_val with the element of input operand, and - mask's type if operand and mask's types don't match. - -gcc/testsuite/ChangeLog: - PR tree-optimization/110280 - * gcc.target/aarch64/sve/pr110280.c: New test. - -(cherry picked from commit 85d8e0d8d5342ec8b4e6a54e22741c30b33c6f04) - a/gcc/match.pd -+++ b/gcc/match.pd -@@ -8292,7 +8292,14 @@ and, - - (simplify - (vec_perm vec_same_elem_p@0 @0 @1) -- @0) -+ (if (types_match (type, TREE_TYPE (@0))) -+ @0 -+ (with -+ { -+ tree elem = uniform_vector_p (@0); -+ } -+ (if (elem) -+{ build_vector_from_val (type, elem); } - - /* Push VEC_PERM earlier if that may help FMA perception (PR101895). */ - (simplify /dev/null -+++ b/gcc/testsuite/gcc.target/aarch64/sve/pr110280.c -@@ -0,0 +1,12 @@ -+/* { dg-do compile } */ -+/* { dg-options "-O3 -fdump-tree-optimized" } */ -+ -+#include "arm_sve.h" -+ -+svuint32_t l() -+{ -+ _Alignas(16) const unsigned int lanes[4] = {0, 0, 0, 0}; -+ return svld1rq_u32(svptrue_b8(), lanes); -+} -+ -+/* { dg-final { scan-tree-dump-not "VEC_PERM_EXPR" "optimized" } } */ diff --git a/13.2.0/gentoo/README.history b/13.2.0/gentoo/README.history index 998f555..769413a 100644 --- a/13.2.0/gentoo/README.history +++ b/13.2.0/gentoo/README.history @@ -1,3 +1,6 @@ +5 05 Aug 2023 + - 82_all_arm64_PR110280_ICE_fold-const.patch + 4 30 Jul 2023 U 31_all_gm2_make_P_var.patch
[gentoo-commits] proj/gcc-patches:master commit in: 13.2.0/gentoo/
commit: 5d5b708b7e6f858c3fc2d6a421fb424225efdb04 Author: Sam James gentoo org> AuthorDate: Sun Jul 30 17:30:47 2023 + Commit: Sam James gentoo org> CommitDate: Sun Jul 30 17:30:47 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=5d5b708b 13.2.0: backport a few patches, cut patchset 4 Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110280 Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110315 Signed-off-by: Sam James gentoo.org> 13.2.0/gentoo/31_all_gm2_make_P_var.patch | 16 +- .../82_all_arm64_PR110280_ICE_fold-const.patch | 53 ...3_all_all_PR110315_crash_large_std_vector.patch | 353 + 13.2.0/gentoo/README.history | 6 + 4 files changed, 421 insertions(+), 7 deletions(-) diff --git a/13.2.0/gentoo/31_all_gm2_make_P_var.patch b/13.2.0/gentoo/31_all_gm2_make_P_var.patch index c977874..ef34288 100644 --- a/13.2.0/gentoo/31_all_gm2_make_P_var.patch +++ b/13.2.0/gentoo/31_all_gm2_make_P_var.patch @@ -1,8 +1,8 @@ https://bugs.gentoo.org/904714 https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=79c73122fab213f218b85b2c579ffe3cf5e98ad0 -From 79c73122fab213f218b85b2c579ffe3cf5e98ad0 Mon Sep 17 00:00:00 2001 -From: =?utf8?q?Arsen=20Arsenovi=C4=87?= +From 275c516a40b7044895c4920f52ec19c7bceedd54 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= Date: Fri, 21 Apr 2023 18:07:29 +0200 Subject: [PATCH] gcc/m2: Drop references to $(P) @@ -14,9 +14,11 @@ gcc/m2/ChangeLog: * Make-lang.in: Remove references to $(P). * Make-maintainer.in: Ditto. + +(cherry picked from commit 79c73122fab213f218b85b2c579ffe3cf5e98ad0) --- a/gcc/m2/Make-lang.in +++ b/gcc/m2/Make-lang.in -@@ -514,7 +514,7 @@ GM2_LIBS_BOOT = m2/gm2-compiler-boot/gm2.a \ +@@ -515,7 +515,7 @@ GM2_LIBS_BOOT = m2/gm2-compiler-boot/gm2.a \ cc1gm2$(exeext): m2/stage1/cc1gm2$(exeext) $(m2.prev) cp -p $< $@ @@ -25,7 +27,7 @@ gcc/m2/ChangeLog: $(GM2_C_OBJS) $(BACKEND) $(LIBDEPS) $(GM2_LIBS) \ m2/gm2-gcc/rtegraph.o plugin/m2rte$(soext) -test -d $(@D) || $(mkinstalldirs) $(@D) -@@ -527,7 +527,7 @@ m2/stage2/cc1gm2$(exeext): m2/stage1/cc1gm2$(exeext) m2/gm2-compiler/m2flex.o $( +@@ -528,7 +528,7 @@ m2/stage2/cc1gm2$(exeext): m2/stage1/cc1gm2$(exeext) m2/gm2-compiler/m2flex.o $( @$(call LINK_PROGRESS,$(INDEX.m2),end) m2/stage1/cc1gm2$(exeext): gm2$(exeext) m2/gm2-compiler-boot/m2flex.o \ @@ -36,14 +38,14 @@ gcc/m2/ChangeLog: $(m2.prev) --- a/gcc/m2/Make-maintainer.in +++ b/gcc/m2/Make-maintainer.in -@@ -753,7 +753,7 @@ GM2_LIBS_PARANOID = m2/gm2-compiler-paranoid/gm2.a \ +@@ -848,7 +848,7 @@ GM2_LIBS_PARANOID = m2/gm2-compiler-paranoid/gm2.a \ gm2.paranoid: m2/m2obj3/cc1gm2$(exeext) gm2.verifyparanoid m2/m2obj3/cc1gm2$(exeext): m2/m2obj2/cc1gm2$(exeext) m2/gm2-compiler-paranoid/m2flex.o \ -$(P) $(GM2_C_OBJS) $(BACKEND) $(LIBDEPS) $(GM2_LIBS_PARANOID) \ +$(GM2_C_OBJS) $(BACKEND) $(LIBDEPS) $(GM2_LIBS_PARANOID) \ - m2/gm2-gcc/rtegraph.o plugin/m2rte$(exeext).so m2/gm2-libs-boot/M2LINK.o + m2/gm2-gcc/rtegraph.o plugin/m2rte$(exeext).so -test -d m2/m2obj3 || $(mkinstalldirs) m2/m2obj3 @$(call LINK_PROGRESS,$(INDEX.m2),start) -- -2.31.1 +2.41.0 diff --git a/13.2.0/gentoo/82_all_arm64_PR110280_ICE_fold-const.patch b/13.2.0/gentoo/82_all_arm64_PR110280_ICE_fold-const.patch new file mode 100644 index 000..d27ca7a --- /dev/null +++ b/13.2.0/gentoo/82_all_arm64_PR110280_ICE_fold-const.patch @@ -0,0 +1,53 @@ +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110280 +https://inbox.sourceware.org/gcc-patches/nycvar.yfh.7.77.849.2307270634430.12...@jbgna.fhfr.qr/T/#t + +From 85d8e0d8d5342ec8b4e6a54e22741c30b33c6f04 Mon Sep 17 00:00:00 2001 +From: Prathamesh Kulkarni +Date: Fri, 23 Jun 2023 15:27:17 +0530 +Subject: [PATCH] [aarch64/match.pd] Fix ICE observed in PR110280. + +gcc/ChangeLog: + PR tree-optimization/110280 + * match.pd (vec_perm_expr(v, v, mask) -> v): Explicitly build vector + using build_vector_from_val with the element of input operand, and + mask's type if operand and mask's types don't match. + +gcc/testsuite/ChangeLog: + PR tree-optimization/110280 + * gcc.target/aarch64/sve/pr110280.c: New test. + +(cherry picked from commit 85d8e0d8d5342ec8b4e6a54e22741c30b33c6f04) + +--- a/gcc/match.pd b/gcc/match.pd +@@ -8292,7 +8292,14 @@ and, + + (simplify + (vec_perm vec_same_elem_p@0 @0 @1) +- @0) ++ (if (types_match (type, TREE_TYPE (@0))) ++ @0 ++ (with ++ { ++ tree elem = uniform_vector_p (@0); ++ } ++ (if (elem) ++{ build_vector_from_val (type, elem); } + + /* Push VEC_PERM earlier if that may help FMA perception (PR101895). */ + (simplify +--- /dev/null
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: 6cb33e2f39e289ec4f25f845d8153053147c5c49 Author: Sam James gentoo org> AuthorDate: Sun Jun 18 22:51:10 2023 + Commit: Sam James gentoo org> CommitDate: Sun Jun 18 22:51:10 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=6cb33e2f 14.0.0: cut patchset 2 Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/README.history | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history index 54617a7..3d72078 100644 --- a/14.0.0/gentoo/README.history +++ b/14.0.0/gentoo/README.history @@ -1,4 +1,4 @@ -2 ?? +2 18 June 2023 - 09_all_nopie-all-flags.patch 1 23 April 2023
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: f9de5c24b9a6172d48786289035eed8f947c04c1 Author: Sam James gentoo org> AuthorDate: Thu Jun 15 23:03:22 2023 + Commit: Sam James gentoo org> CommitDate: Thu Jun 15 23:03:27 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=f9de5c24 14.0.0: drop 09_all_nopie-all-flags.patch Conflicts with https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=b6cb10af12cf869c1ae348c0e5cb2d364ef0abce upstream and upon review, I don't think we need this anymore at all. Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/09_all_nopie-all-flags.patch | 18 -- 14.0.0/gentoo/README.history | 3 +++ 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/14.0.0/gentoo/09_all_nopie-all-flags.patch b/14.0.0/gentoo/09_all_nopie-all-flags.patch deleted file mode 100644 index fe1cd80..000 --- a/14.0.0/gentoo/09_all_nopie-all-flags.patch +++ /dev/null @@ -1,18 +0,0 @@ -We need to pass NO_PIE_CFLAGS to ALL_* so gcc don't fail when -we compile it with older gcc and pie. - a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -1054,10 +1054,10 @@ ALL_CXXFLAGS = $(T_CFLAGS) $(CFLAGS-$@) - ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS) - - # This is the variable to use when using $(COMPILER). --ALL_COMPILERFLAGS = $(ALL_CXXFLAGS) -+ALL_COMPILERFLAGS = $(NO_PIE_CFLAGS) $(ALL_CXXFLAGS) - - # This is the variable to use when using $(LINKER). --ALL_LINKERFLAGS = $(ALL_CXXFLAGS) -+ALL_LINKERFLAGS = $(NO_PIE_CFLAGS) $(ALL_CXXFLAGS) - - # Build and host support libraries. - diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history index 6204a28..54617a7 100644 --- a/14.0.0/gentoo/README.history +++ b/14.0.0/gentoo/README.history @@ -1,3 +1,6 @@ +2 ?? +- 09_all_nopie-all-flags.patch + 1 23 April 2023 + 01_all_default-fortify-source.patch
[gentoo-commits] proj/gcc-patches:master commit in: 13.2.0/gentoo/
commit: 7a6b2d23ec02e75475a6123254ccd44d73827f39 Author: Sam James gentoo org> AuthorDate: Fri May 26 02:26:36 2023 + Commit: Sam James gentoo org> CommitDate: Fri May 26 02:26:36 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=7a6b2d23 13.2.0: backport split match.pd changes See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109927#c21. This should improve (reduce) the peak RAM usage when building GCC as it builds gimple-match in smaller chunks (previously was one huge generated file) as well as speeding up parallel build when used. i.e. This has benefits for both people building on constrained hardware (because -j1 is more effective and just means each smaller chunk is built one-at-a-time, not the massive blob) and also for people building with many jobs, as there's one less synchronisation point so the build is less serial. Motivated in particular by the upstream report (PR109927) of this being an issue on m68k with RAM usage for the single GCC process building gimple-match. (IIRC immolo and possibly dilfridge had mentioned similar issues when building some arches in qemu as well.) Note that upstream are planning on splitting insn-* as well so there are further improvements in the pipeline (see PR54179, but discussion has occurred far more recently on IRC about this and tamar is likely to look at it.). Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54179 (old bug for splitting insn-*, will be revisited) Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84402 (tracker bug for parallelisation, interesting discussion) Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109927 Bug: https://bugs.gentoo.org/891909 (not the same issue per-se but related to reduced resource usage) Bug: https://bugs.gentoo.org/894256 Bug: https://bugs.gentoo.org/901317 Signed-off-by: Sam James gentoo.org> ...l_match.pd-don-t-emit-label-if-not-needed.patch | 114 + ...move-commented-out-line-pragmas-unless-vv.patch | 41 + ...78_all_match.pd-CSE-the-dump-output-check.patch | 70 + ...lit-shared-code-to-gimple-match-exports.c.patch | 2560 ...pd-automatically-partition-match.cc-files.patch | 524 ...e-splits-in-makefile-and-make-configurabl.patch | 258 ++ 13.2.0/gentoo/README.history | 10 + 7 files changed, 3577 insertions(+) diff --git a/13.2.0/gentoo/76_all_match.pd-don-t-emit-label-if-not-needed.patch b/13.2.0/gentoo/76_all_match.pd-don-t-emit-label-if-not-needed.patch new file mode 100644 index 000..ac9efe6 --- /dev/null +++ b/13.2.0/gentoo/76_all_match.pd-don-t-emit-label-if-not-needed.patch @@ -0,0 +1,114 @@ +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109927#c21 + +From 6894f8e1fafe211a5f14ecbb534c92c2b78beb3a Mon Sep 17 00:00:00 2001 +From: Tamar Christina +Date: Fri, 5 May 2023 13:35:17 +0100 +Subject: [PATCH 1/6] match.pd: don't emit label if not needed + +This is a small QoL codegen improvement for match.pd to not emit labels when +they are not needed. The codegen is nice and there is a small (but consistent) +improvement in compile time. + +gcc/ChangeLog: + + PR bootstrap/84402 + * genmatch.cc (dt_simplify::gen_1): Only emit labels if used. + +(cherry picked from commit 580cda3c2799b1f8323af770e52f1eb0fa204718) +--- + gcc/genmatch.cc | 30 ++ + 1 file changed, 22 insertions(+), 8 deletions(-) + +diff --git a/gcc/genmatch.cc b/gcc/genmatch.cc +index 4fab4135347..638606b2502 100644 +--- a/gcc/genmatch.cc b/gcc/genmatch.cc +@@ -3352,6 +3352,7 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) + char local_fail_label[256]; + snprintf (local_fail_label, 256, "next_after_fail%u", ++fail_label_cnt); + fail_label = local_fail_label; ++ bool needs_label = false; + + /* Analyze captures and perform early-outs on the incoming arguments + that cover cases we cannot handle. */ +@@ -3366,6 +3367,7 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) + fprintf_indent (f, indent, + "if (TREE_SIDE_EFFECTS (_p%d)) goto %s;\n", + i, fail_label); ++ needs_label = true; + if (verbose >= 1) + warning_at (as_a (s->match)->ops[i]->location, + "forcing toplevel operand to have no " +@@ -3381,6 +3383,7 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) + fprintf_indent (f, indent, + "if (TREE_SIDE_EFFECTS (captures[%d])) " + "goto %s;\n", i, fail_label); ++ needs_label = true; + if (verbose >= 1) + warning_at (cinfo.info[i].c->location, + "forcing captured operand to have no " +@@ -3423,7 +3426,10 @@ dt_simplify::gen_1 (FILE *f, int indent, bool gimple, operand *result) + } + + if (s->kind
[gentoo-commits] proj/gcc-patches:master commit in: 13.2.0/musl/
commit: 29d805847dc870c92f705ed9c5e7eac955c7e7d4 Author: Sam James gentoo org> AuthorDate: Wed May 10 01:36:00 2023 + Commit: Sam James gentoo org> CommitDate: Wed May 10 01:36:00 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=29d80584 13.2.0: musl: fix build w/ musl-1.2.4 LFS changes Bug: https://bugs.gentoo.org/900871 Signed-off-by: Sam James gentoo.org> 13.2.0/musl/50_all_sanitizer_lfs.patch | 197 + 13.2.0/musl/README.history | 3 + 2 files changed, 200 insertions(+) diff --git a/13.2.0/musl/50_all_sanitizer_lfs.patch b/13.2.0/musl/50_all_sanitizer_lfs.patch new file mode 100644 index 000..65baea2 --- /dev/null +++ b/13.2.0/musl/50_all_sanitizer_lfs.patch @@ -0,0 +1,197 @@ +https://bugs.gentoo.org/900871 +https://reviews.llvm.org/D141186 +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109533 +https://github.com/llvm/llvm-project/commit/a5519b99bc73d50f362d6fb306411e9fcb758b53 +--- a/libsanitizer/interception/interception_type_test.cpp b/libsanitizer/interception/interception_type_test.cpp +@@ -24,9 +24,9 @@ COMPILER_CHECK(sizeof(::SSIZE_T) == sizeof(ssize_t)); + COMPILER_CHECK(sizeof(::PTRDIFF_T) == sizeof(ptrdiff_t)); + COMPILER_CHECK(sizeof(::INTMAX_T) == sizeof(intmax_t)); + +-#if !SANITIZER_APPLE ++# if SANITIZER_GLIBC || SANITIZER_ANDROID + COMPILER_CHECK(sizeof(::OFF64_T) == sizeof(off64_t)); +-#endif ++# endif + + // The following are the cases when pread (and friends) is used instead of + // pread64. In those cases we need OFF_T to match off_t. We don't care about the +--- a/libsanitizer/sanitizer_common/sanitizer_common_syscalls.inc b/libsanitizer/sanitizer_common/sanitizer_common_syscalls.inc +@@ -910,24 +910,26 @@ POST_SYSCALL(statfs)(long res, const void *path, void *buf) { + } + } + +-PRE_SYSCALL(statfs64)(const void *path, long sz, void *buf) { +- if (path) +-PRE_READ(path, __sanitizer::internal_strlen((const char *)path) + 1); +-} ++PRE_SYSCALL(fstatfs)(long fd, void *buf) {} + +-POST_SYSCALL(statfs64)(long res, const void *path, long sz, void *buf) { ++POST_SYSCALL(fstatfs)(long res, long fd, void *buf) { + if (res >= 0) { + if (buf) +- POST_WRITE(buf, struct_statfs64_sz); ++ POST_WRITE(buf, struct_statfs_sz); + } + } ++# endif // !SANITIZER_ANDROID + +-PRE_SYSCALL(fstatfs)(long fd, void *buf) {} ++# if SANITIZER_GLIBC ++PRE_SYSCALL(statfs64)(const void *path, long sz, void *buf) { ++ if (path) ++PRE_READ(path, __sanitizer::internal_strlen((const char *)path) + 1); ++} + +-POST_SYSCALL(fstatfs)(long res, long fd, void *buf) { ++POST_SYSCALL(statfs64)(long res, const void *path, long sz, void *buf) { + if (res >= 0) { + if (buf) +- POST_WRITE(buf, struct_statfs_sz); ++ POST_WRITE(buf, struct_statfs64_sz); + } + } + +@@ -939,7 +941,7 @@ POST_SYSCALL(fstatfs64)(long res, long fd, long sz, void *buf) { + POST_WRITE(buf, struct_statfs64_sz); + } + } +-# endif // !SANITIZER_ANDROID ++# endif // SANITIZER_GLIBC + + PRE_SYSCALL(lstat)(const void *filename, void *statbuf) { + if (filename) +@@ -998,7 +1000,7 @@ POST_SYSCALL(newfstat)(long res, long fd, void *statbuf) { + } + } + +-# if !SANITIZER_ANDROID ++# if SANITIZER_GLIBC + PRE_SYSCALL(ustat)(long dev, void *ubuf) {} + + POST_SYSCALL(ustat)(long res, long dev, void *ubuf) { +@@ -1007,7 +1009,7 @@ POST_SYSCALL(ustat)(long res, long dev, void *ubuf) { + POST_WRITE(ubuf, struct_ustat_sz); + } + } +-# endif // !SANITIZER_ANDROID ++# endif // SANITIZER_GLIBC + + PRE_SYSCALL(stat64)(const void *filename, void *statbuf) { + if (filename) +@@ -2228,7 +2230,7 @@ POST_SYSCALL(setrlimit)(long res, long resource, void *rlim) { + } + } + +-# if !SANITIZER_ANDROID ++# if SANITIZER_GLIBC + PRE_SYSCALL(prlimit64) + (long pid, long resource, const void *new_rlim, void *old_rlim) { + if (new_rlim) +--- a/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h b/libsanitizer/sanitizer_common/sanitizer_platform_interceptors.h +@@ -269,7 +269,7 @@ + #define SANITIZER_INTERCEPT_INET_ATON SI_POSIX + #define SANITIZER_INTERCEPT_SYSINFO SI_LINUX + #define SANITIZER_INTERCEPT_READDIR SI_POSIX +-#define SANITIZER_INTERCEPT_READDIR64 SI_LINUX_NOT_ANDROID || SI_SOLARIS32 ++#define SANITIZER_INTERCEPT_READDIR64 SI_GLIBC || SI_SOLARIS32 + #if SI_LINUX_NOT_ANDROID &&\ + (defined(__i386) || defined(__x86_64) || defined(__mips64) || \ + defined(__powerpc64__) || defined(__aarch64__) || defined(__arm__) || \ +@@ -308,7 +308,7 @@ + #define SANITIZER_INTERCEPT_XPG_STRERROR_R SI_LINUX_NOT_ANDROID + #define SANITIZER_INTERCEPT_SCANDIR \ + (SI_FREEBSD || SI_NETBSD || SI_LINUX_NOT_ANDROID || SI_SOLARIS) +-#define SANITIZER_INTERCEPT_SCANDIR64 SI_LINUX_NOT_ANDROID || SI_SOLARIS32 ++#define SANITIZER_INTERCEPT_SCANDIR64 SI_GLIBC || SI_SOLARIS32 + #define
[gentoo-commits] proj/gcc-patches:master commit in: 11.4.0/gentoo/
commit: ab60d0a28615153ee13cbf1401bdcdf2382ae0c4 Author: Sam James gentoo org> AuthorDate: Fri May 5 02:37:32 2023 + Commit: Sam James gentoo org> CommitDate: Fri May 5 02:37:32 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=ab60d0a2 11.4.0: drop upstream 77_all_all_PR109585_13_rtl-alias-analysis-typo.patch Signed-off-by: Sam James gentoo.org> ...l_all_PR109585_13_rtl-alias-analysis-typo.patch | 79 -- 11.4.0/gentoo/README.history | 3 + 2 files changed, 3 insertions(+), 79 deletions(-) diff --git a/11.4.0/gentoo/77_all_all_PR109585_13_rtl-alias-analysis-typo.patch b/11.4.0/gentoo/77_all_all_PR109585_13_rtl-alias-analysis-typo.patch deleted file mode 100644 index b7b57d6..000 --- a/11.4.0/gentoo/77_all_all_PR109585_13_rtl-alias-analysis-typo.patch +++ /dev/null @@ -1,79 +0,0 @@ -https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109609 -https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=ef6051b36241bf130bf76af0b775248635dc616e - -From ef6051b36241bf130bf76af0b775248635dc616e Mon Sep 17 00:00:00 2001 -From: Richard Biener -Date: Mon, 24 Apr 2023 13:31:07 +0200 -Subject: [PATCH] rtl-optimization/109585 - alias analysis typo - -When r10-514-gc6b84edb6110dd2b4fb improved access path analysis -it introduced a typo that triggers when there's an access to a -trailing array in the first access path leading to false -disambiguation. - - PR rtl-optimization/109585 - * tree-ssa-alias.c (aliasing_component_refs_p): Fix typo. - - * gcc.dg/torture/pr109585.c: New testcase. - -(cherry picked from commit 6d4bd27a60447c7505cb4783e675e98a191a8904) - gcc/testsuite/gcc.dg/torture/pr109585.c | 33 + - gcc/tree-ssa-alias.c | 2 +- - 2 files changed, 34 insertions(+), 1 deletion(-) - create mode 100644 gcc/testsuite/gcc.dg/torture/pr109585.c - -diff --git a/gcc/testsuite/gcc.dg/torture/pr109585.c b/gcc/testsuite/gcc.dg/torture/pr109585.c -new file mode 100644 -index 000..f92de7c1f2e /dev/null -+++ b/gcc/testsuite/gcc.dg/torture/pr109585.c -@@ -0,0 +1,33 @@ -+/* { dg-do run } */ -+ -+#include -+ -+struct P { -+long v; -+struct P *n; -+}; -+ -+struct F { -+long x; -+struct P fam[]; -+}; -+ -+int __attribute__((noipa)) -+f(struct F *f, int i) -+{ -+ struct P *p = f->fam; -+ asm("" : "+r"(f): "r"(p)); -+ p->v = 0; -+ p->n = 0; -+ return f->fam->n != 0; -+} -+ -+int -+main() -+{ -+ struct F *m = malloc (sizeof (long) + 2 * sizeof (struct P)); -+ m->fam[0].n = >fam[1]; -+ if (f (m, 0)) -+abort (); -+ return 0; -+} -diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c -index b1e7a2d5afc..be7b597266f 100644 a/gcc/tree-ssa-alias.c -+++ b/gcc/tree-ssa-alias.c -@@ -1326,7 +1326,7 @@ aliasing_component_refs_p (tree ref1, - /* If we didn't find a common base, try the other way around. */ - if (cmp_outer <= 0 - || (end_struct_ref1 --&& compare_type_sizes (TREE_TYPE (end_struct_ref1), type1) <= 0)) -+&& compare_type_sizes (TREE_TYPE (end_struct_ref1), type2) <= 0)) - { - int res = aliasing_component_refs_walk (ref2, type2, base2, - offset2, max_size2, --- -2.31.1 diff --git a/11.4.0/gentoo/README.history b/11.4.0/gentoo/README.history index a5fca96..b578306 100644 --- a/11.4.0/gentoo/README.history +++ b/11.4.0/gentoo/README.history @@ -1,3 +1,6 @@ +10 5 May 2023 + - 77_all_all_PR109585_13_rtl-alias-analysis-typo.patch + 9 28 Apr 2023 + 77_all_all_PR109585_13_rtl-alias-analysis-typo.patch
[gentoo-commits] proj/gcc-patches:master commit in: 13.2.0/gentoo/
commit: 490c1c096ca1d3a1f4a84801a46231d64c07ba49 Author: Sam James gentoo org> AuthorDate: Sat Apr 29 22:41:36 2023 + Commit: Sam James gentoo org> CommitDate: Sat Apr 29 22:41:36 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=490c1c09 13.2.0: cut 2 patchset Signed-off-by: Sam James gentoo.org> 13.2.0/gentoo/README.history | 5 + 1 file changed, 5 insertions(+) diff --git a/13.2.0/gentoo/README.history b/13.2.0/gentoo/README.history index 1ae5deb..20af64a 100644 --- a/13.2.0/gentoo/README.history +++ b/13.2.0/gentoo/README.history @@ -1,3 +1,8 @@ +2 29 Apr 2023 + - 75_all_all_PR109573_13_ICE-in-vectorizable_live_operation.patch + - 76_all_all_PR109585_13_rtl-alias-analysis-typo.patch + - 77_all_all_PR109609_13_tail-call-fnspec.patch + 1 26 April 2023 + 01_all_default-fortify-source.patch
[gentoo-commits] proj/gcc-patches:master commit in: 12.3.0/gentoo/
commit: 31cd33e8455cdedff3ce9182a67a8330e743a5fb Author: Sam James gentoo org> AuthorDate: Sat Apr 29 07:05:34 2023 + Commit: Sam James gentoo org> CommitDate: Sat Apr 29 07:05:34 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=31cd33e8 12.3.0: add 76_all_all_PR107087_12_Wstringop-overread-libstdc++-cow-empty.patch Actually backport the patch. I'd got confused because one of our previous patches had been backported and I assumed it was this one. Oops. Signed-off-by: Sam James gentoo.org> ...12_Wstringop-overread-libstdc++-cow-empty.patch | 63 ++ 12.3.0/gentoo/README.history | 3 ++ 2 files changed, 66 insertions(+) diff --git a/12.3.0/gentoo/76_all_all_PR107087_12_Wstringop-overread-libstdc++-cow-empty.patch b/12.3.0/gentoo/76_all_all_PR107087_12_Wstringop-overread-libstdc++-cow-empty.patch new file mode 100644 index 000..15241fe --- /dev/null +++ b/12.3.0/gentoo/76_all_all_PR107087_12_Wstringop-overread-libstdc++-cow-empty.patch @@ -0,0 +1,63 @@ +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107087 +https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=4969dcd2b7a94ce6c0d07225b21b5f3c040a4902 + +From 4969dcd2b7a94ce6c0d07225b21b5f3c040a4902 Mon Sep 17 00:00:00 2001 +From: Jonathan Wakely +Date: Fri, 31 Mar 2023 13:44:04 +0100 +Subject: [PATCH] libstdc++: Teach optimizer that empty COW strings are empty + [PR107087] + +The compiler doesn't know about the invariant that the _S_empty_rep() +object is immutable and so _M_length and _M_refcount are always zero. +This means that we get warnings about writing possibly-non-zero length +strings into buffers that can't hold them. If we teach the compiler that +the empty rep is always zero length, it knows it can be copied into any +buffer. + +For Stage 1 we might want to also consider adding this to capacity(): + + if (_S_empty_rep()._M_capacity != 0) + __builtin_unreachable(); + +And this to _Rep::_M_is_leaked() and _Rep::_M_is_shared(): + + if (_S_empty_rep()._M_refcount != 0) + __builtin_unreachable(); + +libstdc++-v3/ChangeLog: + + PR tree-optimization/107087 + * include/bits/cow_string.h (basic_string::size()): Add + optimizer hint that _S_empty_rep()._M_length is always zero. + (basic_string::length()): Call size(). +--- a/libstdc++-v3/include/bits/cow_string.h b/libstdc++-v3/include/bits/cow_string.h +@@ -907,17 +907,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION + + public: + // Capacity: ++ + /// Returns the number of characters in the string, not including any + /// null-termination. + size_type + size() const _GLIBCXX_NOEXCEPT +- { return _M_rep()->_M_length; } ++ { ++#if _GLIBCXX_FULLY_DYNAMIC_STRING == 0 && __OPTIMIZE__ ++ if (_S_empty_rep()._M_length != 0) ++__builtin_unreachable(); ++#endif ++ return _M_rep()->_M_length; ++ } + + /// Returns the number of characters in the string, not including any + /// null-termination. + size_type + length() const _GLIBCXX_NOEXCEPT +- { return _M_rep()->_M_length; } ++ { return size(); } + + /// Returns the size() of the largest possible %string. + size_type +-- +2.31.1 diff --git a/12.3.0/gentoo/README.history b/12.3.0/gentoo/README.history index 156935c..f65edb4 100644 --- a/12.3.0/gentoo/README.history +++ b/12.3.0/gentoo/README.history @@ -1,3 +1,6 @@ +2 29 Apr 2023 + + 76_all_all_PR107087_12_Wstringop-overread-libstdc++-cow-empty.patch + 1 28 Apr 2023 + 01_all_default-fortify-source.patch
[gentoo-commits] proj/gcc-patches:master commit in: 12.3.0/musl/, 12.3.0/gentoo/
commit: 4c123f448e88135f2d45b9fc24d51939438f6ce2 Author: Sam James gentoo org> AuthorDate: Fri Apr 28 23:14:08 2023 + Commit: Sam James gentoo org> CommitDate: Fri Apr 28 23:25:23 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=4c123f44 12.3.0: add Clone of 12.2.0 with 76_all_all_PR109573_12_ICE-in-vectorizable_live_operation.patch dropped as it's been backported upstream. I was going to add in https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=47880309516fd5c913102eb4c52dc86da7051983 but upstream have backported that because we're going to test it out. Signed-off-by: Sam James gentoo.org> 12.3.0/gentoo/01_all_default-fortify-source.patch | 26 +++ .../02_all_default-warn-format-security.patch | 22 +++ .../gentoo/03_all_default-warn-trampolines.patch | 13 ++ 12.3.0/gentoo/04_all_nossp-on-nostdlib.patch | 27 +++ 12.3.0/gentoo/05_all_alpha-mieee-default.patch | 39 12.3.0/gentoo/06_all_ia64_note.GNU-stack.patch | 92 + 12.3.0/gentoo/07_all_libiberty-asprintf.patch | 18 ++ 12.3.0/gentoo/08_all_libiberty-pic.patch | 10 + 12.3.0/gentoo/09_all_nopie-all-flags.patch | 18 ++ 12.3.0/gentoo/10_all_sh-drop-sysroot-suffix.patch | 26 +++ 12.3.0/gentoo/11_all_ia64-TEXTREL.patch| 22 +++ .../gentoo/12_all_disable-systemtap-switch.patch | 115 12.3.0/gentoo/14_all_respect-build-cxxflags.patch | 39 .../15_all_DEF_GENTOO_GLIBCXX_ASSERTIONS.patch | 14 ++ 12.3.0/gentoo/20_all_libstdcxx-no-vtv.patch| 61 ++ 12.3.0/gentoo/22_all_default_ssp-buffer-size.patch | 14 ++ 12.3.0/gentoo/23_all_DEF_GENTOO_ZNOW-z-now.patch | 26 +++ ...ll_DEF_GENTOO_SCP-fstack-clash-protection.patch | 65 +++ .../25_all_lto-intl-workaround-PR95194.patch | 20 ++ 12.3.0/gentoo/26_all_enable-cet.patch | 206 + 12.3.0/gentoo/27_all_plugin-objdump.patch | 34 12.3.0/gentoo/28_all_drop_CFLAGS_sed.patch | 35 12.3.0/gentoo/29_all_msgfmt-libstdc++-link.patch | 39 12.3.0/gentoo/30_all_tar_libstdc++-link.patch | 57 ++ .../75_all_go_posix_shell_arithmetic_nonbash.patch | 40 12.3.0/gentoo/README.history | 27 +++ 12.3.0/musl/25_all_multilib_pure64.patch | 83 + 12.3.0/musl/50_all_cpu_indicator.patch | 35 12.3.0/musl/50_all_libssp_unconditionally.patch| 24 +++ 12.3.0/musl/50_all_posix_memalign.patch| 28 +++ 12.3.0/musl/README.history | 6 + 31 files changed, 1281 insertions(+) diff --git a/12.3.0/gentoo/01_all_default-fortify-source.patch b/12.3.0/gentoo/01_all_default-fortify-source.patch new file mode 100644 index 000..4cdf5f6 --- /dev/null +++ b/12.3.0/gentoo/01_all_default-fortify-source.patch @@ -0,0 +1,26 @@ +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.cc b/gcc/c-family/c-cppbuiltin.cc +@@ -1510,6 +1510,16 @@ 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) ++ #ifndef GENTOO_FORTIFY_SOURCE_LEVEL ++#define GENTOO_FORTIFY_SOURCE_LEVEL 2 ++ #endif ++ ++ /* F_S enabled by default for optimization levels > 0, except for ASAN: https://github.com/google/sanitizers/issues/247 */ ++ if (optimize && ! (flag_sanitize & SANITIZE_ADDRESS)) ++builtin_define_with_int_value ("_FORTIFY_SOURCE", GENTOO_FORTIFY_SOURCE_LEVEL); ++#endif ++ + /* Misc. */ + if (flag_gnu89_inline) + cpp_define (pfile, "__GNUC_GNU_INLINE__"); diff --git a/12.3.0/gentoo/02_all_default-warn-format-security.patch b/12.3.0/gentoo/02_all_default-warn-format-security.patch new file mode 100644 index 000..9723a1c --- /dev/null +++ b/12.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 b/gcc/c-family/c.opt +@@ -696,7 +696,7 @@ Warn about function calls with format strings that write past the end + of the destination region. Same as -Wformat-overflow=1. + + 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 +@@ -717,7 +717,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++ + Warn
[gentoo-commits] proj/gcc-patches:master commit in: 10.5.0/gentoo/
commit: 4e3415bb2e54c2b4ae6fe5b3ceb2b1a4253a011f Author: Sam James gentoo org> AuthorDate: Fri Apr 28 00:00:31 2023 + Commit: Sam James gentoo org> CommitDate: Fri Apr 28 00:00:31 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=4e3415bb 10.5.0: add miscompilation patch (77_all_all_PR109585_13_rtl-alias-analysis-typo.patch) Signed-off-by: Sam James gentoo.org> ...l_all_PR109585_13_rtl-alias-analysis-typo.patch | 79 ++ 10.5.0/gentoo/README.history | 7 +- 2 files changed, 84 insertions(+), 2 deletions(-) diff --git a/10.5.0/gentoo/77_all_all_PR109585_13_rtl-alias-analysis-typo.patch b/10.5.0/gentoo/77_all_all_PR109585_13_rtl-alias-analysis-typo.patch new file mode 100644 index 000..b7b57d6 --- /dev/null +++ b/10.5.0/gentoo/77_all_all_PR109585_13_rtl-alias-analysis-typo.patch @@ -0,0 +1,79 @@ +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109609 +https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=ef6051b36241bf130bf76af0b775248635dc616e + +From ef6051b36241bf130bf76af0b775248635dc616e Mon Sep 17 00:00:00 2001 +From: Richard Biener +Date: Mon, 24 Apr 2023 13:31:07 +0200 +Subject: [PATCH] rtl-optimization/109585 - alias analysis typo + +When r10-514-gc6b84edb6110dd2b4fb improved access path analysis +it introduced a typo that triggers when there's an access to a +trailing array in the first access path leading to false +disambiguation. + + PR rtl-optimization/109585 + * tree-ssa-alias.c (aliasing_component_refs_p): Fix typo. + + * gcc.dg/torture/pr109585.c: New testcase. + +(cherry picked from commit 6d4bd27a60447c7505cb4783e675e98a191a8904) +--- + gcc/testsuite/gcc.dg/torture/pr109585.c | 33 + + gcc/tree-ssa-alias.c | 2 +- + 2 files changed, 34 insertions(+), 1 deletion(-) + create mode 100644 gcc/testsuite/gcc.dg/torture/pr109585.c + +diff --git a/gcc/testsuite/gcc.dg/torture/pr109585.c b/gcc/testsuite/gcc.dg/torture/pr109585.c +new file mode 100644 +index 000..f92de7c1f2e +--- /dev/null b/gcc/testsuite/gcc.dg/torture/pr109585.c +@@ -0,0 +1,33 @@ ++/* { dg-do run } */ ++ ++#include ++ ++struct P { ++long v; ++struct P *n; ++}; ++ ++struct F { ++long x; ++struct P fam[]; ++}; ++ ++int __attribute__((noipa)) ++f(struct F *f, int i) ++{ ++ struct P *p = f->fam; ++ asm("" : "+r"(f): "r"(p)); ++ p->v = 0; ++ p->n = 0; ++ return f->fam->n != 0; ++} ++ ++int ++main() ++{ ++ struct F *m = malloc (sizeof (long) + 2 * sizeof (struct P)); ++ m->fam[0].n = >fam[1]; ++ if (f (m, 0)) ++abort (); ++ return 0; ++} +diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c +index b1e7a2d5afc..be7b597266f 100644 +--- a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c +@@ -1326,7 +1326,7 @@ aliasing_component_refs_p (tree ref1, + /* If we didn't find a common base, try the other way around. */ + if (cmp_outer <= 0 + || (end_struct_ref1 +-&& compare_type_sizes (TREE_TYPE (end_struct_ref1), type1) <= 0)) ++&& compare_type_sizes (TREE_TYPE (end_struct_ref1), type2) <= 0)) + { + int res = aliasing_component_refs_walk (ref2, type2, base2, + offset2, max_size2, +-- +2.31.1 diff --git a/10.5.0/gentoo/README.history b/10.5.0/gentoo/README.history index 74ee905..f848c9c 100644 --- a/10.5.0/gentoo/README.history +++ b/10.5.0/gentoo/README.history @@ -1,7 +1,10 @@ -5 27 Jan 2022 +6 28 Apr 2023 + + 77_all_all_PR109585_13_rtl-alias-analysis-typo.patch + +5 27 Jan 2023 - 77_all_driver_environ_putenv_PR106624.patch -4 23 Jan 2022 +4 23 Jan 2023 + 77_all_driver_environ_putenv_PR106624.patch 3 17 Dec 2022
[gentoo-commits] proj/gcc-patches:master commit in: 11.4.0/gentoo/
commit: b8eab6cef231c608a4857db592b347cd6f4b0cae Author: Sam James gentoo org> AuthorDate: Thu Apr 27 23:38:41 2023 + Commit: Sam James gentoo org> CommitDate: Thu Apr 27 23:54:13 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=b8eab6ce 11.4.0: add miscompilation patch (77_all_all_PR109585_13_rtl-alias-analysis-typo) Signed-off-by: Sam James gentoo.org> ...l_all_PR109585_13_rtl-alias-analysis-typo.patch | 79 ++ 11.4.0/gentoo/README.history | 9 ++- 2 files changed, 85 insertions(+), 3 deletions(-) diff --git a/11.4.0/gentoo/77_all_all_PR109585_13_rtl-alias-analysis-typo.patch b/11.4.0/gentoo/77_all_all_PR109585_13_rtl-alias-analysis-typo.patch new file mode 100644 index 000..b7b57d6 --- /dev/null +++ b/11.4.0/gentoo/77_all_all_PR109585_13_rtl-alias-analysis-typo.patch @@ -0,0 +1,79 @@ +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109609 +https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=ef6051b36241bf130bf76af0b775248635dc616e + +From ef6051b36241bf130bf76af0b775248635dc616e Mon Sep 17 00:00:00 2001 +From: Richard Biener +Date: Mon, 24 Apr 2023 13:31:07 +0200 +Subject: [PATCH] rtl-optimization/109585 - alias analysis typo + +When r10-514-gc6b84edb6110dd2b4fb improved access path analysis +it introduced a typo that triggers when there's an access to a +trailing array in the first access path leading to false +disambiguation. + + PR rtl-optimization/109585 + * tree-ssa-alias.c (aliasing_component_refs_p): Fix typo. + + * gcc.dg/torture/pr109585.c: New testcase. + +(cherry picked from commit 6d4bd27a60447c7505cb4783e675e98a191a8904) +--- + gcc/testsuite/gcc.dg/torture/pr109585.c | 33 + + gcc/tree-ssa-alias.c | 2 +- + 2 files changed, 34 insertions(+), 1 deletion(-) + create mode 100644 gcc/testsuite/gcc.dg/torture/pr109585.c + +diff --git a/gcc/testsuite/gcc.dg/torture/pr109585.c b/gcc/testsuite/gcc.dg/torture/pr109585.c +new file mode 100644 +index 000..f92de7c1f2e +--- /dev/null b/gcc/testsuite/gcc.dg/torture/pr109585.c +@@ -0,0 +1,33 @@ ++/* { dg-do run } */ ++ ++#include ++ ++struct P { ++long v; ++struct P *n; ++}; ++ ++struct F { ++long x; ++struct P fam[]; ++}; ++ ++int __attribute__((noipa)) ++f(struct F *f, int i) ++{ ++ struct P *p = f->fam; ++ asm("" : "+r"(f): "r"(p)); ++ p->v = 0; ++ p->n = 0; ++ return f->fam->n != 0; ++} ++ ++int ++main() ++{ ++ struct F *m = malloc (sizeof (long) + 2 * sizeof (struct P)); ++ m->fam[0].n = >fam[1]; ++ if (f (m, 0)) ++abort (); ++ return 0; ++} +diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c +index b1e7a2d5afc..be7b597266f 100644 +--- a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c +@@ -1326,7 +1326,7 @@ aliasing_component_refs_p (tree ref1, + /* If we didn't find a common base, try the other way around. */ + if (cmp_outer <= 0 + || (end_struct_ref1 +-&& compare_type_sizes (TREE_TYPE (end_struct_ref1), type1) <= 0)) ++&& compare_type_sizes (TREE_TYPE (end_struct_ref1), type2) <= 0)) + { + int res = aliasing_component_refs_walk (ref2, type2, base2, + offset2, max_size2, +-- +2.31.1 diff --git a/11.4.0/gentoo/README.history b/11.4.0/gentoo/README.history index 5c06066..a5fca96 100644 --- a/11.4.0/gentoo/README.history +++ b/11.4.0/gentoo/README.history @@ -1,11 +1,14 @@ -8 28 Jan 2022 +9 28 Apr 2023 + + 77_all_all_PR109585_13_rtl-alias-analysis-typo.patch + +8 28 Jan 2023 - 77_all_driver_environ_putenv_PR106624.patch -7 23 Jan 2022 +7 23 Jan 2023 - 26_all_enable-cet.patch + 77_all_driver_environ_putenv_PR106624.patch -6 7 Jan 2022 +6 7 Jan 2023 - 77_all_configure-c89.patch 5 17 Dec 2022
[gentoo-commits] proj/gcc-patches:master commit in: 13.2.0/gentoo/
commit: 28d2380b495e99daca3b01ca9e6a73a623a2f3d2 Author: Sam James gentoo org> AuthorDate: Wed Apr 26 20:38:52 2023 + Commit: Sam James gentoo org> CommitDate: Wed Apr 26 20:38:52 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=28d2380b 13.2.0: drop upstream patches We only put them in here to include in 13.1.0-r1. They're already on releases/gcc-13. Signed-off-by: Sam James gentoo.org> ...573_13_ICE-in-vectorizable_live_operation.patch | 134 - ...l_all_PR109585_13_rtl-alias-analysis-typo.patch | 68 --- .../77_all_all_PR109609_13_tail-call-fnspec.patch | 105 3 files changed, 307 deletions(-) diff --git a/13.2.0/gentoo/75_all_all_PR109573_13_ICE-in-vectorizable_live_operation.patch b/13.2.0/gentoo/75_all_all_PR109573_13_ICE-in-vectorizable_live_operation.patch deleted file mode 100644 index 31abade..000 --- a/13.2.0/gentoo/75_all_all_PR109573_13_ICE-in-vectorizable_live_operation.patch +++ /dev/null @@ -1,134 +0,0 @@ -https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=263d1ed0484fc81d3f93e39cdd2f9eb0ce4d3e88 -https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109573 -https://bugs.gentoo.org/904455 - -kFrom 263d1ed0484fc81d3f93e39cdd2f9eb0ce4d3e88 Mon Sep 17 00:00:00 2001 -From: Richard Biener -Date: Fri, 21 Apr 2023 12:57:17 +0200 -Subject: [PATCH] tree-optimization/109573 - avoid ICEing on unexpected live - def - -The following relaxes the assert in vectorizable_live_operation -where we catch currently unhandled cases to also allow an -intermediate copy as it happens here but also relax the assert -to checking only. - - PR tree-optimization/109573 - * tree-vect-loop.cc (vectorizable_live_operation): Allow - unhandled SSA copy as well. Demote assert to checking only. - - * g++.dg/vect/pr109573.cc: New testcase. - -(cherry picked from commit cddfe6bc40b3dc0806e260bbfb4cac82d609a258) /dev/null -+++ b/gcc/testsuite/g++.dg/vect/pr109573.cc -@@ -0,0 +1,91 @@ -+// { dg-do compile } -+// { dg-require-effective-target c++20 } -+ -+void *operator new(__SIZE_TYPE__, void *__p) { return __p; } -+template struct _Head_base { -+ _Head _M_head_impl; -+}; -+template struct _Tuple_impl; -+template -+struct _Tuple_impl<_Idx, _Head, _Tail...> : _Tuple_impl<_Idx + 1, _Tail...>, -+_Head_base<_Head> { -+ template -+ _Tuple_impl(_UHead __head, _UTail... __tail) -+ : _Tuple_impl<_Idx + 1, _Tail...>(__tail...), _Head_base<_Head>(__head) {} -+}; -+template struct _Tuple_impl<_Idx, _Head> { -+ template _Tuple_impl(_UHead); -+}; -+template struct tuple : _Tuple_impl<0, _Elements...> { -+ template -+ tuple(_UElements... __elements) -+ : _Tuple_impl<0, _Elements...>(__elements...) {} -+}; -+unsigned long position_; -+struct Zone { -+ template T *New(Args... args) { -+return new (reinterpret_cast(position_)) T(args...); -+ } -+}; -+struct Label { -+ int pos_; -+ int near_link_pos_; -+}; -+enum Condition { below_equal }; -+void bind(Label *); -+Zone *zone(); -+unsigned long deopt_info_address(); -+int MakeDeferredCode___trans_tmp_2, MakeDeferredCode___trans_tmp_3, -+Prologue___trans_tmp_6, MakeDeferredCode___trans_tmp_1; -+struct MaglevAssembler { -+ template -+ void MakeDeferredCode(Function &&, Args &&...); -+ template -+ void JumpToDeferredIf(Condition, Function, Args... args) { -+MakeDeferredCode(Function(), args...); -+ } -+ void Prologue(); -+}; -+struct ZoneLabelRef { -+ ZoneLabelRef(Zone *zone) : label_(zone->New()) {} -+ ZoneLabelRef(MaglevAssembler *) : ZoneLabelRef(zone()) {} -+ Label *operator*() { return label_; } -+ Label *label_; -+}; -+template -+struct FunctionArgumentsTupleHelper -+: FunctionArgumentsTupleHelper {}; -+template -+struct FunctionArgumentsTupleHelper { -+ using Tuple = tuple; -+}; -+template struct StripFirstTupleArg; -+template -+struct StripFirstTupleArg> { -+ using Stripped = tuple; -+}; -+template struct DeferredCodeInfoImpl { -+ template -+ DeferredCodeInfoImpl(int *, int, int, Function, InArgs... args) -+ : args(args...) {} -+ StripFirstTupleArg< -+ typename FunctionArgumentsTupleHelper::Tuple>::Stripped args; -+}; -+template -+void MaglevAssembler::MakeDeferredCode(Function &_code_gen, -+ Args &&...args) { -+ zone()->New>( -+ ___trans_tmp_1, MakeDeferredCode___trans_tmp_2, -+ MakeDeferredCode___trans_tmp_3, deferred_code_gen, args...); -+} -+void MaglevAssembler::Prologue() { -+ int *__trans_tmp_9; -+ ZoneLabelRef deferred_call_stack_guard_return(this); -+ __trans_tmp_9 = reinterpret_cast(deopt_info_address()); -+ JumpToDeferredIf( -+ below_equal, [](MaglevAssembler, int *, ZoneLabelRef, int, int) {}, -+ __trans_tmp_9, deferred_call_stack_guard_return, Prologue___trans_tmp_6, -+ 0); -+ Label __trans_tmp_7 = **deferred_call_stack_guard_return; -+ bind(&__trans_tmp_7); -+}
[gentoo-commits] proj/gcc-patches:master commit in: 13.2.0/gentoo/, 13.2.0/musl/
commit: 7546d8be5a8ae93e81535644c2578807db276ab6 Author: Sam James gentoo org> AuthorDate: Wed Apr 26 13:10:32 2023 + Commit: Sam James gentoo org> CommitDate: Wed Apr 26 13:11:21 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=7546d8be 13.2.0: add Clone of 13.1.0 with: + 75_all_all_PR109573_13_ICE-in-vectorizable_live_operation.patch (ICE) + 76_all_all_PR109585_13_rtl-alias-analysis-typo.patch (miscompilation) + 77_all_all_PR109609_13_tail-call-fnspec.patch (miscompilation) Signed-off-by: Sam James gentoo.org> 13.2.0/gentoo/01_all_default-fortify-source.patch | 26 +++ .../02_all_default-warn-format-security.patch | 22 +++ .../gentoo/03_all_default-warn-trampolines.patch | 13 ++ 13.2.0/gentoo/04_all_nossp-on-nostdlib.patch | 27 +++ 13.2.0/gentoo/05_all_alpha-mieee-default.patch | 39 + 13.2.0/gentoo/06_all_ia64_note.GNU-stack.patch | 92 ++ 13.2.0/gentoo/07_all_libiberty-asprintf.patch | 18 ++ 13.2.0/gentoo/08_all_libiberty-pic.patch | 10 ++ 13.2.0/gentoo/09_all_nopie-all-flags.patch | 18 ++ 13.2.0/gentoo/10_all_sh-drop-sysroot-suffix.patch | 26 +++ 13.2.0/gentoo/11_all_ia64-TEXTREL.patch| 22 +++ 13.2.0/gentoo/14_all_respect-build-cxxflags.patch | 39 + .../15_all_DEF_GENTOO_GLIBCXX_ASSERTIONS.patch | 14 ++ 13.2.0/gentoo/20_all_libstdcxx-no-vtv.patch| 61 +++ 13.2.0/gentoo/22_all_default_ssp-buffer-size.patch | 14 ++ 13.2.0/gentoo/23_all_DEF_GENTOO_ZNOW-z-now.patch | 26 +++ ...ll_DEF_GENTOO_SCP-fstack-clash-protection.patch | 65 +++ .../25_all_lto-intl-workaround-PR95194.patch | 20 +++ 13.2.0/gentoo/26_all_enable-cet.patch | 193 + 13.2.0/gentoo/28_all_drop_CFLAGS_sed.patch | 35 13.2.0/gentoo/29_all_msgfmt-libstdc++-link.patch | 39 + 13.2.0/gentoo/30_all_tar_libstdc++-link.patch | 57 ++ 13.2.0/gentoo/31_all_gm2_make_P_var.patch | 49 ++ ...573_13_ICE-in-vectorizable_live_operation.patch | 134 ++ ...l_all_PR109585_13_rtl-alias-analysis-typo.patch | 68 .../77_all_all_PR109609_13_tail-call-fnspec.patch | 105 +++ 13.2.0/gentoo/README.history | 28 +++ 13.2.0/musl/25_all_multilib_pure64.patch | 83 + 13.2.0/musl/50_all_cpu_indicator.patch | 37 13.2.0/musl/50_all_libssp_unconditionally.patch| 24 +++ 13.2.0/musl/50_all_posix_memalign.patch| 28 +++ 13.2.0/musl/README.history | 6 + 32 files changed, 1438 insertions(+) diff --git a/13.2.0/gentoo/01_all_default-fortify-source.patch b/13.2.0/gentoo/01_all_default-fortify-source.patch new file mode 100644 index 000..4cdf5f6 --- /dev/null +++ b/13.2.0/gentoo/01_all_default-fortify-source.patch @@ -0,0 +1,26 @@ +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.cc b/gcc/c-family/c-cppbuiltin.cc +@@ -1510,6 +1510,16 @@ 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) ++ #ifndef GENTOO_FORTIFY_SOURCE_LEVEL ++#define GENTOO_FORTIFY_SOURCE_LEVEL 2 ++ #endif ++ ++ /* F_S enabled by default for optimization levels > 0, except for ASAN: https://github.com/google/sanitizers/issues/247 */ ++ if (optimize && ! (flag_sanitize & SANITIZE_ADDRESS)) ++builtin_define_with_int_value ("_FORTIFY_SOURCE", GENTOO_FORTIFY_SOURCE_LEVEL); ++#endif ++ + /* Misc. */ + if (flag_gnu89_inline) + cpp_define (pfile, "__GNUC_GNU_INLINE__"); diff --git a/13.2.0/gentoo/02_all_default-warn-format-security.patch b/13.2.0/gentoo/02_all_default-warn-format-security.patch new file mode 100644 index 000..9723a1c --- /dev/null +++ b/13.2.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 b/gcc/c-family/c.opt +@@ -696,7 +696,7 @@ Warn about function calls with format strings that write past the end + of the destination region. Same as -Wformat-overflow=1. + + 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 +@@ -717,7 +717,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++ +
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/musl/
commit: a33f8322ffd4b0826e3e3024ad67860335cdfac0 Author: Sam James gentoo org> AuthorDate: Sun Apr 23 23:03:17 2023 + Commit: Sam James gentoo org> CommitDate: Sun Apr 23 23:03:17 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=a33f8322 14.0.0: add musl patches too Clone of 13.1.0. Signed-off-by: Sam James gentoo.org> 14.0.0/musl/25_all_multilib_pure64.patch| 83 + 14.0.0/musl/50_all_cpu_indicator.patch | 37 +++ 14.0.0/musl/50_all_libssp_unconditionally.patch | 24 +++ 14.0.0/musl/50_all_posix_memalign.patch | 28 + 14.0.0/musl/README.history | 6 ++ 5 files changed, 178 insertions(+) diff --git a/14.0.0/musl/25_all_multilib_pure64.patch b/14.0.0/musl/25_all_multilib_pure64.patch new file mode 100644 index 000..d55c04c --- /dev/null +++ b/14.0.0/musl/25_all_multilib_pure64.patch @@ -0,0 +1,83 @@ +https://bugs.gentoo.org/675954 +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90077 + +--- a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux +@@ -22,7 +22,7 @@ + LIB1ASMFUNCS = _aarch64_sync_cache_range + + AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be) +-MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu) ++MULTILIB_OSDIRNAMES = mabi.lp64=../lib + MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu) + + MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32) +--- a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64 +@@ -33,6 +33,6 @@ + comma=, + MULTILIB_OPTIONS= $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) + MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) +-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu) +-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu) +-MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32) ++MULTILIB_OSDIRNAMES = m64=../lib ++MULTILIB_OSDIRNAMES+= m32=../lib32 ++MULTILIB_OSDIRNAMES+= mx32=../libx32 +--- a/gcc/config/rs6000/t-linux b/gcc/config/rs6000/t-linux +@@ -2,7 +2,8 @@ + # or soft-float. + ifeq (,$(filter $(with_cpu),$(SOFT_FLOAT_CPUS))$(findstring soft,$(with_float))) + ifneq (,$(findstring powerpc64,$(target))) +-MULTILIB_OSDIRNAMES := .=../lib64$(call if_multiarch,:powerpc64-linux-gnu) ++MULTILIB_OSDIRNAMES := m64=../lib ++MULTILIB_OSDIRNAMES += m32=../lib32 + else + MULTIARCH_DIRNAME := $(call if_multiarch,powerpc-linux-gnu) + endif +@@ -10,7 +11,8 @@ + MULTIARCH_DIRNAME := $(subst -linux,le-linux,$(MULTIARCH_DIRNAME)) + endif + ifneq (,$(findstring powerpc64le,$(target))) +-MULTILIB_OSDIRNAMES := $(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES)) ++MULTILIB_OSDIRNAMES := m64=../lib ++MULTILIB_OSDIRNAMES += m32=../lib32 + endif + endif + +--- a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64 +@@ -28,8 +28,8 @@ + MULTILIB_OPTIONS:= m64/m32 + MULTILIB_DIRNAMES := 64 32 + MULTILIB_EXTRA_OPTS := +-MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu) +-MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu) ++MULTILIB_OSDIRNAMES := m64=../lib ++MULTILIB_OSDIRNAMES += m32=../lib32 + + rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c + $(COMPILE) $< +--- a/gcc/config/rs6000/t-linux64bele b/gcc/config/rs6000/t-linux64bele +@@ -2,6 +2,6 @@ + + MULTILIB_OPTIONS+= mlittle + MULTILIB_DIRNAMES += le +-MULTILIB_OSDIRNAMES += $(subst =,.mlittle=,$(subst lible32,lib32le,$(subst lible64,lib64le,$(subst lib,lible,$(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES)) +-MULTILIB_OSDIRNAMES += $(subst $(if $(findstring 64,$(target)),m64,m32).,,$(filter $(if $(findstring 64,$(target)),m64,m32).mlittle%,$(MULTILIB_OSDIRNAMES))) ++MULTILIB_OSDIRNAMES = m64=../lib ++MULTILIB_OSDIRNAMES+= m32=../lib32 + MULTILIB_MATCHES:= ${MULTILIB_MATCHES_ENDIAN} +--- a/gcc/config/rs6000/t-linux64lebe b/gcc/config/rs6000/t-linux64lebe +@@ -2,6 +2,6 @@ + + MULTILIB_OPTIONS+= mbig + MULTILIB_DIRNAMES += be +-MULTILIB_OSDIRNAMES += $(subst =,.mbig=,$(subst libbe32,lib32be,$(subst libbe64,lib64be,$(subst lib,libbe,$(subst le-linux,-linux,$(MULTILIB_OSDIRNAMES)) +-MULTILIB_OSDIRNAMES += $(subst $(if $(findstring 64,$(target)),m64,m32).,,$(filter $(if $(findstring 64,$(target)),m64,m32).mbig%,$(MULTILIB_OSDIRNAMES))) ++MULTILIB_OSDIRNAMES := m64=../lib ++MULTILIB_OSDIRNAMES += m32=../lib32 + MULTILIB_MATCHES:= ${MULTILIB_MATCHES_ENDIAN} diff --git a/14.0.0/musl/50_all_cpu_indicator.patch b/14.0.0/musl/50_all_cpu_indicator.patch new file mode 100644 index 000..52e8b92 --- /dev/null +++ b/14.0.0/musl/50_all_cpu_indicator.patch @@
[gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
commit: b00cfbdaa4cc20d38bf779109ef351925e878921 Author: Sam James gentoo org> AuthorDate: Sun Apr 23 22:52:29 2023 + Commit: Sam James gentoo org> CommitDate: Sun Apr 23 22:52:29 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=b00cfbda 14.0.0: add initial patchset Clone of 13.1.0 modulo dropping M2 patch. Signed-off-by: Sam James gentoo.org> 14.0.0/gentoo/01_all_default-fortify-source.patch | 26 +++ .../02_all_default-warn-format-security.patch | 22 +++ .../gentoo/03_all_default-warn-trampolines.patch | 13 ++ 14.0.0/gentoo/04_all_nossp-on-nostdlib.patch | 27 +++ 14.0.0/gentoo/05_all_alpha-mieee-default.patch | 39 + 14.0.0/gentoo/06_all_ia64_note.GNU-stack.patch | 92 ++ 14.0.0/gentoo/07_all_libiberty-asprintf.patch | 18 ++ 14.0.0/gentoo/08_all_libiberty-pic.patch | 10 ++ 14.0.0/gentoo/09_all_nopie-all-flags.patch | 18 ++ 14.0.0/gentoo/10_all_sh-drop-sysroot-suffix.patch | 26 +++ 14.0.0/gentoo/11_all_ia64-TEXTREL.patch| 22 +++ 14.0.0/gentoo/14_all_respect-build-cxxflags.patch | 39 + .../15_all_DEF_GENTOO_GLIBCXX_ASSERTIONS.patch | 14 ++ 14.0.0/gentoo/20_all_libstdcxx-no-vtv.patch| 61 +++ 14.0.0/gentoo/22_all_default_ssp-buffer-size.patch | 14 ++ 14.0.0/gentoo/23_all_DEF_GENTOO_ZNOW-z-now.patch | 26 +++ ...ll_DEF_GENTOO_SCP-fstack-clash-protection.patch | 65 +++ .../25_all_lto-intl-workaround-PR95194.patch | 20 +++ 14.0.0/gentoo/26_all_enable-cet.patch | 193 + 14.0.0/gentoo/28_all_drop_CFLAGS_sed.patch | 35 14.0.0/gentoo/29_all_msgfmt-libstdc++-link.patch | 39 + 14.0.0/gentoo/30_all_tar_libstdc++-link.patch | 57 ++ 14.0.0/gentoo/README.history | 24 +++ 23 files changed, 900 insertions(+) diff --git a/14.0.0/gentoo/01_all_default-fortify-source.patch b/14.0.0/gentoo/01_all_default-fortify-source.patch new file mode 100644 index 000..4cdf5f6 --- /dev/null +++ b/14.0.0/gentoo/01_all_default-fortify-source.patch @@ -0,0 +1,26 @@ +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.cc b/gcc/c-family/c-cppbuiltin.cc +@@ -1510,6 +1510,16 @@ 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) ++ #ifndef GENTOO_FORTIFY_SOURCE_LEVEL ++#define GENTOO_FORTIFY_SOURCE_LEVEL 2 ++ #endif ++ ++ /* F_S enabled by default for optimization levels > 0, except for ASAN: https://github.com/google/sanitizers/issues/247 */ ++ if (optimize && ! (flag_sanitize & SANITIZE_ADDRESS)) ++builtin_define_with_int_value ("_FORTIFY_SOURCE", GENTOO_FORTIFY_SOURCE_LEVEL); ++#endif ++ + /* Misc. */ + if (flag_gnu89_inline) + cpp_define (pfile, "__GNUC_GNU_INLINE__"); diff --git a/14.0.0/gentoo/02_all_default-warn-format-security.patch b/14.0.0/gentoo/02_all_default-warn-format-security.patch new file mode 100644 index 000..9723a1c --- /dev/null +++ b/14.0.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 b/gcc/c-family/c.opt +@@ -696,7 +696,7 @@ Warn about function calls with format strings that write past the end + of the destination region. Same as -Wformat-overflow=1. + + 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 +@@ -717,7 +717,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++ + 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 UInteger Var(warn_format) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2) + Warn about printf/scanf/strftime/strfmon format string anomalies. + + Wformat-overflow= diff --git a/14.0.0/gentoo/03_all_default-warn-trampolines.patch b/14.0.0/gentoo/03_all_default-warn-trampolines.patch new file mode 100644 index 000..fb6d8bc --- /dev/null +++ b/14.0.0/gentoo/03_all_default-warn-trampolines.patch @@ -0,0 +1,13 @@ +Enable -Wtrampolines by default. + +--- a/gcc/common.opt b/gcc/common.opt +@@
[gentoo-commits] proj/gcc-patches:master commit in: 12.2.0/gentoo/
commit: ffa606b25a8535e81f34e661ef0da04dee80d72b Author: Sam James gentoo org> AuthorDate: Sat Apr 22 10:35:44 2023 + Commit: Sam James gentoo org> CommitDate: Sat Apr 22 10:35:44 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=ffa606b2 12.2.0: add chromium ICE patch Bug: https://bugs.gentoo.org/904455 Signed-off-by: Sam James gentoo.org> ...573_12_ICE-in-vectorizable_live_operation.patch | 131 + 12.2.0/gentoo/README.history | 3 + 2 files changed, 134 insertions(+) diff --git a/12.2.0/gentoo/76_all_all_PR109573_12_ICE-in-vectorizable_live_operation.patch b/12.2.0/gentoo/76_all_all_PR109573_12_ICE-in-vectorizable_live_operation.patch new file mode 100644 index 000..bf3b48a --- /dev/null +++ b/12.2.0/gentoo/76_all_all_PR109573_12_ICE-in-vectorizable_live_operation.patch @@ -0,0 +1,131 @@ +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109573 +https://bugs.gentoo.org/904455 + +From cddfe6bc40b3dc0806e260bbfb4cac82d609a258 Mon Sep 17 00:00:00 2001 +From: Richard Biener +Date: Fri, 21 Apr 2023 12:57:17 +0200 +Subject: [PATCH] tree-optimization/109573 - avoid ICEing on unexpected live + def + +The following relaxes the assert in vectorizable_live_operation +where we catch currently unhandled cases to also allow an +intermediate copy as it happens here but also relax the assert +to checking only. + + PR tree-optimization/109573 + * tree-vect-loop.cc (vectorizable_live_operation): Allow + unhandled SSA copy as well. Demote assert to checking only. + + * g++.dg/vect/pr109573.cc: New testcase. +--- /dev/null b/gcc/testsuite/g++.dg/vect/pr109573.cc +@@ -0,0 +1,91 @@ ++// { dg-do compile } ++// { dg-require-effective-target c++20 } ++ ++void *operator new(__SIZE_TYPE__, void *__p) { return __p; } ++template struct _Head_base { ++ _Head _M_head_impl; ++}; ++template struct _Tuple_impl; ++template ++struct _Tuple_impl<_Idx, _Head, _Tail...> : _Tuple_impl<_Idx + 1, _Tail...>, ++_Head_base<_Head> { ++ template ++ _Tuple_impl(_UHead __head, _UTail... __tail) ++ : _Tuple_impl<_Idx + 1, _Tail...>(__tail...), _Head_base<_Head>(__head) {} ++}; ++template struct _Tuple_impl<_Idx, _Head> { ++ template _Tuple_impl(_UHead); ++}; ++template struct tuple : _Tuple_impl<0, _Elements...> { ++ template ++ tuple(_UElements... __elements) ++ : _Tuple_impl<0, _Elements...>(__elements...) {} ++}; ++unsigned long position_; ++struct Zone { ++ template T *New(Args... args) { ++return new (reinterpret_cast(position_)) T(args...); ++ } ++}; ++struct Label { ++ int pos_; ++ int near_link_pos_; ++}; ++enum Condition { below_equal }; ++void bind(Label *); ++Zone *zone(); ++unsigned long deopt_info_address(); ++int MakeDeferredCode___trans_tmp_2, MakeDeferredCode___trans_tmp_3, ++Prologue___trans_tmp_6, MakeDeferredCode___trans_tmp_1; ++struct MaglevAssembler { ++ template ++ void MakeDeferredCode(Function &&, Args &&...); ++ template ++ void JumpToDeferredIf(Condition, Function, Args... args) { ++MakeDeferredCode(Function(), args...); ++ } ++ void Prologue(); ++}; ++struct ZoneLabelRef { ++ ZoneLabelRef(Zone *zone) : label_(zone->New()) {} ++ ZoneLabelRef(MaglevAssembler *) : ZoneLabelRef(zone()) {} ++ Label *operator*() { return label_; } ++ Label *label_; ++}; ++template ++struct FunctionArgumentsTupleHelper ++: FunctionArgumentsTupleHelper {}; ++template ++struct FunctionArgumentsTupleHelper { ++ using Tuple = tuple; ++}; ++template struct StripFirstTupleArg; ++template ++struct StripFirstTupleArg> { ++ using Stripped = tuple; ++}; ++template struct DeferredCodeInfoImpl { ++ template ++ DeferredCodeInfoImpl(int *, int, int, Function, InArgs... args) ++ : args(args...) {} ++ StripFirstTupleArg< ++ typename FunctionArgumentsTupleHelper::Tuple>::Stripped args; ++}; ++template ++void MaglevAssembler::MakeDeferredCode(Function &_code_gen, ++ Args &&...args) { ++ zone()->New>( ++ ___trans_tmp_1, MakeDeferredCode___trans_tmp_2, ++ MakeDeferredCode___trans_tmp_3, deferred_code_gen, args...); ++} ++void MaglevAssembler::Prologue() { ++ int *__trans_tmp_9; ++ ZoneLabelRef deferred_call_stack_guard_return(this); ++ __trans_tmp_9 = reinterpret_cast(deopt_info_address()); ++ JumpToDeferredIf( ++ below_equal, [](MaglevAssembler, int *, ZoneLabelRef, int, int) {}, ++ __trans_tmp_9, deferred_call_stack_guard_return, Prologue___trans_tmp_6, ++ 0); ++ Label __trans_tmp_7 = **deferred_call_stack_guard_return; ++ bind(&__trans_tmp_7); ++} +--- a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc +@@ -10114,9 +10114,10 @@ vectorizable_live_operation (vec_info *vinfo, + use_stmt)) + { + enum tree_code code = gimple_assign_rhs_code (use_stmt); +-
[gentoo-commits] proj/gcc-patches:master commit in: 13.1.0/gentoo/
commit: 8468b2fa05288d77bed2b59800b3153c71569cae Author: Sam James gentoo org> AuthorDate: Sun Apr 23 02:34:38 2023 + Commit: Sam James gentoo org> CommitDate: Sun Apr 23 02:34:38 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=8468b2fa 13.1.0: rebase 26_all_enable-cet.patch Signed-off-by: Sam James gentoo.org> 13.1.0/gentoo/26_all_enable-cet.patch | 32 13.1.0/gentoo/README.history | 1 + 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/13.1.0/gentoo/26_all_enable-cet.patch b/13.1.0/gentoo/26_all_enable-cet.patch index a6976c4..b13abab 100644 --- a/13.1.0/gentoo/26_all_enable-cet.patch +++ b/13.1.0/gentoo/26_all_enable-cet.patch @@ -11,7 +11,7 @@ Needs: Only supported on amd64. --- a/gcc/cp/lang-specs.h +++ b/gcc/cp/lang-specs.h -@@ -51,7 +51,7 @@ +@@ -51,7 +51,7 @@ along with GCC; see the file COPYING3. If not see " %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}" " %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}" " %{fmodules-ts:-fmodule-header %{fpreprocessed:-fdirectives-only}}" @@ -20,7 +20,7 @@ Only supported on amd64. " %{!fsyntax-only:" "%{!S:-o %g.s%V}" "%{!fmodule-*:%{!fmodules-*:%{!fdump-ada-spec*:" -@@ -72,7 +72,7 @@ +@@ -72,7 +72,7 @@ along with GCC; see the file COPYING3. If not see " %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}" " %{fmodules-ts:-fmodule-header=system" "%{fpreprocessed:-fdirectives-only}}" @@ -29,7 +29,7 @@ Only supported on amd64. " %{!fsyntax-only:" "%{!S:-o %g.s%V}" "%{!fmodule-*:%{!fmodules-*:%{!fdump-ada-spec*:" -@@ -92,7 +92,7 @@ +@@ -92,7 +92,7 @@ along with GCC; see the file COPYING3. If not see " %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}" " %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}" " %{fmodules-ts:-fmodule-header=user %{fpreprocessed:-fdirectives-only}}" @@ -38,7 +38,7 @@ Only supported on amd64. " %{!fsyntax-only:" "%{!S:-o %g.s%V}" "%{!fmodule-*:%{!fmodules-*:%{!fdump-ada-spec*:" -@@ -107,7 +107,7 @@ +@@ -107,7 +107,7 @@ along with GCC; see the file COPYING3. If not see " cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed" " %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}" " %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}" @@ -47,7 +47,7 @@ Only supported on amd64. " %{!fsyntax-only:" "%{fmodule-only:%{!S:-o %g.s%V}}" "%{!fmodule-only:%(invoke_as)}}" -@@ -116,7 +116,7 @@ +@@ -116,7 +116,7 @@ along with GCC; see the file COPYING3. If not see {".ii", "@c++-cpp-output", 0, 0, 0}, {"@c++-cpp-output", "%{!E:%{!M:%{!MM:" @@ -58,7 +58,7 @@ Only supported on amd64. "%{!fmodule-only:%{!fmodule-header*:%(invoke_as)}}}" --- a/gcc/gcc.cc +++ b/gcc/gcc.cc -@@ -987,6 +987,18 @@ +@@ -994,6 +994,18 @@ proper position among the other output files. */ #define LINK_NOW_SPEC "" #endif @@ -77,15 +77,15 @@ Only supported on amd64. #ifdef ENABLE_DEFAULT_PIE #define PIE_SPEC "!no-pie" #define NO_FPIE1_SPEC "fno-pie" -@@ -1189,6 +1201,7 @@ - static const char *cc1_spec = CC1_SPEC; +@@ -1196,6 +1208,7 @@ static const char *cpp_spec = CPP_SPEC; + static const char *cc1_spec = CC1_SPEC OS_CC1_SPEC; static const char *cc1plus_spec = CC1PLUS_SPEC; static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC; +static const char *default_flag_cf_spec = DEFAULT_FLAG_CF_SPEC; static const char *link_ssp_spec = LINK_SSP_SPEC; static const char *asm_spec = ASM_SPEC; static const char *asm_final_spec = ASM_FINAL_SPEC; -@@ -1247,7 +1260,7 @@ +@@ -1254,7 +1267,7 @@ static const char *cpp_options = "%(cpp_unique_options) %1 %{m*} %{std*} %{W**} %{w}\ %{f*} %{g*:%{%:debug-level-gt(0):%{g*}\ %{!fno-working-directory:-fworking-directory}}} %{O*}\ @@ -94,7 +94,7 @@ Only supported on amd64. /* Pass -d* flags, possibly modifying -dumpdir, -dumpbase et al. -@@ -1440,9 +1453,9 @@ +@@ -1448,9 +1461,9 @@ static const struct compiler default_compilers[] = %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \ %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\ cc1 -fpreprocessed %{save-temps*:%b.i} %{!save-temps*:%g.i} \ @@ -106,7 +106,7 @@ Only supported on amd64. %{!fsyntax-only:%(invoke_as)", 0, 0, 1}, {"-", "%{!E:%e-E or -x required when input is from standard input}\ -@@ -1467,7 +1480,7 @@ +@@ -1475,7 +1488,7 @@ static const struct compiler default_compilers[] = %W{o*:--output-pch %*}}%V}}}", 0, 0, 0}, {".i", "@cpp-output", 0, 0, 0}, {"@cpp-output", @@ -115,7 +115,7 @@ Only supported on amd64. {".s", "@assembler", 0, 0, 0},
[gentoo-commits] proj/gcc-patches:master commit in: 13.1.0/gentoo/
commit: 81920212528349b41e7e413592bfb1dbbad68638 Author: Sam James gentoo org> AuthorDate: Sun Apr 23 02:29:34 2023 + Commit: Sam James gentoo org> CommitDate: Sun Apr 23 02:29:34 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=81920212 13.1.0: add 31_all_gm2_make_P_var.patch Bug: https://bugs.gentoo.org/904714 Signed-off-by: Sam James gentoo.org> 13.1.0/gentoo/31_all_gm2_make_P_var.patch | 49 +++ 13.1.0/gentoo/README.history | 3 ++ 2 files changed, 52 insertions(+) diff --git a/13.1.0/gentoo/31_all_gm2_make_P_var.patch b/13.1.0/gentoo/31_all_gm2_make_P_var.patch new file mode 100644 index 000..c977874 --- /dev/null +++ b/13.1.0/gentoo/31_all_gm2_make_P_var.patch @@ -0,0 +1,49 @@ +https://bugs.gentoo.org/904714 +https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=79c73122fab213f218b85b2c579ffe3cf5e98ad0 + +From 79c73122fab213f218b85b2c579ffe3cf5e98ad0 Mon Sep 17 00:00:00 2001 +From: =?utf8?q?Arsen=20Arsenovi=C4=87?= +Date: Fri, 21 Apr 2023 18:07:29 +0200 +Subject: [PATCH] gcc/m2: Drop references to $(P) + +$(P) seems to have been a workaround for some old, proprietary make +implementations that we no longer support. It was removed in +r0-31149-gb8dad04b688e9c. + +gcc/m2/ChangeLog: + + * Make-lang.in: Remove references to $(P). + * Make-maintainer.in: Ditto. +--- a/gcc/m2/Make-lang.in b/gcc/m2/Make-lang.in +@@ -514,7 +514,7 @@ GM2_LIBS_BOOT = m2/gm2-compiler-boot/gm2.a \ + cc1gm2$(exeext): m2/stage1/cc1gm2$(exeext) $(m2.prev) + cp -p $< $@ + +-m2/stage2/cc1gm2$(exeext): m2/stage1/cc1gm2$(exeext) m2/gm2-compiler/m2flex.o $(P) \ ++m2/stage2/cc1gm2$(exeext): m2/stage1/cc1gm2$(exeext) m2/gm2-compiler/m2flex.o \ + $(GM2_C_OBJS) $(BACKEND) $(LIBDEPS) $(GM2_LIBS) \ + m2/gm2-gcc/rtegraph.o plugin/m2rte$(soext) + -test -d $(@D) || $(mkinstalldirs) $(@D) +@@ -527,7 +527,7 @@ m2/stage2/cc1gm2$(exeext): m2/stage1/cc1gm2$(exeext) m2/gm2-compiler/m2flex.o $( + @$(call LINK_PROGRESS,$(INDEX.m2),end) + + m2/stage1/cc1gm2$(exeext): gm2$(exeext) m2/gm2-compiler-boot/m2flex.o \ +-$(P) $(GM2_C_OBJS) $(BACKEND) $(LIBDEPS) \ ++$(GM2_C_OBJS) $(BACKEND) $(LIBDEPS) \ + $(GM2_LIBS_BOOT) $(MC_LIBS) \ + m2/gm2-gcc/rtegraph.o plugin/m2rte$(soext) \ + $(m2.prev) +--- a/gcc/m2/Make-maintainer.in b/gcc/m2/Make-maintainer.in +@@ -753,7 +753,7 @@ GM2_LIBS_PARANOID = m2/gm2-compiler-paranoid/gm2.a \ + gm2.paranoid: m2/m2obj3/cc1gm2$(exeext) gm2.verifyparanoid + + m2/m2obj3/cc1gm2$(exeext): m2/m2obj2/cc1gm2$(exeext) m2/gm2-compiler-paranoid/m2flex.o \ +-$(P) $(GM2_C_OBJS) $(BACKEND) $(LIBDEPS) $(GM2_LIBS_PARANOID) \ ++$(GM2_C_OBJS) $(BACKEND) $(LIBDEPS) $(GM2_LIBS_PARANOID) \ + m2/gm2-gcc/rtegraph.o plugin/m2rte$(exeext).so m2/gm2-libs-boot/M2LINK.o + -test -d m2/m2obj3 || $(mkinstalldirs) m2/m2obj3 + @$(call LINK_PROGRESS,$(INDEX.m2),start) +-- +2.31.1 diff --git a/13.1.0/gentoo/README.history b/13.1.0/gentoo/README.history index efcdcf7..26027e1 100644 --- a/13.1.0/gentoo/README.history +++ b/13.1.0/gentoo/README.history @@ -1,3 +1,6 @@ +10 23 Apr 2023 + + 31_all_gm2_make_P_var.patch + 9 13 Mar 2023 U 01_all_default-fortify-source.patch
[gentoo-commits] proj/gcc-patches:master commit in: 13.1.0/gentoo/
commit: b37b9b3a61f788973ae156a1fcddd0d108879a7b Author: Sam James gentoo org> AuthorDate: Mon Mar 13 21:49:45 2023 + Commit: Sam James gentoo org> CommitDate: Mon Mar 13 21:50:51 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=b37b9b3a 13.1.0: don't set _FORTIFY_SOURCE if -fsanitize=address (ASAN) is enabled This can cause either false positives in warnings from the compiler or false negatives where the sanitizer misses something. Bug: https://github.com/google/sanitizers/issues/247 Signed-off-by: Sam James gentoo.org> 13.1.0/gentoo/01_all_default-fortify-source.patch | 4 ++-- 13.1.0/gentoo/README.history | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/13.1.0/gentoo/01_all_default-fortify-source.patch b/13.1.0/gentoo/01_all_default-fortify-source.patch index 79d6639..4cdf5f6 100644 --- a/13.1.0/gentoo/01_all_default-fortify-source.patch +++ b/13.1.0/gentoo/01_all_default-fortify-source.patch @@ -16,8 +16,8 @@ initially Gentoo used too complicated macro. +#define GENTOO_FORTIFY_SOURCE_LEVEL 2 + #endif + -+ /* Fortify Source enabled by default for optimization levels > 0 */ -+ if (optimize) ++ /* F_S enabled by default for optimization levels > 0, except for ASAN: https://github.com/google/sanitizers/issues/247 */ ++ if (optimize && ! (flag_sanitize & SANITIZE_ADDRESS)) +builtin_define_with_int_value ("_FORTIFY_SOURCE", GENTOO_FORTIFY_SOURCE_LEVEL); +#endif + diff --git a/13.1.0/gentoo/README.history b/13.1.0/gentoo/README.history index f0ee005..efcdcf7 100644 --- a/13.1.0/gentoo/README.history +++ b/13.1.0/gentoo/README.history @@ -1,3 +1,6 @@ +9 13 Mar 2023 + U 01_all_default-fortify-source.patch + 8 12 Feb 2023 - 76_all_all_PR107461_cxx_equivalence_non_dependent_calls.patch
[gentoo-commits] proj/gcc-patches:master commit in: 12.2.0/gentoo/
commit: 202b3e4a5c76f24591de79b99580bd547c71ec6b Author: Sam James gentoo org> AuthorDate: Mon Mar 13 21:53:26 2023 + Commit: Sam James gentoo org> CommitDate: Mon Mar 13 21:53:26 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=202b3e4a 12.2.0: don't set _FORTIFY_SOURCE if -fsanitize=address (ASAN) is enabled This can cause either false positives in warnings from the compiler or false negatives where the sanitizer misses something. Bug: https://github.com/google/sanitizers/issues/247 Signed-off-by: Sam James gentoo.org> 12.2.0/gentoo/01_all_default-fortify-source.patch | 4 ++-- 12.2.0/gentoo/README.history | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/12.2.0/gentoo/01_all_default-fortify-source.patch b/12.2.0/gentoo/01_all_default-fortify-source.patch index 79d6639..4cdf5f6 100644 --- a/12.2.0/gentoo/01_all_default-fortify-source.patch +++ b/12.2.0/gentoo/01_all_default-fortify-source.patch @@ -16,8 +16,8 @@ initially Gentoo used too complicated macro. +#define GENTOO_FORTIFY_SOURCE_LEVEL 2 + #endif + -+ /* Fortify Source enabled by default for optimization levels > 0 */ -+ if (optimize) ++ /* F_S enabled by default for optimization levels > 0, except for ASAN: https://github.com/google/sanitizers/issues/247 */ ++ if (optimize && ! (flag_sanitize & SANITIZE_ADDRESS)) +builtin_define_with_int_value ("_FORTIFY_SOURCE", GENTOO_FORTIFY_SOURCE_LEVEL); +#endif + diff --git a/12.2.0/gentoo/README.history b/12.2.0/gentoo/README.history index fcae351..23576e0 100644 --- a/12.2.0/gentoo/README.history +++ b/12.2.0/gentoo/README.history @@ -1,3 +1,6 @@ +14 13 Mar 2023 + U 01_all_default-fortify-source.patch + 13 12 Feb 2023 - 76_all_all_PR107461_cxx_equivalence_non_dependent_calls.patch
[gentoo-commits] proj/gcc-patches:master commit in: 13.1.0/musl/
commit: 27495bc8fe028d4a68e97ad12b52231772e48dcf Author: Sam James gentoo org> AuthorDate: Thu Feb 23 19:06:50 2023 + Commit: Sam James gentoo org> CommitDate: Thu Feb 23 19:06:50 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=27495bc8 13.1.0: add upstreaming context for 50_all_cpu_indicator.patch Signed-off-by: Sam James gentoo.org> 13.1.0/musl/50_all_cpu_indicator.patch | 2 ++ 1 file changed, 2 insertions(+) diff --git a/13.1.0/musl/50_all_cpu_indicator.patch b/13.1.0/musl/50_all_cpu_indicator.patch index a7d199f..52e8b92 100644 --- a/13.1.0/musl/50_all_cpu_indicator.patch +++ b/13.1.0/musl/50_all_cpu_indicator.patch @@ -1,3 +1,5 @@ +https://gcc.gnu.org/pipermail/gcc-patches/2023-February/612648.html + From d16a8ceb1c3c8a7ec381090b4c316ff4c55661c0 Mon Sep 17 00:00:00 2001 From: Date: Thu, 7 May 2020 21:14:11 -0500
[gentoo-commits] proj/gcc-patches:master commit in: 13.1.0/gentoo/
commit: bf0284c2cabb418102edbec30bc9134865674c29 Author: Sam James gentoo org> AuthorDate: Sun Feb 12 23:04:42 2023 + Commit: Sam James gentoo org> CommitDate: Sun Feb 12 23:04:42 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=bf0284c2 13.1.0: cut 8 patchset Just drops the merged-upstream 76_all_all_PR107461_cxx_equivalence_non_dependent_calls.patch. Signed-off-by: Sam James gentoo.org> 13.1.0/gentoo/README.history | 3 +++ 1 file changed, 3 insertions(+) diff --git a/13.1.0/gentoo/README.history b/13.1.0/gentoo/README.history index 3780f77..f0ee005 100644 --- a/13.1.0/gentoo/README.history +++ b/13.1.0/gentoo/README.history @@ -1,3 +1,6 @@ +8 12 Feb 2023 + - 76_all_all_PR107461_cxx_equivalence_non_dependent_calls.patch + 7 6 Feb 2023 + 75_all_all_PR107461_cxx_equivalence_non_dependent_calls.patch
[gentoo-commits] proj/gcc-patches:master commit in: 8.5.0/gentoo/
commit: bddbb0244be56ccdd3827ee418c651e59f7a0c11 Author: Sam James gentoo org> AuthorDate: Wed Feb 8 01:08:06 2023 + Commit: Sam James gentoo org> CommitDate: Wed Feb 8 01:08:14 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=bddbb024 8.5.0: add 33_all_msgfmt-libstdc++-link.patch Bug: https://bugs.gentoo.org/892816 Signed-off-by: Sam James gentoo.org> 8.5.0/gentoo/33_all_msgfmt-libstdc++-link.patch | 39 + 8.5.0/gentoo/README.history | 3 +- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/8.5.0/gentoo/33_all_msgfmt-libstdc++-link.patch b/8.5.0/gentoo/33_all_msgfmt-libstdc++-link.patch new file mode 100644 index 000..0d2f113 --- /dev/null +++ b/8.5.0/gentoo/33_all_msgfmt-libstdc++-link.patch @@ -0,0 +1,39 @@ +Ensure that msgfmt doesn't encounter problems during gcc bootstrapping. + +Solves error messages like the following: + +msgfmt: /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/./gcc/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/libstdc++.so.6) + +The libgcc_s.so used during build doesn't satisfy the needs of the +libstdc++.so that msgfmt is linked against. On the other hand, msgfmt +is used as a stand-alone application here, and what library it uses +behind the scenes is of no concern to the gcc build process. +Therefore, simply invoking it "as usual", i.e. without any special +library path, will make it work as expected here. + +2011-09-19 Martin von Gagern + +References: +https://bugs.gentoo.org/372377 +https://bugs.gentoo.org/295480 +https://bugs.gentoo.org/843119 +--- a/libstdc++-v3/po/Makefile.am b/libstdc++-v3/po/Makefile.am +@@ -39,6 +39,7 @@ MSGFMT = msgfmt + EXTRA_DIST = string_literals.cc POTFILES.in $(PACKAGE).pot $(LOCALE_IN) + + .po.mo: ++ env --unset=LD_LIBRARY_PATH \ + $(MSGFMT) -o $@ $< + + all-local: all-local-$(USE_NLS) +--- a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in +@@ -419,6 +419,7 @@ uninstall-am: uninstall-info-am + + + .po.mo: ++ env --unset=LD_LIBRARY_PATH \ + $(MSGFMT) -o $@ $< + + all-local: all-local-$(USE_NLS) diff --git a/8.5.0/gentoo/README.history b/8.5.0/gentoo/README.history index b2d4c99..1466fd7 100644 --- a/8.5.0/gentoo/README.history +++ b/8.5.0/gentoo/README.history @@ -1,6 +1,7 @@ -3 TODO +4 08 Feb 2023 + 31_all_powerpcspe-pie-crt.patch + 32_all_powerpcspe-march-PLATFORM.patch + + 33_all_msgfmt-libstdc++-link.patch 2 05 July 2021 + 30_all_remove-cyclades.patch
[gentoo-commits] proj/gcc-patches:master commit in: 9.5.0/gentoo/
commit: 19c4c47cef978f07b4a605aa772f4478751d2e63 Author: Sam James gentoo org> AuthorDate: Wed Feb 8 01:09:01 2023 + Commit: Sam James gentoo org> CommitDate: Wed Feb 8 01:09:01 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=19c4c47c 9.5.0: add 31_all_msgfmt-libstdc++-link.patch Bug: https://bugs.gentoo.org/892816 Signed-off-by: Sam James gentoo.org> 9.5.0/gentoo/31_all_msgfmt-libstdc++-link.patch | 39 + 9.5.0/gentoo/README.history | 3 ++ 2 files changed, 42 insertions(+) diff --git a/9.5.0/gentoo/31_all_msgfmt-libstdc++-link.patch b/9.5.0/gentoo/31_all_msgfmt-libstdc++-link.patch new file mode 100644 index 000..0d2f113 --- /dev/null +++ b/9.5.0/gentoo/31_all_msgfmt-libstdc++-link.patch @@ -0,0 +1,39 @@ +Ensure that msgfmt doesn't encounter problems during gcc bootstrapping. + +Solves error messages like the following: + +msgfmt: /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/./gcc/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/libstdc++.so.6) + +The libgcc_s.so used during build doesn't satisfy the needs of the +libstdc++.so that msgfmt is linked against. On the other hand, msgfmt +is used as a stand-alone application here, and what library it uses +behind the scenes is of no concern to the gcc build process. +Therefore, simply invoking it "as usual", i.e. without any special +library path, will make it work as expected here. + +2011-09-19 Martin von Gagern + +References: +https://bugs.gentoo.org/372377 +https://bugs.gentoo.org/295480 +https://bugs.gentoo.org/843119 +--- a/libstdc++-v3/po/Makefile.am b/libstdc++-v3/po/Makefile.am +@@ -39,6 +39,7 @@ MSGFMT = msgfmt + EXTRA_DIST = string_literals.cc POTFILES.in $(PACKAGE).pot $(LOCALE_IN) + + .po.mo: ++ env --unset=LD_LIBRARY_PATH \ + $(MSGFMT) -o $@ $< + + all-local: all-local-$(USE_NLS) +--- a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in +@@ -419,6 +419,7 @@ uninstall-am: uninstall-info-am + + + .po.mo: ++ env --unset=LD_LIBRARY_PATH \ + $(MSGFMT) -o $@ $< + + all-local: all-local-$(USE_NLS) diff --git a/9.5.0/gentoo/README.history b/9.5.0/gentoo/README.history index a5308d6..a084063 100644 --- a/9.5.0/gentoo/README.history +++ b/9.5.0/gentoo/README.history @@ -1,3 +1,6 @@ +2 08 Feb 202 + + 31_all_msgfmt-libstdc++-link.patch + 1 15 Aug 2022 + 01_all_default-fortify-source.patch + 02_all_default-warn-format-security.patch
[gentoo-commits] proj/gcc-patches:master commit in: 12.2.0/gentoo/
commit: 16a112b3a16ac49e4cca0455580dae243ccd3a9f Author: Sam James gentoo org> AuthorDate: Sun Feb 12 02:38:23 2023 + Commit: Sam James gentoo org> CommitDate: Sun Feb 12 02:38:23 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=16a112b3 12.2.0: cut 13 patchset Just drops the merged-upstream 76_all_all_PR107461_cxx_equivalence_non_dependent_calls.patch. Signed-off-by: Sam James gentoo.org> 12.2.0/gentoo/README.history | 3 +++ 1 file changed, 3 insertions(+) diff --git a/12.2.0/gentoo/README.history b/12.2.0/gentoo/README.history index 4437361..fcae351 100644 --- a/12.2.0/gentoo/README.history +++ b/12.2.0/gentoo/README.history @@ -1,3 +1,6 @@ +13 12 Feb 2023 + - 76_all_all_PR107461_cxx_equivalence_non_dependent_calls.patch + 12 6 Feb 2023 + 76_all_all_PR107461_cxx_equivalence_non_dependent_calls.patch
[gentoo-commits] proj/gcc-patches:master commit in: 13.1.0/gentoo/
commit: 509584e51a55ea61364a88081d11d93062cfd29c Author: Sam James gentoo org> AuthorDate: Mon Feb 6 18:35:37 2023 + Commit: Sam James gentoo org> CommitDate: Mon Feb 6 18:35:37 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=509584e5 13.1.0: drop 75_all_all_PR107461_cxx_equivalence_non_dependent_calls.patch (upstream) Drop now that we created 12.x and 13.x patchsets with this in, as it's in the git repo now and keeping it in gcc-patches.git will break live ebuilds. Will be in next snapshot too as a result. Signed-off-by: Sam James gentoo.org> ...07461_cxx_equivalence_non_dependent_calls.patch | 174 - 1 file changed, 174 deletions(-) diff --git a/13.1.0/gentoo/75_all_all_PR107461_cxx_equivalence_non_dependent_calls.patch b/13.1.0/gentoo/75_all_all_PR107461_cxx_equivalence_non_dependent_calls.patch deleted file mode 100644 index 0a421a1..000 --- a/13.1.0/gentoo/75_all_all_PR107461_cxx_equivalence_non_dependent_calls.patch +++ /dev/null @@ -1,174 +0,0 @@ -https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=31924665c86d47af6b1f22a74f594f2e1dc0ed2d -(followup to https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=59e0376f607805ef9b67fd7b0a4a3084ab3571a5) -https://bugs.gentoo.org/893410 - -From 31924665c86d47af6b1f22a74f594f2e1dc0ed2d Mon Sep 17 00:00:00 2001 -From: Patrick Palka -Date: Sun, 5 Feb 2023 21:35:33 -0500 -Subject: [PATCH] c++: equivalence of non-dependent calls [PR107461] - -After r13-5684-g59e0376f607805 the (pruned) callee of a non-dependent -CALL_EXPR is a bare FUNCTION_DECL rather than ADDR_EXPR of FUNCTION_DECL. -This innocent change revealed that cp_tree_equal doesn't first check -dependence of a CALL_EXPR before treating a FUNCTION_DECL callee as a -dependent name, which leads to us incorrectly accepting the first two -testcases below and rejecting the third: - - * In the first testcase, cp_tree_equal incorrectly returns true for - the two non-dependent CALL_EXPRs f(0) and f(0) (whose CALL_EXPR_FN - are different FUNCTION_DECLs) which causes us to treat #2 as a - redeclaration of #1. - - * Same issue in the second testcase, for f() and f(). - - * In the third testcase, cp_tree_equal incorrectly returns true for - f() and f() which causes us to conflate the two - dependent specializations A()(U()))> and - A()(U()))>. - -This patch fixes this by making called_fns_equal treat two callees as -dependent names only if the overall CALL_EXPRs are dependent, via a new -convenience function call_expr_dependent_name that is like dependent_name -but also checks dependence of the overall CALL_EXPR. - - PR c++/107461 - -gcc/cp/ChangeLog: - - * cp-tree.h (call_expr_dependent_name): Declare. - * pt.cc (iterative_hash_template_arg) : Use - call_expr_dependent_name instead of dependent_name. - * tree.cc (call_expr_dependent_name): Define. - (called_fns_equal): Adjust to take two CALL_EXPRs instead of - CALL_EXPR_FNs thereof. Use call_expr_dependent_name instead - of dependent_name. - (cp_tree_equal) : Adjust call to called_fns_equal. - -gcc/testsuite/ChangeLog: - - * g++.dg/cpp0x/overload5.C: New test. - * g++.dg/cpp0x/overload5a.C: New test. - * g++.dg/cpp0x/overload6.C: New test. a/gcc/cp/cp-tree.h -+++ b/gcc/cp/cp-tree.h -@@ -7902,6 +7902,7 @@ extern tree lookup_maybe_add (tree fns, tree lookup, - extern int is_overloaded_fn (tree) ATTRIBUTE_PURE; - extern bool really_overloaded_fn (tree) ATTRIBUTE_PURE; - extern tree dependent_name(tree); -+extern tree call_expr_dependent_name (tree); - extern tree maybe_get_fns (tree) ATTRIBUTE_PURE; - extern tree get_fns (tree) ATTRIBUTE_PURE; - extern tree get_first_fn (tree) ATTRIBUTE_PURE; a/gcc/cp/pt.cc -+++ b/gcc/cp/pt.cc -@@ -1841,7 +1841,7 @@ iterative_hash_template_arg (tree arg, hashval_t val) - case CALL_EXPR: - { - tree fn = CALL_EXPR_FN (arg); -- if (tree name = dependent_name (fn)) -+ if (tree name = call_expr_dependent_name (arg)) - { - if (TREE_CODE (fn) == TEMPLATE_ID_EXPR) - val = iterative_hash_template_arg (TREE_OPERAND (fn, 1), val); a/gcc/cp/tree.cc -+++ b/gcc/cp/tree.cc -@@ -2608,6 +2608,18 @@ dependent_name (tree x) - return NULL_TREE; - } - -+/* Like dependent_name, but instead takes a CALL_EXPR and also checks -+ its dependence. */ -+ -+tree -+call_expr_dependent_name (tree x) -+{ -+ if (TREE_TYPE (x) != NULL_TREE) -+/* X isn't dependent, so its callee isn't a dependent name. */ -+return NULL_TREE; -+ return dependent_name (CALL_EXPR_FN (x)); -+} -+ - /* Returns true iff X is an expression for an overloaded function -whose type cannot be known without performing overload -resolution. */ -@@ -3870,16 +3882,18 @@ decl_internal_context_p
[gentoo-commits] proj/gcc-patches:master commit in: 12.2.0/gentoo/
commit: 1ec59690c89168a5afe9ac29b0eb43a39eb4ba5b Author: Sam James gentoo org> AuthorDate: Mon Feb 6 18:36:22 2023 + Commit: Sam James gentoo org> CommitDate: Mon Feb 6 18:36:22 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=1ec59690 12.2.0: drop 76_all_all_PR107461_cxx_equivalence_non_dependent_calls.patch (upstream) Drop now that we created 12.x and 13.x patchsets with this in, as it's in the git repo now and keeping it in gcc-patches.git will break live ebuilds. Will be in next snapshot too as a result. Signed-off-by: Sam James gentoo.org> ...07461_cxx_equivalence_non_dependent_calls.patch | 204 - 1 file changed, 204 deletions(-) diff --git a/12.2.0/gentoo/76_all_all_PR107461_cxx_equivalence_non_dependent_calls.patch b/12.2.0/gentoo/76_all_all_PR107461_cxx_equivalence_non_dependent_calls.patch deleted file mode 100644 index b34cd4a..000 --- a/12.2.0/gentoo/76_all_all_PR107461_cxx_equivalence_non_dependent_calls.patch +++ /dev/null @@ -1,204 +0,0 @@ -https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=31924665c86d47af6b1f22a74f594f2e1dc0ed2d -(12 version: https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=eda24f6c12b6d3777ff3bf3656187e695a3e8dc2) -(followup to https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=59e0376f607805ef9b67fd7b0a4a3084ab3571a5) -https://bugs.gentoo.org/893410 - -From eda24f6c12b6d3777ff3bf3656187e695a3e8dc2 Mon Sep 17 00:00:00 2001 -From: Patrick Palka -Date: Sun, 5 Feb 2023 21:35:33 -0500 -Subject: [PATCH] c++: equivalence of non-dependent calls [PR107461] - -After r13-5684-g59e0376f607805 the (pruned) callee of a non-dependent -CALL_EXPR is a bare FUNCTION_DECL rather than ADDR_EXPR of FUNCTION_DECL. -This innocent change revealed that cp_tree_equal doesn't first check -dependence of a CALL_EXPR before treating a FUNCTION_DECL callee as a -dependent name, which leads to us incorrectly accepting the first two -testcases below and rejecting the third: - - * In the first testcase, cp_tree_equal incorrectly returns true for - the two non-dependent CALL_EXPRs f(0) and f(0) (whose CALL_EXPR_FN - are different FUNCTION_DECLs) which causes us to treat #2 as a - redeclaration of #1. - - * Same issue in the second testcase, for f() and f(). - - * In the third testcase, cp_tree_equal incorrectly returns true for - f() and f() which causes us to conflate the two - dependent specializations A()(U()))> and - A()(U()))>. - -This patch fixes this by making called_fns_equal treat two callees as -dependent names only if the overall CALL_EXPRs are dependent, via a new -convenience function call_expr_dependent_name that is like dependent_name -but also checks dependence of the overall CALL_EXPR. - - PR c++/107461 - -gcc/cp/ChangeLog: - - * cp-tree.h (call_expr_dependent_name): Declare. - * pt.cc (iterative_hash_template_arg) : Use - call_expr_dependent_name instead of dependent_name. - * tree.cc (call_expr_dependent_name): Define. - (called_fns_equal): Adjust to take two CALL_EXPRs instead of - CALL_EXPR_FNs thereof. Use call_expr_dependent_name instead - of dependent_name. - (cp_tree_equal) : Adjust call to called_fns_equal. - -gcc/testsuite/ChangeLog: - - * g++.dg/cpp0x/overload5.C: New test. - * g++.dg/cpp0x/overload5a.C: New test. - * g++.dg/cpp0x/overload6.C: New test. - -(cherry picked from commit 31924665c86d47af6b1f22a74f594f2e1dc0ed2d) - gcc/cp/cp-tree.h| 1 + - gcc/cp/pt.cc| 2 +- - gcc/cp/tree.cc | 24 +++- - gcc/testsuite/g++.dg/cpp0x/overload5.C | 12 - gcc/testsuite/g++.dg/cpp0x/overload5a.C | 10 ++ - gcc/testsuite/g++.dg/cpp0x/overload6.C | 16 - 6 files changed, 59 insertions(+), 6 deletions(-) - create mode 100644 gcc/testsuite/g++.dg/cpp0x/overload5.C - create mode 100644 gcc/testsuite/g++.dg/cpp0x/overload5a.C - create mode 100644 gcc/testsuite/g++.dg/cpp0x/overload6.C - -diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h -index cd51dd288b0..40563a151fe 100644 a/gcc/cp/cp-tree.h -+++ b/gcc/cp/cp-tree.h -@@ -7860,6 +7860,7 @@ extern tree lookup_maybe_add (tree fns, tree lookup, - extern int is_overloaded_fn (tree) ATTRIBUTE_PURE; - extern bool really_overloaded_fn (tree) ATTRIBUTE_PURE; - extern tree dependent_name(tree); -+extern tree call_expr_dependent_name (tree); - extern tree maybe_get_fns (tree) ATTRIBUTE_PURE; - extern tree get_fns (tree) ATTRIBUTE_PURE; - extern tree get_first_fn (tree) ATTRIBUTE_PURE; -diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc -index 735c106c7d6..0af7033589a 100644 a/gcc/cp/pt.cc -+++ b/gcc/cp/pt.cc -@@ -1910,7 +1910,7 @@ iterative_hash_template_arg (tree arg, hashval_t val) - case CALL_EXPR: -
[gentoo-commits] proj/gcc-patches:master commit in: 13.1.0/gentoo/
commit: 3f8fa89d582a0d56ab4eac414552aed99cec6751 Author: Sam James gentoo org> AuthorDate: Mon Feb 6 17:32:01 2023 + Commit: Sam James gentoo org> CommitDate: Mon Feb 6 17:32:01 2023 + URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=3f8fa89d 13.1.0: add 75_all_all_PR107461_cxx_equivalence_non_dependent_calls.patch Bug: https://bugs.gentoo.org/893410 Signed-off-by: Sam James gentoo.org> ...07461_cxx_equivalence_non_dependent_calls.patch | 174 + 13.1.0/gentoo/README.history | 3 + 2 files changed, 177 insertions(+) diff --git a/13.1.0/gentoo/75_all_all_PR107461_cxx_equivalence_non_dependent_calls.patch b/13.1.0/gentoo/75_all_all_PR107461_cxx_equivalence_non_dependent_calls.patch new file mode 100644 index 000..0a421a1 --- /dev/null +++ b/13.1.0/gentoo/75_all_all_PR107461_cxx_equivalence_non_dependent_calls.patch @@ -0,0 +1,174 @@ +https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=31924665c86d47af6b1f22a74f594f2e1dc0ed2d +(followup to https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=59e0376f607805ef9b67fd7b0a4a3084ab3571a5) +https://bugs.gentoo.org/893410 + +From 31924665c86d47af6b1f22a74f594f2e1dc0ed2d Mon Sep 17 00:00:00 2001 +From: Patrick Palka +Date: Sun, 5 Feb 2023 21:35:33 -0500 +Subject: [PATCH] c++: equivalence of non-dependent calls [PR107461] + +After r13-5684-g59e0376f607805 the (pruned) callee of a non-dependent +CALL_EXPR is a bare FUNCTION_DECL rather than ADDR_EXPR of FUNCTION_DECL. +This innocent change revealed that cp_tree_equal doesn't first check +dependence of a CALL_EXPR before treating a FUNCTION_DECL callee as a +dependent name, which leads to us incorrectly accepting the first two +testcases below and rejecting the third: + + * In the first testcase, cp_tree_equal incorrectly returns true for + the two non-dependent CALL_EXPRs f(0) and f(0) (whose CALL_EXPR_FN + are different FUNCTION_DECLs) which causes us to treat #2 as a + redeclaration of #1. + + * Same issue in the second testcase, for f() and f(). + + * In the third testcase, cp_tree_equal incorrectly returns true for + f() and f() which causes us to conflate the two + dependent specializations A()(U()))> and + A()(U()))>. + +This patch fixes this by making called_fns_equal treat two callees as +dependent names only if the overall CALL_EXPRs are dependent, via a new +convenience function call_expr_dependent_name that is like dependent_name +but also checks dependence of the overall CALL_EXPR. + + PR c++/107461 + +gcc/cp/ChangeLog: + + * cp-tree.h (call_expr_dependent_name): Declare. + * pt.cc (iterative_hash_template_arg) : Use + call_expr_dependent_name instead of dependent_name. + * tree.cc (call_expr_dependent_name): Define. + (called_fns_equal): Adjust to take two CALL_EXPRs instead of + CALL_EXPR_FNs thereof. Use call_expr_dependent_name instead + of dependent_name. + (cp_tree_equal) : Adjust call to called_fns_equal. + +gcc/testsuite/ChangeLog: + + * g++.dg/cpp0x/overload5.C: New test. + * g++.dg/cpp0x/overload5a.C: New test. + * g++.dg/cpp0x/overload6.C: New test. +--- a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h +@@ -7902,6 +7902,7 @@ extern tree lookup_maybe_add (tree fns, tree lookup, + extern int is_overloaded_fn (tree) ATTRIBUTE_PURE; + extern bool really_overloaded_fn (tree) ATTRIBUTE_PURE; + extern tree dependent_name(tree); ++extern tree call_expr_dependent_name (tree); + extern tree maybe_get_fns (tree) ATTRIBUTE_PURE; + extern tree get_fns (tree) ATTRIBUTE_PURE; + extern tree get_first_fn (tree) ATTRIBUTE_PURE; +--- a/gcc/cp/pt.cc b/gcc/cp/pt.cc +@@ -1841,7 +1841,7 @@ iterative_hash_template_arg (tree arg, hashval_t val) + case CALL_EXPR: + { + tree fn = CALL_EXPR_FN (arg); +- if (tree name = dependent_name (fn)) ++ if (tree name = call_expr_dependent_name (arg)) + { + if (TREE_CODE (fn) == TEMPLATE_ID_EXPR) + val = iterative_hash_template_arg (TREE_OPERAND (fn, 1), val); +--- a/gcc/cp/tree.cc b/gcc/cp/tree.cc +@@ -2608,6 +2608,18 @@ dependent_name (tree x) + return NULL_TREE; + } + ++/* Like dependent_name, but instead takes a CALL_EXPR and also checks ++ its dependence. */ ++ ++tree ++call_expr_dependent_name (tree x) ++{ ++ if (TREE_TYPE (x) != NULL_TREE) ++/* X isn't dependent, so its callee isn't a dependent name. */ ++return NULL_TREE; ++ return dependent_name (CALL_EXPR_FN (x)); ++} ++ + /* Returns true iff X is an expression for an overloaded function +whose type cannot be known without performing overload +resolution. */ +@@ -3870,16 +3882,18 @@ decl_internal_context_p (const_tree decl) + return !TREE_PUBLIC (decl); + } + +-/* Subroutine of cp_tree_equal: t1 and t2 are the