Module: wine Branch: master Commit: 683b43b99623384a8805e127611405b28aa3ccdb URL: https://source.winehq.org/git/wine.git/?a=commit;h=683b43b99623384a8805e1276...
Author: Martin Storsjö martin@martin.st Date: Thu Oct 21 12:15:36 2021 +0300
xslt: Build with LIBXSLT_STATIC, fix building with clang in MSVC mode.
This avoids unnecessarily embedding dllexport directives in all the object files.
This also fixes building with clang in MSVC mode, as the MSVC definition of XSLTPUBVAR in xsltexports.h is lacking 'extern' when doing dllexport. (This probably used to work before compilers defaulted to -fcommon.) This fixes duplicate symbols like these:
lld-link: error: duplicate symbol: xsltGenericError
defined at ../src/libs/xslt/libxslt/xsltutils.h:140 libxslt.cross.a(documents.cross.o) defined at ../src/libs/xslt/libxslt/xsltutils.h:140 libxslt.cross.a(extensions.cross.o)
Signed-off-by: Martin Storsjö martin@martin.st Signed-off-by: Alexandre Julliard julliard@winehq.org
---
configure | 2 +- configure.ac | 2 +- libs/xslt/Makefile.in | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/configure b/configure index 4854f976b78..efae283f9fa 100755 --- a/configure +++ b/configure @@ -10771,7 +10771,7 @@ $as_echo "$as_me:${as_lineno-$LINENO}: libxml2 cflags: $XML2_PE_CFLAGS" >&5 $as_echo "$as_me:${as_lineno-$LINENO}: libxml2 libs: $XML2_PE_LIBS" >&5
if ${XSLT_PE_CFLAGS:+false} :; then : - XSLT_PE_CFLAGS="-I$(top_srcdir)/libs/xslt" + XSLT_PE_CFLAGS="-I$(top_srcdir)/libs/xslt -DLIBXSLT_STATIC" else enable_libxslt=no fi diff --git a/configure.ac b/configure.ac index 3f1d50a4dfc..62af43220ce 100644 --- a/configure.ac +++ b/configure.ac @@ -1060,7 +1060,7 @@ WINE_EXTLIB_FLAGS(LCMS2, lcms2, lcms2, "-I$(top_srcdir)/libs/lcms2/include") WINE_EXTLIB_FLAGS(PNG, png, "png $(ZLIB_PE_LIBS)", "-I$(top_srcdir)/libs/png") WINE_EXTLIB_FLAGS(TIFF, tiff, tiff, "-I$(top_srcdir)/libs/tiff/libtiff") WINE_EXTLIB_FLAGS(XML2, libxml2, xml2, "-I$(top_srcdir)/libs/xml2/include -DLIBXML_STATIC") -WINE_EXTLIB_FLAGS(XSLT, libxslt, xslt, "-I$(top_srcdir)/libs/xslt") +WINE_EXTLIB_FLAGS(XSLT, libxslt, xslt, "-I$(top_srcdir)/libs/xslt -DLIBXSLT_STATIC") WINE_EXTLIB_FLAGS(ZLIB, zlib, z, "-I$(top_srcdir)/libs/zlib -DFAR= -DZ_SOLO")
dnl **** Check for pthread **** diff --git a/libs/xslt/Makefile.in b/libs/xslt/Makefile.in index 3550010ce31..b620710c5af 100644 --- a/libs/xslt/Makefile.in +++ b/libs/xslt/Makefile.in @@ -1,5 +1,5 @@ EXTLIB = libxslt.a -EXTRAINCL = $(XML2_PE_CFLAGS) +EXTRAINCL = $(XML2_PE_CFLAGS) $(XSLT_PE_CFLAGS)
C_SRCS = \ libxslt/attributes.c \