[xslt] [PATCH] Link libraries with libm



Otherwise linking the resulting libraries to a binary (e.g. xsltproc)
fails when using gold linker, even if the binary uses '-lm':
| ../libxslt/.libs/libxslt.so: error: undefined reference to 'fmod'
| ../libxslt/.libs/libxslt.so: error: undefined reference to 'pow'
| ../libexslt/.libs/libexslt.so: error: undefined reference to 'floor'
| collect2: error: ld returned 1 exit status
---

I might still have commit access in gnome git but it's been a
while... Let me know if you'd like me to push or do something else
(like file a bug).

Thanks,
  Jussi



 libexslt/Makefile.am | 2 +-
 libxslt/Makefile.am  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libexslt/Makefile.am b/libexslt/Makefile.am
index 1cf51381..54495243 100644
--- a/libexslt/Makefile.am
+++ b/libexslt/Makefile.am
@@ -27,7 +27,7 @@ libexslt_la_SOURCES =                   \
        libexslt.h                      \
        dynamic.c
 
-libexslt_la_LIBADD = $(top_builddir)/libxslt/libxslt.la $(EXTRA_LIBS) $(LIBGCRYPT_LIBS)
+libexslt_la_LIBADD = $(top_builddir)/libxslt/libxslt.la $(EXTRA_LIBS) $(LIBGCRYPT_LIBS) $(M_LIBS)
 libexslt_la_LDFLAGS = $(WIN32_EXTRA_LDFLAGS) -version-info $(LIBEXSLT_VERSION_INFO)
 
 man_MANS = libexslt.3
diff --git a/libxslt/Makefile.am b/libxslt/Makefile.am
index d9fed686..9d44c3d0 100644
--- a/libxslt/Makefile.am
+++ b/libxslt/Makefile.am
@@ -62,7 +62,7 @@ else
 LIBXSLT_VERSION_SCRIPT =
 endif
 
-libxslt_la_LIBADD = $(LIBXML_LIBS) $(EXTRA_LIBS)
+libxslt_la_LIBADD = $(LIBXML_LIBS) $(M_LIBS) $(EXTRA_LIBS)
 libxslt_la_LDFLAGS =                                   \
                $(WIN32_EXTRA_LDFLAGS)                  \
                $(LIBXSLT_VERSION_SCRIPT)               \
-- 
2.11.0



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]