diff --git a/0001-Distribute-gc_gcj.h-and-some-other-headers-in-single.patch b/0001-Distribute-gc_gcj.h-and-some-other-headers-in-single.patch deleted file mode 100644 index 70fd1922559d043b5bf5b7b8e5f9d62fee72aea5..0000000000000000000000000000000000000000 --- a/0001-Distribute-gc_gcj.h-and-some-other-headers-in-single.patch +++ /dev/null @@ -1,61 +0,0 @@ -From c876dc2b12fcfd65466b9aa42349cfb621064971 Mon Sep 17 00:00:00 2001 -From: Jakub Wojciech -Date: Fri, 5 Nov 2021 08:36:32 +0100 -Subject: [PATCH] Distribute gc_gcj.h and some other headers in - single-obj-compilation - -Issue #389 (bdwgc). - -This fixes installation of gc_pthread_redirects.h, gc_gcj.h and -gc_disclaim.h if --single-obj-compilation is passed to configure. - -* Makefile.am [PTHREADS] (pkginclude_HEADERS): Move outside the -SINGLE_GC_OBJ conditional. -* Makefile.am [ENABLE_GCJ_SUPPORT] (pkginclude_HEADERS): Likewise. -* Makefile.am [ENABLE_DISCLAIM] (pkginclude_HEADERS): Likewise. - -diff --git a/Makefile.am b/Makefile.am -index e3230c1d..f557fe12 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -83,7 +83,6 @@ else - if PTHREADS - # Not Cygwin or MinGW. - libgc_la_SOURCES += pthread_start.c pthread_support.c --pkginclude_HEADERS += include/gc_pthread_redirects.h - if DARWIN_THREADS - libgc_la_SOURCES += darwin_stop_world.c - else -@@ -106,17 +105,27 @@ endif - - if ENABLE_GCJ_SUPPORT - libgc_la_SOURCES += gcj_mlc.c --pkginclude_HEADERS += include/gc_gcj.h - endif - - if ENABLE_DISCLAIM - libgc_la_SOURCES += fnlz_mlc.c --pkginclude_HEADERS += include/gc_disclaim.h - endif - - ## End of !SINGLE_GC_OBJ - endif - -+if PTHREADS -+pkginclude_HEADERS += include/gc_pthread_redirects.h -+endif -+ -+if ENABLE_GCJ_SUPPORT -+pkginclude_HEADERS += include/gc_gcj.h -+endif -+ -+if ENABLE_DISCLAIM -+pkginclude_HEADERS += include/gc_disclaim.h -+endif -+ - if USE_INTERNAL_LIBATOMIC_OPS - nodist_libgc_la_SOURCES = libatomic_ops/src/atomic_ops.c - endif --- -2.35.1 - diff --git a/gc-8.2.0.tar.gz b/gc-8.2.0.tar.gz deleted file mode 100644 index bc944a1d2e80aa9fc0c55da9beab564b8d62dfdd..0000000000000000000000000000000000000000 Binary files a/gc-8.2.0.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 d507cdd8aa7aaf6c956e7bc19624a2b481905892..c494cf84c1a19dda789bbfa46be4b652e9d71bd6 100644 --- a/gc.spec +++ b/gc.spec @@ -1,18 +1,18 @@ -%define anolis_release 3 +%define anolis_release 1 Summary: Garbage collector for C and C++ Name: gc -Version: 8.2.0 +Version: 8.2.2 Release: %{anolis_release}%{dist} License: BSD URL: https://www.hboehm.info/gc/ -Source0: https://github.com/ivmai/bdwgc/releases/download/v%{version}/gc-%{version}%{?pre}.tar.gz +Source0: https://github.com/ivmai/bdwgc/releases/download/v%{version}/gc-%{version}.tar.gz -Patch0001: 0001-Distribute-gc_gcj.h-and-some-other-headers-in-single.patch +# Already upstream: https://github.com/ivmai/bdwgc/commit/4489757f1cc1fe4aa98d4c1ebbe0789b2b308e11 +Patch0: pthread_setname_np.patch BuildRequires: automake libtool BuildRequires: gcc-c++ -BuildRequires: pkgconfig BuildRequires: make Obsoletes: libgc < %{version}-%{release} @@ -32,7 +32,7 @@ Provides: libgc-devel = %{version}-%{release} %prep -%autosetup -n bdwgc-%{version}%{?pre} -p1 +%autosetup -n gc-%{version} -p1 %build @@ -40,7 +40,12 @@ Provides: libgc-devel = %{version}-%{release} rm -f libtool libtool.m4 autoreconf -i -f -CPPFLAGS="-DUSE_GET_STACKBASE_FOR_MAIN"; export CPPFLAGS +# see https://bugzilla.redhat.com/689877 +CPPFLAGS="-DUSE_GET_STACKBASE_FOR_MAIN $CPPFLAGS" +# https://github.com/ivmai/bdwgc/commit/3ea130ae326d02e224921017d3ee9c287fd4e670 +# WAS https://bugzilla.redhat.com/show_bug.cgi?id=1551671 +CPPFLAGS="-DDONT_UNDEF_EXCEPTIONS $CPPFLAGS" +export CPPFLAGS %configure \ --disable-docs \ @@ -58,7 +63,6 @@ install -p -D -m644 doc/gc.man %{buildroot}%{_mandir}/man3/gc.3 ## Unpackaged files rm -rfv %{buildroot}%{_datadir}/gc/ -rm -fv %{buildroot}%{_libdir}/lib*.la %generate_compatibility_deps @@ -68,8 +72,6 @@ make check %{?arch_ignore} %endif -%ldconfig_scriptlets - %files %dir %{abidir} %{_libdir}/libcord.so.1* @@ -95,11 +97,14 @@ make check %{?arch_ignore} %{_mandir}/man3/gc.3* -%changelog +%changelog +* Wed Jan 18 2023 Funda Wang - 8.2.2-1 +- New version 8.2.2 + * Thu Oct 27 2022 mgb01105731 - 8.2.0-3 - optimise spec file -* Wed Apr 21 2022 Zhongling He - 8.2.0-2 +* Thu Apr 21 2022 Zhongling He - 8.2.0-2 - Backport c876dc2 from upstream to fix some headers not installed. * Wed Apr 13 2022 Zhongling He - 8.2.0-1 diff --git a/pthread_setname_np.patch b/pthread_setname_np.patch new file mode 100644 index 0000000000000000000000000000000000000000..19250642b4956f2764285c10f9e3af2fe61aa50c --- /dev/null +++ b/pthread_setname_np.patch @@ -0,0 +1,22 @@ +diff -ruN gc-8.2.2.orig/configure.ac gc-8.2.2/configure.ac +--- gc-8.2.2.orig/configure.ac 2022-08-26 20:44:49.000000000 +0200 ++++ gc-8.2.2/configure.ac 2023-01-17 10:24:04.342866823 +0100 +@@ -833,13 +833,15 @@ + AS_IF([test "$THREADS" = posix], + [AC_MSG_CHECKING(for pthread_setname_np) + old_CFLAGS="$CFLAGS" +- CFLAGS="$CFLAGS $CFLAGS_EXTRA -Werror" +- AC_TRY_COMPILE([#include ], ++ CFLAGS="$CFLAGS $CFLAGS_EXTRA -Werror -pthread" ++ AC_TRY_COMPILE([#define _GNU_SOURCE ++ #include ], + [pthread_setname_np("thread-name")], + [AC_MSG_RESULT([yes (w/o tid)]) + AC_DEFINE([HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID], [1], + [Define to use 'pthread_setname_np(const char*)' function.])], +- [AC_TRY_COMPILE([#include ], ++ [AC_TRY_COMPILE([#define _GNU_SOURCE ++ #include ], + [pthread_setname_np(pthread_self(), "thread-name-%u", 0)], + [AC_MSG_RESULT([yes (with tid and arg)]) + AC_DEFINE([HAVE_PTHREAD_SETNAME_NP_WITH_TID_AND_ARG], [1],