netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Justin Swartz <justin.swartz@risingedge.co.za>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org, rkolchmeyer@google.com,
	pablo@netfilter.org
Subject: Re: [PATCH resend] ebtables: extend the 'static' build target fix.
Date: Thu, 28 Jul 2022 10:56:00 +0200	[thread overview]
Message-ID: <e8710ee1bd03701352fb89dfcc385308@risingedge.co.za> (raw)
In-Reply-To: <YuJFD5/1y1rhhyCZ@strlen.de>

On 2022-07-28 10:13, Florian Westphal wrote:
> Justin Swartz <justin.swartz@risingedge.co.za> wrote:
>> 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 libtool conversion "make static" did not create a static binary
> either.  It builds a version of ebtables that has libebtables.so
> baked in.
> 
> So, as far as I can see, "make static" does the same thing it
> did prio to automake/libtool conversion, place all the extensions
> and libebtables in the "static" binary, but link libc.so dynamically.

Thanks for the clarification.

I assumed "make static" was intended to produce an actual static binary.

As part of a small distribution that I use on a few bridging firewalls,
I have only ebtables and busybox, both built as static binaries, plus
inittab and a few init scripts.

I don't mind patching "Makefile.am" for myself, but I would also be 
happy
to submit something like the following, if nice-to-have, to provide an
"allstatic" which shouldn't break anything for those who require 
"static"
in its current form.

--%--

  sbin_PROGRAMS = ebtables-legacy ebtablesd ebtablesu 
ebtables-legacy-restore
-EXTRA_PROGRAMS = static examples/ulog/test_ulog
+EXTRA_PROGRAMS = allstatic static examples/ulog/test_ulog
  sysconf_DATA = ethertypes

  ...

  static_SOURCES = ebtables-standalone.c $(libebtc_la_SOURCES)
  static_LDFLAGS = -static
+allstatic_SOURCES = $(static_SOURCES)
+allstatic_LDFLAGS = -all-static
  examples_ulog_test_ulog_SOURCES = examples/ulog/test_ulog.c 
getethertype.c

--%--

  reply	other threads:[~2022-07-28  8:56 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 ` [PATCH resend] " Justin Swartz
2022-07-28  8:13   ` Florian Westphal
2022-07-28  8:56     ` Justin Swartz [this message]
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=e8710ee1bd03701352fb89dfcc385308@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 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).