Add support for install-strip target#1668
Add support for install-strip target#1668uilianries wants to merge 1 commit intothe-tcpdump-group:masterfrom
Conversation
Signed-off-by: Uilian Ries <uilianries@gmail.com>
| MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \ | ||
| $(STRIP) $(DESTDIR)$(libdir)/libpcap.so.$$VER 2>/dev/null || :; \ | ||
| $(STRIP) $(DESTDIR)$(libdir)/libpcap.$$VER.dylib 2>/dev/null || :; \ | ||
| $(STRIP) $(DESTDIR)$(libdir)/libpcap.$$MAJOR_VER 2>/dev/null || : |
There was a problem hiding this comment.
strip allows to specify more than one file argument, so with this approach there is no need to have three separate invocation.
Alternatively, since the "install-shared" target is parametrised on DYEXT, it could make more sense to parametrise "install-strip" the same way, then strip would apply to exactly the files that have been just installed.
On a separate note, this change does not strip rpcapd.
|
There are sound reasons to strip installed binaries, but as far as I am aware, various Linux and BSD distributions already enforce this directly and skip a dependency on "install-strip". That is, after "make install" has populated a temporary directory with files, but before all/some contents of the temporary directory becomes contents of a package, a distribution-specific script identifies and strips all binaries. This practice originates in times when the entire OS had to fit on a single CD, and before that — on as few floppies as possible. |
Hello!
The GNU standard targets point to
install-stripas a known target, where it invokesstripin order to remove symbols from binaries.As the
libpcapis heavily used in memory-constrained embedded environments, allowing an immediate stripped install helps the creation of lightweight root filesystems, like when using Buildroot or Yocto. For a regular Desktop application, it can still remove debug symbols.I built locally on Linux to validate this new target: libpcap-1.11.0-linux-amd64-gcc13-release-shared-stripped.log
Steps to Reproduce
Regards!