SHA256
2
0

Accepting request 935274 from home:jengelh:branches:devel:libraries:c_c++

- Add 0001-Distribute-gc_gcj.h-and-some-other-headers-in-single.patch
  to repair `make install` forgetting to install gc_pthread.h.
- Drop C++98 build mode; just use what g++ uses.

OBS-URL: https://build.opensuse.org/request/show/935274
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/gc?expand=0&rev=44
This commit is contained in:
Dirk Mueller 2021-12-02 23:00:10 +00:00 committed by Git OBS Bridge
parent 5f9d43c9ff
commit 4c2b6d0cf0
3 changed files with 75 additions and 3 deletions

View File

@ -0,0 +1,64 @@
From c876dc2b12fcfd65466b9aa42349cfb621064971 Mon Sep 17 00:00:00 2001
From: Jakub Wojciech <jakub-w@riseup.net>
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.
---
Makefile.am | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git Makefile.am Makefile.am
index e3230c1d..f557fe12 100644
--- Makefile.am
+++ 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.34.0

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Dec 2 17:28:08 UTC 2021 - Jan Engelhardt <jengelh@inai.de>
- Add 0001-Distribute-gc_gcj.h-and-some-other-headers-in-single.patch
to repair `make install` forgetting to install gc_pthread.h.
- Drop C++98 build mode; just use what g++ uses.
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Sep 29 22:03:07 UTC 2021 - Jan Engelhardt <jengelh@inai.de> Wed Sep 29 22:03:07 UTC 2021 - Jan Engelhardt <jengelh@inai.de>

View File

@ -26,6 +26,7 @@ URL: http://www.hboehm.info/gc/
#Git-Clone: https://github.com/ivmai/bdwgc #Git-Clone: https://github.com/ivmai/bdwgc
Source: https://github.com/ivmai/bdwgc/releases/download/v%version/%name-%version.tar.gz Source: https://github.com/ivmai/bdwgc/releases/download/v%version/%name-%version.tar.gz
Patch1: 0001-Distribute-gc_gcj.h-and-some-other-headers-in-single.patch
BuildRequires: autoconf >= 2.64 BuildRequires: autoconf >= 2.64
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: libtool BuildRequires: libtool
@ -73,14 +74,14 @@ automatically recycles memory when it determines that it can no longer
be otherwise accessed. be otherwise accessed.
%prep %prep
%autosetup -p1 %autosetup -p0
%build %build
autoreconf -fi autoreconf -fi
# see bugzilla.redhat.com/689877 # see bugzilla.redhat.com/689877
export CPPFLAGS="-DUSE_GET_STACKBASE_FOR_MAIN" export CPPFLAGS="-DUSE_GET_STACKBASE_FOR_MAIN"
export CXXFLAGS="%optflags -std=gnu++98" export CXXFLAGS="%optflags"
%configure --disable-static --docdir="%_docdir/%name" \ %configure --disable-static --docdir="%_docdir/%name" \
--with-gnu-ld \ --with-gnu-ld \
--enable-cplusplus \ --enable-cplusplus \
@ -90,7 +91,7 @@ export CXXFLAGS="%optflags -std=gnu++98"
--with-libatomic-ops=yes --with-libatomic-ops=yes
# --with-libatomic-ops=yes means to use the system library # --with-libatomic-ops=yes means to use the system library
make %{?_smp_mflags} %make_build
%install %install
%make_install %make_install