summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2019-11-07 11:30:58 +0300
committerIvan Maidanski <ivmai@mail.ru>2019-11-07 11:39:24 +0300
commit3efd0bc4e443132653d42aca1a80b22b14930dd8 (patch)
tree273898bc8115ad060b6252297edae78663687eea /Makefile.am
parent4dada595d172ba6bd8dd5be1d961d68f08c82058 (diff)
downloadbdwgc-3efd0bc4e443132653d42aca1a80b22b14930dd8.tar.gz
Build gctba library
Issue #268 (bdgwc). The library exports only GC_throw_bad_alloc C++ function. It is intended to solve "undefined reference to GC_throw_bad_alloc" linkage error when the client needs to avoid linking with gccpp library (to avoid "::new" redirection, in turn). * CMakeLists.txt (enable_throw_bad_alloc_library): New option (ON by default). * CMakeLists.txt [enable_cplusplus && enable_throw_bad_alloc_library] (gctba): New library. * Makefile.am [CPLUSPLUS && GC_TBA_LIBRARY] (lib_LTLIBRARIES): Add libgctba.la item. * Makefile.am [CPLUSPLUS && GC_TBA_LIBRARY] (libgctba_la_SOURCES, libgctba_la_LIBADD, libgctba_la_LDFLAGS): New variable. * Makefile.direct: Update head comment (mention gctba.a). * Makefile.direct (bsd-libgctba.a, gctba.a): New target. * NT_MAKEFILE (gctba.lib): Likewise. * WCC_MAKEFILE (gctba.lib): Likewise. * WCC_MAKEFILE [!ENABLE_STATIC] (gctba.dll): Likewise. * Makefile.direct (bsd-libgc.a): Move gctba.a to bsd-libgctba.a. * Makefile.direct (BSD-pkg-install): Copy bsd-libgctba.a; install libgctba.a. * Makefile.direct (c++): Add dependency on gc_badalc.o; call rus, $(AR) and $(RANLIB) for gctba.a. * NT_MAKEFILE (all): Add dependency on gctba.lib. * WCC_MAKEFILE (all): Likewise. * README.QUICK: Update information about "make c++" (reference libgctba.a, libgctba.so and doc/gcinterface.md). * configure.ac (throw-bad-alloc-library): Specify new AC_ARG_ENABLE. * configure.ac (GC_TBA_LIBRARY): New AM_CONDITIONAL. * doc/gcinterface.md (Class inheritance based interface): Add information about libgctba library; document GC_NEW_ABORTS_ON_OOM and GC_INCLUDE_NEW macros.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 14405162..4758a36e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -138,6 +138,14 @@ include_HEADERS += include/extra/gc_cpp.h
libgccpp_la_SOURCES = gc_badalc.cc gc_cpp.cc
libgccpp_la_LIBADD = ./libgc.la
libgccpp_la_LDFLAGS = -version-info $(LIBGCCPP_VER_INFO) -no-undefined
+if GC_TBA_LIBRARY
+# The same as libgccpp but contains only gc_badalc.o.
+lib_LTLIBRARIES += libgctba.la
+libgctba_la_SOURCES = gc_badalc.cc
+libgctba_la_LIBADD = ./libgc.la
+# Set the same version as for libgccpp.
+libgctba_la_LDFLAGS = -version-info $(LIBGCCPP_VER_INFO) -no-undefined
+endif
endif
## FIXME: If Visual C++ users use Makefile.am, this should go into