]> granicus.if.org Git - libexpat/commitdiff
Autotools: Enable clang tool chain to generate libraries
authorMohammed Khajapasha <mohammed.khajapasha@intel.com>
Mon, 9 Sep 2019 19:06:42 +0000 (19:06 +0000)
committerMohammed Khajapasha <mohammed.khajapasha@intel.com>
Fri, 13 Sep 2019 06:00:38 +0000 (06:00 +0000)
Enable clang tool chain for autotool to generate shared libexpat libraries.

Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
expat/configure.ac

index b429281d3bcb83ac749ac0635bd1a8ea627d4f63..20fe69e1026614f443bb74f2335a893db5ba6102 100644 (file)
@@ -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])])