[Buildroot] [PATCH] tcpdump: use libpcap shared library

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Thu Oct 30 21:01:08 UTC 2014


Dear Baruch Siach,

On Wed, 29 Oct 2014 14:20:21 +0200, Baruch Siach wrote:
> Currently the tcpdump configure script finds libpcap.a in
> output/build/libpcap-[version]. This check is hard coded in aclocal.m4. Add a
> patch to optionally ignore local libpcap so that the system shared library
> version is found instead. This reduces the tcpdump binary size in a few 100KB.
> 
> Signed-off-by: Baruch Siach <baruch at tkos.co.il>
> ---
>  ...libpcap-when-configured-with-with-system-.patch | 78 ++++++++++++++++++++++
>  package/tcpdump/tcpdump.mk                         |  7 +-
>  2 files changed, 83 insertions(+), 2 deletions(-)
>  create mode 100644 package/tcpdump/0001-Use-system-libpcap-when-configured-with-with-system-.patch

Applied, thanks.

However, the tcpdump library has an invalid rpath:

 0x0000000f (RPATH)                      Library rpath: [/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib]

This rpath comes from the fact that pcap-config returns a -Wl,-rpath
option that it should not. If you have some time to look into that, it
would be good (especially if it's done in a way acceptable upstream!).

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


More information about the buildroot mailing list