[Top][All Lists]

[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


I am having troubles to build libntml with LTO support and gcc 8. The reason 
is, md4 symbols are both embedded in 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:


@@ -28,6 +28,7 @@
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libntlm.pc

 include_HEADERS = ntlm.h
@@ -35,17 +36,18 @@
 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/
+libntlm_la_LIBADD = gl/

 # test

 TESTS = test_ntlm
 check_PROGRAMS = $(TESTS)
-LDADD = gl/
+LDADD = gl/
 CLEANFILES = test.out
 test_ntlm_LDFLAGS = -no-install

reply via email to

[Prev in Thread] Current Thread [Next in Thread]