All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ebtables: extend the 'static' build target fix.
@ 2022-06-25  8:14 Justin Swartz
  2022-07-03  9:52 ` [PATCH resend] " Justin Swartz
  0 siblings, 1 reply; 5+ messages in thread
From: Justin Swartz @ 2022-06-25  8:14 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Robert Kolchmeyer, Justin Swartz

Assign "-all-static" (instead of "-static") to "static_LDFLAGS" in
Makefile.am, as libtool will only produce a static binary if it is
explicitly told that all of the linked libraries should be static.

BEFORE

$ file static
static: ELF 32-bit LSB pie executable, Intel 80386, version 1 (SYSV),
        dynamically linked, interpreter /lib/ld-musl-i386.so.1,
        not stripped

AFTER

$ file static
static: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
        statically linked, not stripped

REFERENCE

"Another common situation where static linking is desirable is in
 creating a standalone binary. Use libtool to do the linking and
 add the -all-static flag."  --  Libtool Manual, Section 3.7

Signed-off-by: Justin Swartz <justin.swartz@risingedge.co.za>
---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index b246064..d011919 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -51,7 +51,7 @@ ebtablesd_LDADD = libebtc.la
 ebtables_legacy_restore_SOURCES = ebtables-restore.c
 ebtables_legacy_restore_LDADD = libebtc.la
 static_SOURCES = ebtables-standalone.c $(libebtc_la_SOURCES)
-static_LDFLAGS = -static
+static_LDFLAGS = -all-static
 examples_ulog_test_ulog_SOURCES = examples/ulog/test_ulog.c getethertype.c
 
 daemon: ebtablesd ebtablesu
-- 


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

end of thread, other threads:[~2022-07-28 10:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-25  8:14 [PATCH] ebtables: extend the 'static' build target fix Justin Swartz
2022-07-03  9:52 ` [PATCH resend] " Justin Swartz
2022-07-28  8:13   ` Florian Westphal
2022-07-28  8:56     ` Justin Swartz
2022-07-28 10:37       ` Florian Westphal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.