Re: [PATCH resend] ebtables: extend the 'static' build target fix.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2022-07-28 10:13, Florian Westphal wrote:
Justin Swartz <justin.swartz@xxxxxxxxxxxxxxxx> 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

--%--



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux