mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-10-13 21:26:17 +00:00
bpf: unbreak libelf linkage for bpf obj loader
Commit69fed534a5
("change how Config is used in Makefile's") moved HAVE_MNL specific CFLAGS/LDLIBS for building with libmnl out of the top level Makefile into sub-Makefiles. However, it also removed the HAVE_ELF specific CFLAGS/LDLIBS entirely, which breaks the BPF object loader for tc and ip with "No ELF library support compiled in." despite having libelf detected in configure script. Fix it similarly as in69fed534a5
for HAVE_ELF. Fixes:69fed534a5
("change how Config is used in Makefile's") Reported-by: Jeffrey Panneman <jeffrey.panneman@tno.nl> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:
parent
fb6cb30774
commit
8cc360fe48
@ -19,6 +19,10 @@ ifeq ($(IP_CONFIG_SETNS),y)
|
||||
CFLAGS += -DHAVE_SETNS
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_ELF),y)
|
||||
CFLAGS += -DHAVE_ELF
|
||||
LDLIBS += -lelf
|
||||
endif
|
||||
ifeq ($(HAVE_MNL),y)
|
||||
CFLAGS += -DHAVE_LIBMNL $(shell $(PKG_CONFIG) libmnl --cflags)
|
||||
LDLIBS += $(shell $(PKG_CONFIG) libmnl --libs)
|
||||
|
@ -4,6 +4,10 @@ ifeq ($(IP_CONFIG_SETNS),y)
|
||||
CFLAGS += -DHAVE_SETNS
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_ELF),y)
|
||||
CFLAGS += -DHAVE_ELF
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_MNL),y)
|
||||
CFLAGS += -DHAVE_LIBMNL $(shell $(PKG_CONFIG) libmnl --cflags)
|
||||
endif
|
||||
|
@ -102,6 +102,10 @@ endif
|
||||
TCOBJ += $(TCMODULES)
|
||||
LDLIBS += -L. -lm
|
||||
|
||||
ifeq ($(HAVE_ELF),y)
|
||||
CFLAGS += -DHAVE_ELF
|
||||
LDLIBS += -lelf
|
||||
endif
|
||||
ifeq ($(HAVE_MNL),y)
|
||||
CFLAGS += -DHAVE_LIBMNL $(shell $(PKG_CONFIG) libmnl --cflags)
|
||||
LDLIBS += $(shell $(PKG_CONFIG) libmnl --libs)
|
||||
|
Loading…
Reference in New Issue
Block a user