diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2019-02-27 00:48:12 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2019-02-27 00:53:05 +0300 |
commit | 4199c59c4ceb53f00f87b6d8a4eaa45db78358cf (patch) | |
tree | c31cd5dad7ebb7e5d407d5ac965dcf93cef16727 /configure.ac | |
parent | d11b6dc29ebe5f412dd49a066ac637d908353452 (diff) | |
download | bdwgc-4199c59c4ceb53f00f87b6d8a4eaa45db78358cf.tar.gz |
Fix 'duplicate symbol' error for tests using multiple static libs (OS X)
Issue #263 (bdwgc).
If configured with --enable-static, libtool passes libgc.a to gcc
twice (with a relative path and with an absolute one) when linking
tests that depend on libcord.a, libgccpp.a or libstaticrootslib_test.a
which, in turn, depends on libgc.a. Double specification of libgc.a
seems to confuse ld tool of MacOS 10.14.
The workaround is to omit libgc.la in *_LDADD specification of the
mentioned tests when the shared libraries are not requested, at least.
* configure.ac (ENABLE_SHARED): New AM_CONDITIONAL.
* cord/cord.am (cordtest_LDADD): Do not add libgc.la unless
ENABLE_SHARED; add comment.
* tests/tests.am (staticrootstest_LDADD): Likewise.
* tests/tests.am [CPLUSPLUS && !AVOID_CPP_LIB] (test_cpp_LDADD):
Likewise.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 1d92e2bd..49af3626 100644 --- a/configure.ac +++ b/configure.ac @@ -964,6 +964,8 @@ AC_ARG_ENABLE(docs, [do not build and install documentation])]) AM_CONDITIONAL(ENABLE_DOCS, test x$enable_docs != xno) +AM_CONDITIONAL(ENABLE_SHARED, test x$enable_shared = xyes) + # Atomic Ops # ---------- |