diff --git a/0001-add-loongarch-architecture.patch b/0001-add-loongarch-architecture.patch index edcbbb9beccdd10ee855bb794f75ee0c967c37a9..029ea3dc54026528019cd8f98ad18353605fa140 100644 --- a/0001-add-loongarch-architecture.patch +++ b/0001-add-loongarch-architecture.patch @@ -10,38 +10,38 @@ Subject: [PATCH] add loongarch architecture 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac -index 3b38e6f..1588dd1 100644 +index 2bc1282..7cc02a9 100644 --- a/configure.ac +++ b/configure.ac -@@ -201,7 +201,7 @@ case "$THREADS" in +@@ -208,7 +208,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* | *-*-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 1979c58..ef8c279 100644 +index b4457c1..5826ad5 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h -@@ -238,6 +238,14 @@ EXTERN_C_BEGIN +@@ -226,6 +226,14 @@ EXTERN_C_BEGIN # define VAX # define mach_type_known # endif -+# if defined(__loongarch64) ++# if defined(__loongarch64) +# define LOONGARCH64 +# define mach_type_known +# endif -+# if defined(__loongarch64) ++# if defined(__loongarch64) +# define LOONGARCH64 +# define mach_type_known +# endif # if defined(mips) || defined(__mips) || defined(_mips) # define MIPS # if defined(nec_ews) || defined(_nec_ews) -@@ -514,6 +522,10 @@ EXTERN_C_BEGIN +@@ -518,6 +526,10 @@ EXTERN_C_BEGIN # define AARCH64 # define mach_type_known # endif @@ -52,10 +52,10 @@ index 1979c58..ef8c279 100644 # if defined(FREEBSD) && (defined(mips) || defined(__mips) || defined(_mips)) # define MIPS # define mach_type_known -@@ -1732,6 +1744,25 @@ EXTERN_C_BEGIN +@@ -1702,6 +1714,25 @@ EXTERN_C_BEGIN # define STACKBOTTOM ((ptr_t)0xfffff000) /* for Encore */ # endif - + +# ifdef LOONGARCH64 +# define MACH_TYPE "LOONGARCH64" +# ifdef LINUX @@ -75,14 +75,14 @@ index 1979c58..ef8c279 100644 +# endif +# endif + - # ifdef MIPS - # define MACH_TYPE "MIPS" + # ifdef LOONGARCH + # define MACH_TYPE "LoongArch" # ifdef LINUX diff --git a/os_dep.c b/os_dep.c -index b183423..e18c9b9 100644 +index e116ad0..947ac7f 100644 --- a/os_dep.c +++ b/os_dep.c -@@ -3144,7 +3144,7 @@ GC_API GC_push_other_roots_proc GC_CALL GC_get_push_other_roots(void) +@@ -3239,7 +3239,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,6 @@ index b183423..e18c9b9 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.0.6-sw.patch index 69831c89cf41e65d2878e57f2ae1d1d7070c29e5..35883ef209da8d26a2ba1001c8cc257a773054a7 100755 --- a/gc-8.0.6-sw.patch +++ b/gc-8.0.6-sw.patch @@ -1,44 +1,36 @@ 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 -@@ -891,6 +891,14 @@ +@@ -973,6 +973,14 @@ EOF UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + sw_64:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + sw) UNAME_MACHINE=sw_64 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi -+ echo ${UNAME_MACHINE}-sunway-linux-${LIBC} -+ exit ;; ++ GUESS=${UNAME_MACHINE}-sunway-linux-${LIBC} ++ ;; alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + 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 -@@ -248,6 +248,7 @@ - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ -+ | sw_64 \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ -@@ -370,6 +371,7 @@ - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ -+ | sw_64-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ +@@ -1175,6 +1175,7 @@ case $cpu-$vendor in + case $cpu in + 1750a | 580 \ + | a29k \ ++ | sw_64 \ + | 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 -@@ -149,6 +149,9 @@ +@@ -156,6 +156,9 @@ size_t GetStackFramesFromContext(HANDLE hProcess, HANDLE hThread, #elif defined(_M_MRX000) machineType = IMAGE_FILE_MACHINE_R4000; stackFrame.AddrPC.Offset = context->Fir; @@ -48,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; -@@ -158,6 +161,9 @@ +@@ -165,6 +168,9 @@ size_t GetStackFramesFromContext(HANDLE hProcess, HANDLE hThread, #elif defined(_M_IA64) machineType = IMAGE_FILE_MACHINE_IA64; stackFrame.AddrPC.Offset = context->StIIP; @@ -61,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 -@@ -95,7 +95,7 @@ +@@ -96,7 +96,7 @@ # define GC_FREEBSD_THREADS # elif defined(__NetBSD__) # define GC_NETBSD_THREADS @@ -85,19 +77,19 @@ 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 -@@ -851,7 +851,7 @@ +@@ -925,7 +925,7 @@ EXTERN_C_BEGIN /* SMALL_CONFIG: Want less block-level fragmentation. */ #ifndef HBLKSIZE # if defined(LARGE_CONFIG) || !defined(SMALL_CONFIG) -# ifdef ALPHA +# if defined ALPHA || defined SW_64 # define CPP_LOG_HBLKSIZE 13 - # elif defined(SN_TARGET_ORBIS) || defined(SN_TARGET_PSP2) - # define CPP_LOG_HBLKSIZE 16 /* page size is set to 64K */ + # 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 -@@ -411,6 +411,14 @@ +@@ -418,6 +418,14 @@ EXTERN_C_BEGIN # define M32R # define mach_type_known # endif @@ -112,10 +104,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) \ -@@ -1994,6 +2002,100 @@ - # endif +@@ -1924,6 +1932,100 @@ EXTERN_C_BEGIN + # endif # endif /* HP_PA */ - + +# ifdef SW_64 +# define MACH_TYPE "SW_64" +# define ALIGNMENT 8 diff --git a/gc-8.0.6.tar.gz b/gc-8.0.6.tar.gz deleted file mode 100644 index f128e71bc571e5f2ab672d4571b7e6d1f2ae725d..0000000000000000000000000000000000000000 Binary files a/gc-8.0.6.tar.gz and /dev/null differ diff --git a/gc-8.2.2.tar.gz b/gc-8.2.2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..9a404d15443e59b74989e035eacecfa66fdd3b9d Binary files /dev/null and b/gc-8.2.2.tar.gz differ diff --git a/gc.spec b/gc.spec index 52c7bef9f14d4a0b3a610c18dc3b83a38c4d7c58..40cca4b28e9a123a3b1d6443d728cca6c6fd94d5 100644 --- a/gc.spec +++ b/gc.spec @@ -1,6 +1,6 @@ Name: gc -Version: 8.0.6 -Release: 4 +Version: 8.2.2 +Release: 1 Summary: A garbage collector for C and C++ License: BSD and GPLv1+ Url: http://www.hboehm.info/gc/ @@ -60,6 +60,7 @@ make check %{_libdir}/libcord.so.1* %{_libdir}/libgc.so.1* %{_libdir}/libgccpp.so.1* +%{_libdir}/libgctba.so* %files devel %doc doc/README.environment doc/README.linux @@ -74,6 +75,9 @@ make check %changelog +* Thu Feb 2 2023 huyubiao - 8.2.2-1 +- Update gc to 8.2.2 + * Tue Nov 21 2022 doupengda - 8.0.6-4 - add loongarch64 support