All of lore.kernel.org
 help / color / mirror / Atom feed
From: Justin Swartz <justin.swartz@risingedge.co.za>
To: netfilter-devel@vger.kernel.org
Cc: justin.swartz@risingedge.co.za, rkolchmeyer@google.com,
	fw@strlen.de, pablo@netfilter.org
Subject: [PATCH resend] ebtables: extend the 'static' build target fix.
Date: Sun, 03 Jul 2022 11:52:30 +0200	[thread overview]
Message-ID: <42ed3ff1408e811918f138e1f1aefec1@risingedge.co.za> (raw)
In-Reply-To: <20220625081441.13323-1-justin.swartz@risingedge.co.za>

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

  reply	other threads:[~2022-07-03 10:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-25  8:14 [PATCH] ebtables: extend the 'static' build target fix Justin Swartz
2022-07-03  9:52 ` Justin Swartz [this message]
2022-07-28  8:13   ` [PATCH resend] " Florian Westphal
2022-07-28  8:56     ` Justin Swartz
2022-07-28 10:37       ` Florian Westphal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42ed3ff1408e811918f138e1f1aefec1@risingedge.co.za \
    --to=justin.swartz@risingedge.co.za \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=rkolchmeyer@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.