From 59c07e6053e5211719a199a9094edc77eac9024e Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Sat, 23 May 2026 21:42:19 +0800 Subject: [PATCH] toolchain/gcc: use configure option to disable TM clone registry GCC 10 added the new configure option --disable-tm-clone-registry[1]. It is useful for reducing code size in embedded systems. Our local hack patch is no longer needed. [1] https://gcc.gnu.org/cgit/gcc/commit/?h=releases/gcc-10&id=5a4602805eb3ebddbc935b102481e63bffc7c5e6 Signed-off-by: Shiji Yang Link: https://github.com/openwrt/openwrt/pull/23494 Signed-off-by: Hauke Mehrtens --- toolchain/gcc/common.mk | 1 + toolchain/gcc/patches-13.x/881-no_tm_section.patch | 11 ----------- toolchain/gcc/patches-14.x/881-no_tm_section.patch | 11 ----------- toolchain/gcc/patches-15.x/881-no_tm_section.patch | 11 ----------- 4 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 toolchain/gcc/patches-13.x/881-no_tm_section.patch delete mode 100644 toolchain/gcc/patches-14.x/881-no_tm_section.patch delete mode 100644 toolchain/gcc/patches-15.x/881-no_tm_section.patch diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index b53c508dc7d..c122810d0b4 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -102,6 +102,7 @@ GCC_CONFIGURE:= \ --disable-libmpx \ --disable-nls \ --disable-libssp \ + --disable-tm-clone-registry \ $(GRAPHITE_CONFIGURE) \ --with-host-libstdcxx=-lstdc++ \ $(SOFT_FLOAT_CONFIG_OPTION) \ diff --git a/toolchain/gcc/patches-13.x/881-no_tm_section.patch b/toolchain/gcc/patches-13.x/881-no_tm_section.patch deleted file mode 100644 index 2029910fd07..00000000000 --- a/toolchain/gcc/patches-13.x/881-no_tm_section.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libgcc/crtstuff.c -+++ b/libgcc/crtstuff.c -@@ -152,7 +152,7 @@ call_ ## FUNC (void) \ - #endif - - #if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF) --# define USE_TM_CLONE_REGISTRY 1 -+# define USE_TM_CLONE_REGISTRY 0 - #elif !defined(USE_TM_CLONE_REGISTRY) - # define USE_TM_CLONE_REGISTRY 0 - #endif diff --git a/toolchain/gcc/patches-14.x/881-no_tm_section.patch b/toolchain/gcc/patches-14.x/881-no_tm_section.patch deleted file mode 100644 index 2029910fd07..00000000000 --- a/toolchain/gcc/patches-14.x/881-no_tm_section.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libgcc/crtstuff.c -+++ b/libgcc/crtstuff.c -@@ -152,7 +152,7 @@ call_ ## FUNC (void) \ - #endif - - #if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF) --# define USE_TM_CLONE_REGISTRY 1 -+# define USE_TM_CLONE_REGISTRY 0 - #elif !defined(USE_TM_CLONE_REGISTRY) - # define USE_TM_CLONE_REGISTRY 0 - #endif diff --git a/toolchain/gcc/patches-15.x/881-no_tm_section.patch b/toolchain/gcc/patches-15.x/881-no_tm_section.patch deleted file mode 100644 index 2029910fd07..00000000000 --- a/toolchain/gcc/patches-15.x/881-no_tm_section.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libgcc/crtstuff.c -+++ b/libgcc/crtstuff.c -@@ -152,7 +152,7 @@ call_ ## FUNC (void) \ - #endif - - #if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF) --# define USE_TM_CLONE_REGISTRY 1 -+# define USE_TM_CLONE_REGISTRY 0 - #elif !defined(USE_TM_CLONE_REGISTRY) - # define USE_TM_CLONE_REGISTRY 0 - #endif