[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fix LTO builds of libntml with gcc 8
From: |
Romain GEISSLER |
Subject: |
Fix LTO builds of libntml with gcc 8 |
Date: |
Mon, 26 Feb 2018 18:29:58 +0000 |
Hi,
I am having troubles to build libntml with LTO support and gcc 8. The reason
is, md4 symbols are both embedded in libntml.so and libgnu.a, and your test
binary uses both. To fix that, I use a convenient library (ie non delivered
static library) that is used both to implement libntml and can be correctly
used in the tests, without LTO being confused by having the same symbols both
in a shared library and in a static library. This patch was tested agains the
1.4 tarball:
Cheers,
Romain
--- Makefile.am
+++ Makefile.am
@@ -28,6 +28,7 @@
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libntlm.pc
+noinst_LTLIBRARIES = libntlm_impl.la
lib_LTLIBRARIES = libntlm.la
include_HEADERS = ntlm.h
@@ -35,17 +36,18 @@
AM_CFLAGS = $(WARN_CFLAGS)
AM_CPPFLAGS = -I$(srcdir)/gl -I$(builddir)/gl -DNTLM_SRCDIR=\"$(srcdir)\"
-libntlm_la_SOURCES = smbutil.c smbencrypt.c
+libntlm_impl_la_SOURCES = smbutil.c smbencrypt.c
+libntlm_la_SOURCES =
libntlm_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-export-symbols-regex '^(dumpSmb|buildSmb|ntlm_).*' -no-undefined
-libntlm_la_LIBADD = gl/libgnu.la
+libntlm_la_LIBADD = libntlm_impl.la gl/libgnu.la
# test
TESTS = test_ntlm
check_PROGRAMS = $(TESTS)
-LDADD = libntlm.la gl/libgnu.la
+LDADD = libntlm_impl.la gl/libgnu.la
CLEANFILES = test.out
test_ntlm_LDFLAGS = -no-install
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Fix LTO builds of libntml with gcc 8,
Romain GEISSLER <=