mirror of
https://github.com/openwrt/openwrt.git
synced 2024-11-23 18:05:20 +08:00
xdp-tools: update to v1.4.2
- release notes: https://github.com/xdp-project/xdp-tools/releases/tag/v1.4.2 - patches rebased manually: - 010-configure-respect-LDFLAGS.patch Signed-off-by: Konstantin Demin <rockdrilla@gmail.com> Link: https://github.com/openwrt/openwrt/pull/15705 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
parent
8cad52a267
commit
f3080677f5
@ -2,8 +2,8 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=xdp-tools
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=1.2.9
|
||||
PKG_HASH:=159ed8d3c8195d812ec3cde83bd736245a72743af372998320d39c2ba69ab142
|
||||
PKG_VERSION:=1.4.2
|
||||
PKG_HASH:=49c2b96b2be878449a797a74ca515a63e13418cb8ea904df08f8ef9cb2ac5570
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/xdp-project/xdp-tools/tar.gz/v$(PKG_VERSION)?
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -174,7 +174,7 @@ int main(int argc, char **argv) {
|
||||
@@ -191,7 +191,7 @@ int main(int argc, char **argv) {
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
@ -9,16 +9,16 @@
|
||||
if [ "$?" -eq "0" ]; then
|
||||
echo "HAVE_PCAP:=y" >>$CONFIG
|
||||
[ -n "$LIBPCAP_CFLAGS" ] && echo 'CFLAGS += ' $LIBPCAP_CFLAGS >> $CONFIG
|
||||
@@ -222,7 +222,7 @@ int main(int argc, char **argv) {
|
||||
@@ -267,7 +267,7 @@ int main(int argc, char **argv) {
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
- libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror $LIBBPF_CFLAGS $LIBBPF_LDLIBS 2>&1)
|
||||
+ libbpf_err=$($CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror $LIBBPF_CFLAGS $LIBBPF_LDLIBS $LDFLAGS 2>&1)
|
||||
- compile_cmd="$CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror $LIBBPF_CFLAGS $LIBBPF_LDLIBS"
|
||||
+ compile_cmd="$CC -o $TMPDIR/libbpftest $TMPDIR/libbpftest.c -Werror $LIBBPF_CFLAGS $LIBBPF_LDLIBS $LDFLAGS"
|
||||
libbpf_err=$($compile_cmd 2>&1)
|
||||
if [ "$?" -eq "0" ]; then
|
||||
echo "HAVE_FEATURES+=${config_var}" >>"$CONFIG"
|
||||
echo "yes"
|
||||
@@ -289,7 +289,7 @@ int main(int argc, char **argv) {
|
||||
@@ -345,7 +345,7 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
EOF
|
||||
|
||||
|
@ -18,7 +18,7 @@ Signed-off-by: Andre Heider <a.heider@gmail.com>
|
||||
|
||||
--- a/lib/libxdp/protocol.org
|
||||
+++ b/lib/libxdp/protocol.org
|
||||
@@ -54,7 +54,7 @@ static volatile const struct xdp_dispatc
|
||||
@@ -59,7 +59,7 @@ static volatile const struct xdp_dispatc
|
||||
/* The volatile return value prevents the compiler from assuming it knows the
|
||||
* return value and optimising based on that.
|
||||
*/
|
||||
@ -29,7 +29,7 @@ Signed-off-by: Andre Heider <a.heider@gmail.com>
|
||||
|
||||
--- a/lib/libxdp/xdp-dispatcher.c.in
|
||||
+++ b/lib/libxdp/xdp-dispatcher.c.in
|
||||
@@ -30,7 +30,7 @@ static volatile const struct xdp_dispatc
|
||||
@@ -29,7 +29,7 @@ static volatile const struct xdp_dispatc
|
||||
* return value and optimising based on that.
|
||||
*/
|
||||
forloop(`i', `0', NUM_PROGS,
|
||||
@ -38,7 +38,7 @@ Signed-off-by: Andre Heider <a.heider@gmail.com>
|
||||
int format(`prog%d', i)(struct xdp_md *ctx) {
|
||||
volatile int ret = XDP_DISPATCHER_RETVAL;
|
||||
|
||||
@@ -40,7 +40,7 @@ int format(`prog%d', i)(struct xdp_md *c
|
||||
@@ -39,7 +39,7 @@ int format(`prog%d', i)(struct xdp_md *c
|
||||
}
|
||||
')
|
||||
|
||||
|
@ -19,7 +19,7 @@ Signed-off-by: Andre Heider <a.heider@gmail.com>
|
||||
|
||||
--- a/lib/libxdp/Makefile
|
||||
+++ b/lib/libxdp/Makefile
|
||||
@@ -30,7 +30,7 @@ PC_FILE := $(OBJDIR)/libxdp.pc
|
||||
@@ -28,7 +28,7 @@ PC_FILE := $(OBJDIR)/libxdp.pc
|
||||
TEMPLATED_SOURCES := xdp-dispatcher.c
|
||||
|
||||
CFLAGS += -I$(HEADER_DIR)
|
||||
|
@ -17,7 +17,7 @@ Signed-off-by: Andre Heider <a.heider@gmail.com>
|
||||
|
||||
--- a/lib/common.mk
|
||||
+++ b/lib/common.mk
|
||||
@@ -108,12 +108,12 @@ $(XDP_OBJ): %.o: %.c $(KERN_USER_H) $(EX
|
||||
@@ -111,12 +111,12 @@ $(XDP_OBJ): %.o: %.c $(KERN_USER_H) $(EX
|
||||
$(QUIET_CLANG)$(CLANG) -S \
|
||||
-target $(BPF_TARGET) \
|
||||
-D __BPF_TRACING__ \
|
||||
@ -33,7 +33,7 @@ Signed-off-by: Andre Heider <a.heider@gmail.com>
|
||||
|
||||
--- a/lib/libxdp/Makefile
|
||||
+++ b/lib/libxdp/Makefile
|
||||
@@ -139,12 +139,12 @@ $(XDP_OBJS): %.o: %.c $(BPF_HEADERS) $(L
|
||||
@@ -138,12 +138,12 @@ $(XDP_OBJS): %.o: %.c $(BPF_HEADERS) $(L
|
||||
$(QUIET_CLANG)$(CLANG) -S \
|
||||
-target $(BPF_TARGET) \
|
||||
-D __BPF_TRACING__ \
|
||||
|
@ -33,18 +33,18 @@ Signed-off-by: Andre Heider <a.heider@gmail.com>
|
||||
find_tool()
|
||||
--- a/lib/common.mk
|
||||
+++ b/lib/common.mk
|
||||
@@ -115,7 +115,7 @@ $(XDP_OBJ): %.o: %.c $(KERN_USER_H) $(EX
|
||||
@@ -118,7 +118,7 @@ $(XDP_OBJ): %.o: %.c $(KERN_USER_H) $(EX
|
||||
-Werror \
|
||||
$(BPF_CFLAGS) \
|
||||
-O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
|
||||
- $(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
|
||||
+ $(QUIET_LLC)$(LLC) $(BPF_LDFLAGS) -filetype=obj -o $@ ${@:.o=.ll}
|
||||
|
||||
.PHONY: man
|
||||
ifeq ($(EMACS),)
|
||||
$(BPF_SKEL_H): %.skel.h: %.bpf.o
|
||||
$(QUIET_GEN)$(BPFTOOL) gen skeleton $< name ${@:.skel.h=} > $@
|
||||
--- a/lib/libxdp/Makefile
|
||||
+++ b/lib/libxdp/Makefile
|
||||
@@ -146,7 +146,7 @@ $(XDP_OBJS): %.o: %.c $(BPF_HEADERS) $(L
|
||||
@@ -145,7 +145,7 @@ $(XDP_OBJS): %.o: %.c $(BPF_HEADERS) $(L
|
||||
-Werror \
|
||||
$(BPF_CFLAGS) \
|
||||
-O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
|
||||
|
Loading…
Reference in New Issue
Block a user