Skip to content
Snippets Groups Projects
  • Jo-Philipp Wich's avatar
    386803a0
    iproute2: only link libelf where needed · 386803a0
    Jo-Philipp Wich authored
    The iproute2 build system links libelf support to every utility while only
    the tc program actually requires libelf specific functionality.
    
    Unfortunately the BPF ELF functionality is not confined into an own
    compilation unit but added to the existing bpf.c sources of the shared
    static libutil.a, causing every iproute2 applet to pick up an implicit
    libelf.so dependency.
    
    In order to avoid this requirement, patch the iproute2 build system to
    create both a libutil.a and a libutil-elf.a, with the former being built
    without libelf functionality and to only link the tc applet with the libelf
    enabled libutil.
    
    Finally, make the tc package depend on libelf to solve compilation errors.
    
    Ref: https://github.com/openwrt/packages/issues/7728
    
    
    Fixes: FS#2011
    Signed-off-by: default avatarJo-Philipp Wich <jo@mein.io>
    386803a0
    History
    iproute2: only link libelf where needed
    Jo-Philipp Wich authored
    The iproute2 build system links libelf support to every utility while only
    the tc program actually requires libelf specific functionality.
    
    Unfortunately the BPF ELF functionality is not confined into an own
    compilation unit but added to the existing bpf.c sources of the shared
    static libutil.a, causing every iproute2 applet to pick up an implicit
    libelf.so dependency.
    
    In order to avoid this requirement, patch the iproute2 build system to
    create both a libutil.a and a libutil-elf.a, with the former being built
    without libelf functionality and to only link the tc applet with the libelf
    enabled libutil.
    
    Finally, make the tc package depend on libelf to solve compilation errors.
    
    Ref: https://github.com/openwrt/packages/issues/7728
    
    
    Fixes: FS#2011
    Signed-off-by: default avatarJo-Philipp Wich <jo@mein.io>