From df35daf12618d24fc9e96b9209ffc644f3b8df5a Mon Sep 17 00:00:00 2001 From: Mohammed Khajapasha Date: Mon, 9 Sep 2019 19:06:42 +0000 Subject: [PATCH 1/2] Autotools: Enable clang tool chain to generate libraries Enable clang tool chain for autotool to generate shared libexpat libraries. Signed-off-by: Mohammed Khajapasha --- expat/configure.ac | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/expat/configure.ac b/expat/configure.ac index b429281d..20fe69e1 100644 --- a/expat/configure.ac +++ b/expat/configure.ac @@ -94,6 +94,11 @@ AC_LANG_POP([C++]) AS_IF([test "$GCC" = yes], [AX_APPEND_LINK_FLAGS([-fno-strict-aliasing],[LDFLAGS])]) +dnl patching ${archive_cmds} to affect generation of file "libtool" to fix linking with clang (issue #312) +AS_CASE(["$LD"],[*clang*], + [AS_CASE(["${host_os}"], + [*linux*],[archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'])]) + EXPATCFG_COMPILER_SUPPORTS_VISIBILITY([ AX_APPEND_FLAG([-fvisibility=hidden], [CFLAGS]) AX_APPEND_FLAG([-DXML_ENABLE_VISIBILITY=1], [CFLAGS])]) From 9f89db5317547a6d94002caf8f63b263a50ef325 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Fri, 13 Sep 2019 21:17:02 +0200 Subject: [PATCH 2/2] Changes: Document #312 and #343 --- expat/Changes | 1 + 1 file changed, 1 insertion(+) diff --git a/expat/Changes b/expat/Changes index 9540ec1a..060bcd2f 100644 --- a/expat/Changes +++ b/expat/Changes @@ -41,6 +41,7 @@ Release x.x.x xxx xxx xx xxxx --without-getrandom --with-sys-getrandom --without-sys-getrandom + #312 #343 Autotools: Fix linking issues with "./configure LD=clang" Autotools: Fix "make run-xmltest" for out-of-source builds #329 #336 CMake: Pull all options from Expat <=2.2.7 into namespace prefix EXPAT_ with the exception of DOCBOOK_TO_MAN: