diff --git a/0001-add-loongarch-architecture.patch b/0001-add-loongarch-architecture.patch index efaa7e01354cac3f3af072d57872de6b82ccc5c3..fef6ff681183a6d8a783b505f6f76e828f77f5e2 100644 --- a/0001-add-loongarch-architecture.patch +++ b/0001-add-loongarch-architecture.patch @@ -10,23 +10,23 @@ Subject: [PATCH] add loongarch architecture 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac -index 2bc1282..7cc02a9 100644 +index 0d08074..073d3c3 100644 --- a/configure.ac +++ b/configure.ac -@@ -208,7 +208,7 @@ case "$THREADS" in +@@ -213,7 +213,7 @@ case "$THREADS" in *-*-aix* | *-*-android* | *-*-cygwin* | *-*-darwin* | *-*-dragonfly* | \ *-*-freebsd* | *-*-haiku* | *-*-hpux11* | *-*-irix* | \ *-*-kfreebsd*-gnu | *-*-gnu* | *-*-*linux* | *-*-msys* | *-*-nacl* | \ -- *-*-netbsd* | *-*-openbsd* | *-*-osf* | *-*-solaris*) -+ *-*-netbsd* | *-*-openbsd* | *-*-osf* | *-*-solaris* | loongarch*) +- *-*-netbsd* | *-*-openbsd* | *-*-osf* | *-*-serenity* | *-*-solaris*) ++ *-*-netbsd* | *-*-openbsd* | *-*-osf* | *-*-serenity* | *-*-solaris* | loongarch*) AC_DEFINE(GC_THREADS) 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 bd3ca34..fdb548c 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h -@@ -226,6 +226,14 @@ EXTERN_C_BEGIN +@@ -236,6 +236,14 @@ EXTERN_C_BEGIN # define VAX # define mach_type_known # endif @@ -41,7 +41,7 @@ index b4457c1..5826ad5 100644 # 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 +@@ -537,6 +545,10 @@ EXTERN_C_BEGIN # define AARCH64 # define mach_type_known # endif @@ -52,10 +52,10 @@ 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 +@@ -1770,6 +1782,25 @@ EXTERN_C_BEGIN # define STACKBOTTOM ((ptr_t)0xfffff000) /* for Encore */ # endif - + +# ifdef LOONGARCH64 +# define MACH_TYPE "LOONGARCH64" +# ifdef LINUX @@ -79,10 +79,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 0650a3d..7b0d487 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) +@@ -3244,7 +3244,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 +91,3 @@ index e116ad0..947ac7f 100644 || __FreeBSD__ >= 7 # define CODE_OK (si -> si_code == SEGV_ACCERR) # elif defined(POWERPC) --- -2.27.0 - diff --git a/gc-8.0.6-sw.patch b/gc-8.2.10-sw.patch similarity index 80% rename from gc-8.0.6-sw.patch rename to gc-8.2.10-sw.patch index 35883ef209da8d26a2ba1001c8cc257a773054a7..19f6f93128408e555129c755f2468d3243ada901 100755 --- a/gc-8.0.6-sw.patch +++ b/gc-8.2.10-sw.patch @@ -1,6 +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 +diff --git a/config.guess b/config.guess +index e81d3ae..e4f97cf 100644 +--- a/config.guess ++++ b/config.guess @@ -973,6 +973,14 @@ EOF UNAME_MACHINE=aarch64_be GUESS=$UNAME_MACHINE-unknown-linux-$LIBC @@ -16,9 +17,10 @@ diff -Naur gc-8.0.6.org/config.guess gc-8.0.6.sw/config.guess alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in EV5) UNAME_MACHINE=alphaev5 ;; -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 +diff --git a/config.sub b/config.sub +index d74fb6d..59c2508 100644 +--- a/config.sub ++++ b/config.sub @@ -1175,6 +1175,7 @@ case $cpu-$vendor in case $cpu in 1750a | 580 \ @@ -27,9 +29,10 @@ diff -Naur gc-8.0.6.org/config.sub gc-8.0.6.sw/config.sub | aarch64 | aarch64_be \ | abacus \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ -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 +diff --git a/extra/msvc_dbg.c b/extra/msvc_dbg.c +index 9febc19..89956ca 100644 +--- a/extra/msvc_dbg.c ++++ b/extra/msvc_dbg.c @@ -156,6 +156,9 @@ size_t GetStackFramesFromContext(HANDLE hProcess, HANDLE hThread, #elif defined(_M_MRX000) machineType = IMAGE_FILE_MACHINE_R4000; @@ -50,9 +53,10 @@ diff -Naur gc-8.0.6.org/extra/msvc_dbg.c gc-8.0.6.sw/extra/msvc_dbg.c #elif defined(_M_ALPHA64) machineType = IMAGE_FILE_MACHINE_ALPHA64; stackFrame.AddrPC.Offset = context->Fir; -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 +diff --git a/include/gc_config_macros.h b/include/gc_config_macros.h +index bf2e263..22c273c 100644 +--- a/include/gc_config_macros.h ++++ b/include/gc_config_macros.h @@ -96,7 +96,7 @@ # define GC_FREEBSD_THREADS # elif defined(__NetBSD__) @@ -62,22 +66,24 @@ diff -Naur gc-8.0.6.org/include/gc_config_macros.h gc-8.0.6.sw/include/gc_config # define GC_OSF1_THREADS # elif (defined(mips) || defined(__mips) || defined(_mips)) \ && !(defined(nec_ews) || defined(_nec_ews) \ -diff -Naur gc-8.0.6.org/include/gc_tiny_fl.h gc-8.0.6.sw/include/gc_tiny_fl.h ---- gc-8.0.6.org/include/gc_tiny_fl.h 2022-02-14 09:01:19.440000000 +0000 -+++ gc-8.0.6.sw/include/gc_tiny_fl.h 2022-02-15 02:38:20.270000000 +0000 +diff --git a/include/gc_tiny_fl.h b/include/gc_tiny_fl.h +index 311077b..ef4d20e 100644 +--- a/include/gc_tiny_fl.h ++++ b/include/gc_tiny_fl.h @@ -49,7 +49,7 @@ # if defined(__LP64__) || defined (_LP64) || defined(_WIN64) \ - || defined(__s390x__) \ + || defined(__s390x__) || defined(__sparcv9) \ || (defined(__x86_64__) && !defined(__ILP32__)) \ - || defined(__alpha__) || defined(__powerpc64__) \ + || defined(__alpha__) || defined(__sw_64__) || defined(__powerpc64__) \ || defined(__arch64__) # define GC_GRANULE_BYTES 16 # define GC_GRANULE_WORDS 2 -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 +diff --git a/include/private/gc_priv.h b/include/private/gc_priv.h +index 5e14fd7..21cd282 100644 +--- a/include/private/gc_priv.h ++++ b/include/private/gc_priv.h +@@ -921,7 +921,7 @@ EXTERN_C_BEGIN /* SMALL_CONFIG: Want less block-level fragmentation. */ #ifndef HBLKSIZE # if defined(LARGE_CONFIG) || !defined(SMALL_CONFIG) @@ -86,10 +92,11 @@ diff -Naur gc-8.0.6.org/include/private/gc_priv.h gc-8.0.6.sw/include/private/gc # define CPP_LOG_HBLKSIZE 13 # elif defined(SN_TARGET_PSP2) # define CPP_LOG_HBLKSIZE 16 /* page size is set to 64 KB */ -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 +diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h +index 7a1559b..bd3ca34 100644 +--- a/include/private/gcconfig.h ++++ b/include/private/gcconfig.h +@@ -429,6 +429,14 @@ EXTERN_C_BEGIN # define M32R # define mach_type_known # endif @@ -104,10 +111,10 @@ 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 +@@ -1962,6 +1970,100 @@ EXTERN_C_BEGIN # endif # endif /* HP_PA */ - + +# ifdef SW_64 +# define MACH_TYPE "SW_64" +# define ALIGNMENT 8 diff --git a/gc-8.2.10.tar.gz b/gc-8.2.10.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..57d73a63f989ed889dc88ad99bda017e6e67ef29 Binary files /dev/null and b/gc-8.2.10.tar.gz differ diff --git a/gc-8.2.8.tar.gz b/gc-8.2.8.tar.gz deleted file mode 100644 index 85def0a44019ab0cd3d92e6039dfb456b0e14d70..0000000000000000000000000000000000000000 Binary files a/gc-8.2.8.tar.gz and /dev/null differ diff --git a/gc.spec b/gc.spec index 2e8ce3d61166741f3e89ea15fc507a672ac1783e..9af5091ebe2de7e7ab8f9a8b999743163f8e529e 100644 --- a/gc.spec +++ b/gc.spec @@ -1,11 +1,11 @@ Name: gc -Version: 8.2.8 +Version: 8.2.10 Release: 1 Summary: A garbage collector for C and C++ License: BSD-3-Clause 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 +Patch1: gc-8.2.10-sw.patch Patch2: 0001-add-loongarch-architecture.patch Patch3: gc-8.2.6-make-atomic_ops_private.patch @@ -79,6 +79,9 @@ rm -rfv %{buildroot}%{_datadir}/gc/ %{_mandir}/man3/gc.3* %changelog +* Sun Oct 19 2025 Funda Wang - 8.2.10-1 +- update to 8.2.10 + * Mon Sep 09 2024 Funda Wang - 8.2.8-1 - update to 8.2.8