From f806eafbe83ff7dd6f27d571bae57796050a71ed Mon Sep 17 00:00:00 2001 From: huyubiao Date: Mon, 9 Oct 2023 08:48:45 +0800 Subject: [PATCH] delete redundant code --- ...ngarch-support-not-upstream-modified.patch | 28 ++++++++----------- ...-sw_64-support-not-upstream-modified.patch | 16 +++++------ gc.spec | 13 +++++++-- 3 files changed, 30 insertions(+), 27 deletions(-) rename 0001-add-loongarch-architecture.patch => add-loongarch-support-not-upstream-modified.patch (83%) rename gc-8.0.6-sw.patch => add-sw_64-support-not-upstream-modified.patch (95%) mode change 100755 => 100644 diff --git a/0001-add-loongarch-architecture.patch b/add-loongarch-support-not-upstream-modified.patch similarity index 83% rename from 0001-add-loongarch-architecture.patch rename to add-loongarch-support-not-upstream-modified.patch index efaa7e0..9f222c3 100644 --- a/0001-add-loongarch-architecture.patch +++ b/add-loongarch-support-not-upstream-modified.patch @@ -5,15 +5,15 @@ Subject: [PATCH] add loongarch architecture --- configure.ac | 2 +- - include/private/gcconfig.h | 31 +++++++++++++++++++++++++++++++ + include/private/gcconfig.h | 27 +++++++++++++++++++++++++++ os_dep.c | 2 +- - 3 files changed, 33 insertions(+), 2 deletions(-) + 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac -index 2bc1282..7cc02a9 100644 +index 3b38e6f..8adfb3d 100644 --- a/configure.ac +++ b/configure.ac -@@ -208,7 +208,7 @@ case "$THREADS" in +@@ -201,7 +201,7 @@ case "$THREADS" in *-*-aix* | *-*-android* | *-*-cygwin* | *-*-darwin* | *-*-dragonfly* | \ *-*-freebsd* | *-*-haiku* | *-*-hpux11* | *-*-irix* | \ *-*-kfreebsd*-gnu | *-*-gnu* | *-*-*linux* | *-*-msys* | *-*-nacl* | \ @@ -23,25 +23,21 @@ index 2bc1282..7cc02a9 100644 AC_DEFINE([_REENTRANT], [1], [Required define if using POSIX threads.]) diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h -index b4457c1..5826ad5 100644 +index 1b6f46c..d765474 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h -@@ -226,6 +226,14 @@ EXTERN_C_BEGIN +@@ -238,6 +238,10 @@ EXTERN_C_BEGIN # define VAX # define mach_type_known # endif +# if defined(__loongarch64) +# define LOONGARCH64 +# define mach_type_known -+# endif -+# if defined(__loongarch64) -+# define LOONGARCH64 -+# define mach_type_known +# endif # if (defined(mips) || defined(__mips) || defined(_mips)) && !defined(__TANDEM) # define MIPS # if defined(nec_ews) || defined(_nec_ews) -@@ -518,6 +526,10 @@ EXTERN_C_BEGIN +@@ -522,6 +526,10 @@ EXTERN_C_BEGIN # define AARCH64 # define mach_type_known # endif @@ -52,7 +48,7 @@ index b4457c1..5826ad5 100644 # if defined(FREEBSD) && (defined(mips) || defined(__mips) || defined(_mips)) # define MIPS # define mach_type_known -@@ -1702,6 +1714,25 @@ EXTERN_C_BEGIN +@@ -1740,6 +1748,25 @@ EXTERN_C_BEGIN # define STACKBOTTOM ((ptr_t)0xfffff000) /* for Encore */ # endif @@ -79,10 +75,10 @@ index b4457c1..5826ad5 100644 # define MACH_TYPE "LoongArch" # ifdef LINUX diff --git a/os_dep.c b/os_dep.c -index e116ad0..947ac7f 100644 +index b183423..e18c9b9 100644 --- a/os_dep.c +++ b/os_dep.c -@@ -3239,7 +3239,7 @@ GC_API GC_push_other_roots_proc GC_CALL GC_get_push_other_roots(void) +@@ -3144,7 +3144,7 @@ GC_API GC_push_other_roots_proc GC_CALL GC_get_push_other_roots(void) # ifndef SEGV_ACCERR # define SEGV_ACCERR 2 # endif @@ -91,6 +87,6 @@ index e116ad0..947ac7f 100644 || __FreeBSD__ >= 7 # define CODE_OK (si -> si_code == SEGV_ACCERR) # elif defined(POWERPC) --- -2.27.0 +-- +2.41.0 diff --git a/gc-8.0.6-sw.patch b/add-sw_64-support-not-upstream-modified.patch old mode 100755 new mode 100644 similarity index 95% rename from gc-8.0.6-sw.patch rename to add-sw_64-support-not-upstream-modified.patch index 35883ef..c0cd282 --- a/gc-8.0.6-sw.patch +++ b/add-sw_64-support-not-upstream-modified.patch @@ -1,7 +1,7 @@ diff -Naur gc-8.0.6.org/config.guess gc-8.0.6.sw/config.guess --- gc-8.0.6.org/config.guess 2022-02-14 09:01:19.450000000 +0000 +++ gc-8.0.6.sw/config.guess 2022-02-15 02:27:24.780000000 +0000 -@@ -973,6 +973,14 @@ EOF +@@ -891,6 +891,14 @@ UNAME_MACHINE=aarch64_be GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; @@ -19,7 +19,7 @@ diff -Naur gc-8.0.6.org/config.guess gc-8.0.6.sw/config.guess diff -Naur gc-8.0.6.org/config.sub gc-8.0.6.sw/config.sub --- gc-8.0.6.org/config.sub 2022-02-14 09:01:19.450000000 +0000 +++ gc-8.0.6.sw/config.sub 2022-02-15 02:25:05.350000000 +0000 -@@ -1175,6 +1175,7 @@ case $cpu-$vendor in +@@ -248,6 +248,7 @@ case $cpu in 1750a | 580 \ | a29k \ @@ -30,7 +30,7 @@ diff -Naur gc-8.0.6.org/config.sub gc-8.0.6.sw/config.sub diff -Naur gc-8.0.6.org/extra/msvc_dbg.c gc-8.0.6.sw/extra/msvc_dbg.c --- gc-8.0.6.org/extra/msvc_dbg.c 2022-02-14 09:01:19.470000000 +0000 +++ gc-8.0.6.sw/extra/msvc_dbg.c 2022-02-15 02:32:56.220000000 +0000 -@@ -156,6 +156,9 @@ size_t GetStackFramesFromContext(HANDLE hProcess, HANDLE hThread, +@@ -149,6 +149,9 @@ #elif defined(_M_MRX000) machineType = IMAGE_FILE_MACHINE_R4000; stackFrame.AddrPC.Offset = context->Fir; @@ -40,7 +40,7 @@ diff -Naur gc-8.0.6.org/extra/msvc_dbg.c gc-8.0.6.sw/extra/msvc_dbg.c #elif defined(_M_ALPHA) machineType = IMAGE_FILE_MACHINE_ALPHA; stackFrame.AddrPC.Offset = (unsigned long)context->Fir; -@@ -165,6 +168,9 @@ size_t GetStackFramesFromContext(HANDLE hProcess, HANDLE hThread, +@@ -158,6 +161,9 @@ #elif defined(_M_IA64) machineType = IMAGE_FILE_MACHINE_IA64; stackFrame.AddrPC.Offset = context->StIIP; @@ -53,7 +53,7 @@ diff -Naur gc-8.0.6.org/extra/msvc_dbg.c gc-8.0.6.sw/extra/msvc_dbg.c diff -Naur gc-8.0.6.org/include/gc_config_macros.h gc-8.0.6.sw/include/gc_config_macros.h --- gc-8.0.6.org/include/gc_config_macros.h 2022-02-14 09:01:19.450000000 +0000 +++ gc-8.0.6.sw/include/gc_config_macros.h 2022-02-15 02:37:26.990000000 +0000 -@@ -96,7 +96,7 @@ +@@ -95,7 +95,7 @@ # define GC_FREEBSD_THREADS # elif defined(__NetBSD__) # define GC_NETBSD_THREADS @@ -77,7 +77,7 @@ diff -Naur gc-8.0.6.org/include/gc_tiny_fl.h gc-8.0.6.sw/include/gc_tiny_fl.h diff -Naur gc-8.0.6.org/include/private/gc_priv.h gc-8.0.6.sw/include/private/gc_priv.h --- gc-8.0.6.org/include/private/gc_priv.h 2022-02-14 09:01:19.440000000 +0000 +++ gc-8.0.6.sw/include/private/gc_priv.h 2022-02-15 02:40:15.270000000 +0000 -@@ -925,7 +925,7 @@ EXTERN_C_BEGIN +@@ -851,7 +851,7 @@ /* SMALL_CONFIG: Want less block-level fragmentation. */ #ifndef HBLKSIZE # if defined(LARGE_CONFIG) || !defined(SMALL_CONFIG) @@ -89,7 +89,7 @@ diff -Naur gc-8.0.6.org/include/private/gc_priv.h gc-8.0.6.sw/include/private/gc diff -Naur gc-8.0.6.org/include/private/gcconfig.h gc-8.0.6.sw/include/private/gcconfig.h --- gc-8.0.6.org/include/private/gcconfig.h 2022-02-14 09:01:19.440000000 +0000 +++ gc-8.0.6.sw/include/private/gcconfig.h 2022-02-15 02:45:28.230000000 +0000 -@@ -418,6 +418,14 @@ EXTERN_C_BEGIN +@@ -411,6 +411,14 @@ # define M32R # define mach_type_known # endif @@ -104,7 +104,7 @@ diff -Naur gc-8.0.6.org/include/private/gcconfig.h gc-8.0.6.sw/include/private/g # if defined(__alpha) || defined(__alpha__) # define ALPHA # if !defined(LINUX) && !defined(NETBSD) && !defined(OPENBSD) \ -@@ -1924,6 +1932,100 @@ EXTERN_C_BEGIN +@@ -1994,6 +2002,100 @@ # endif # endif /* HP_PA */ diff --git a/gc.spec b/gc.spec index acdedac..5845990 100644 --- a/gc.spec +++ b/gc.spec @@ -1,12 +1,13 @@ Name: gc Version: 8.2.4 -Release: 1 +Release: 2 Summary: A garbage collector for C and C++ License: BSD and GPLv1+ Url: http://www.hboehm.info/gc/ Source0: https://github.com/ivmai/bdwgc/releases/download/v%{version}/gc-%{version}.tar.gz -Patch1: gc-8.0.6-sw.patch -Patch2: 0001-add-loongarch-architecture.patch + +Patch1000: add-sw_64-support-not-upstream-modified.patch +Patch1001: add-loongarch-support-not-upstream-modified.patch BuildRequires: gcc gcc-c++ libtool @@ -75,6 +76,12 @@ make check %changelog +* Mon Oct 9 2023 huyubiao - 8.2.4-2 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:delete redundant code + * Sun Oct 8 2023 huyubiao - 8.2.4-1 - Update gc to 8.2.4 -- Gitee