netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH libnetfilter_log 0/2] build: a couple of `-lnfnetlink` fixes.
@ 2020-11-30 11:31 Jeremy Sowden
  2020-11-30 11:31 ` [PATCH libnetfilter_log 1/2] build: remove duplicate `-lnfnetlink` from LDFLAGS Jeremy Sowden
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jeremy Sowden @ 2020-11-30 11:31 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: Netfilter Devel

Building libnetfilter_log.so passes `-lnfnetlink` to the linker twice and
building libnetfilter_log_libipulog.so doesn't pass it at all.

Jeremy Sowden (2):
  build: remove duplicate `-lnfnetlink` from LDFLAGS.
  build: link libnetfilter_log_libipulog.so explicitly to
    libnfnetlink.so.

 src/Makefile.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.29.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH libnetfilter_log 1/2] build: remove duplicate `-lnfnetlink` from LDFLAGS.
  2020-11-30 11:31 [PATCH libnetfilter_log 0/2] build: a couple of `-lnfnetlink` fixes Jeremy Sowden
@ 2020-11-30 11:31 ` Jeremy Sowden
  2020-11-30 11:31 ` [PATCH libnetfilter_log 2/2] build: link libnetfilter_log_libipulog.so explicitly to libnfnetlink.so Jeremy Sowden
  2020-11-30 11:43 ` [PATCH libnetfilter_log 0/2] build: a couple of `-lnfnetlink` fixes Florian Westphal
  2 siblings, 0 replies; 4+ messages in thread
From: Jeremy Sowden @ 2020-11-30 11:31 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: Netfilter Devel

`$(libnetfilter_log_la_LIBADD)` includes `$(LIBNFNETLINK_LIBS)`, so there's no
need to include `-lnfnetlink` in `$(libnetfilter_log_la_LDFLAGS)`.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
---
 src/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index aa561525585c..33be04828223 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -24,7 +24,7 @@ include ${top_srcdir}/Make_global.am
 
 lib_LTLIBRARIES = libnetfilter_log.la
 
-libnetfilter_log_la_LDFLAGS = -Wc,-nostartfiles -lnfnetlink	\
+libnetfilter_log_la_LDFLAGS = -Wc,-nostartfiles	\
 			      -version-info $(LIBVERSION)
 libnetfilter_log_la_SOURCES = libnetfilter_log.c nlmsg.c
 libnetfilter_log_la_LIBADD  = ${LIBNFNETLINK_LIBS} ${LIBMNL_LIBS}
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH libnetfilter_log 2/2] build: link libnetfilter_log_libipulog.so explicitly to libnfnetlink.so.
  2020-11-30 11:31 [PATCH libnetfilter_log 0/2] build: a couple of `-lnfnetlink` fixes Jeremy Sowden
  2020-11-30 11:31 ` [PATCH libnetfilter_log 1/2] build: remove duplicate `-lnfnetlink` from LDFLAGS Jeremy Sowden
@ 2020-11-30 11:31 ` Jeremy Sowden
  2020-11-30 11:43 ` [PATCH libnetfilter_log 0/2] build: a couple of `-lnfnetlink` fixes Florian Westphal
  2 siblings, 0 replies; 4+ messages in thread
From: Jeremy Sowden @ 2020-11-30 11:31 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: Netfilter Devel

It uses symbols from libnfnetlink.so, but doesn't link to it, relying on an
implicit transitive linkage through libnetfilter_log.so.  Add
`$(LIBNFNETLINK_LIBS)` to `$(libnetfilter_log_libipulog_la_LIBADD)`.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
---
 src/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 33be04828223..335c393f760a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -34,6 +34,6 @@ lib_LTLIBRARIES += libnetfilter_log_libipulog.la
 
 libnetfilter_log_libipulog_la_LDFLAGS = -Wc,-nostartfiles	\
 					-version-info 1:0:0
-libnetfilter_log_libipulog_la_LIBADD = libnetfilter_log.la
+libnetfilter_log_libipulog_la_LIBADD = libnetfilter_log.la ${LIBNFNETLINK_LIBS}
 libnetfilter_log_libipulog_la_SOURCES = libipulog_compat.c
 endif
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH libnetfilter_log 0/2] build: a couple of `-lnfnetlink` fixes.
  2020-11-30 11:31 [PATCH libnetfilter_log 0/2] build: a couple of `-lnfnetlink` fixes Jeremy Sowden
  2020-11-30 11:31 ` [PATCH libnetfilter_log 1/2] build: remove duplicate `-lnfnetlink` from LDFLAGS Jeremy Sowden
  2020-11-30 11:31 ` [PATCH libnetfilter_log 2/2] build: link libnetfilter_log_libipulog.so explicitly to libnfnetlink.so Jeremy Sowden
@ 2020-11-30 11:43 ` Florian Westphal
  2 siblings, 0 replies; 4+ messages in thread
From: Florian Westphal @ 2020-11-30 11:43 UTC (permalink / raw)
  To: Jeremy Sowden; +Cc: Pablo Neira Ayuso, Netfilter Devel

Jeremy Sowden <jeremy@azazel.net> wrote:
> Building libnetfilter_log.so passes `-lnfnetlink` to the linker twice and
> building libnetfilter_log_libipulog.so doesn't pass it at all.
> 
> Jeremy Sowden (2):
>   build: remove duplicate `-lnfnetlink` from LDFLAGS.
>   build: link libnetfilter_log_libipulog.so explicitly to
>     libnfnetlink.so.

Applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-30 11:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-30 11:31 [PATCH libnetfilter_log 0/2] build: a couple of `-lnfnetlink` fixes Jeremy Sowden
2020-11-30 11:31 ` [PATCH libnetfilter_log 1/2] build: remove duplicate `-lnfnetlink` from LDFLAGS Jeremy Sowden
2020-11-30 11:31 ` [PATCH libnetfilter_log 2/2] build: link libnetfilter_log_libipulog.so explicitly to libnfnetlink.so Jeremy Sowden
2020-11-30 11:43 ` [PATCH libnetfilter_log 0/2] build: a couple of `-lnfnetlink` fixes Florian Westphal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).