PKG_NAME:=xdp-tools
PKG_RELEASE:=1
-PKG_VERSION:=1.4.2
-PKG_HASH:=49c2b96b2be878449a797a74ca515a63e13418cb8ea904df08f8ef9cb2ac5570
+PKG_VERSION:=1.2.9
+PKG_HASH:=159ed8d3c8195d812ec3cde83bd736245a72743af372998320d39c2ba69ab142
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/xdp-project/xdp-tools/tar.gz/v$(PKG_VERSION)?
--- a/configure
+++ b/configure
-@@ -191,7 +191,7 @@ int main(int argc, char **argv) {
+@@ -174,7 +174,7 @@ int main(int argc, char **argv) {
return 0;
}
EOF
if [ "$?" -eq "0" ]; then
echo "HAVE_PCAP:=y" >>$CONFIG
[ -n "$LIBPCAP_CFLAGS" ] && echo 'CFLAGS += ' $LIBPCAP_CFLAGS >> $CONFIG
-@@ -267,7 +267,7 @@ int main(int argc, char **argv) {
+@@ -222,7 +222,7 @@ int main(int argc, char **argv) {
return 0;
}
EOF
-- 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)
+- 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)
if [ "$?" -eq "0" ]; then
echo "HAVE_FEATURES+=${config_var}" >>"$CONFIG"
-@@ -345,7 +345,7 @@ int main(int argc, char **argv) {
+ echo "yes"
+@@ -289,7 +289,7 @@ int main(int argc, char **argv) {
}
EOF
--- a/lib/libxdp/protocol.org
+++ b/lib/libxdp/protocol.org
-@@ -59,7 +59,7 @@ static volatile const struct xdp_dispatc
+@@ -54,7 +54,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.
*/
--- a/lib/libxdp/xdp-dispatcher.c.in
+++ b/lib/libxdp/xdp-dispatcher.c.in
-@@ -29,7 +29,7 @@ static volatile const struct xdp_dispatc
+@@ -30,7 +30,7 @@ static volatile const struct xdp_dispatc
* return value and optimising based on that.
*/
forloop(`i', `0', NUM_PROGS,
int format(`prog%d', i)(struct xdp_md *ctx) {
volatile int ret = XDP_DISPATCHER_RETVAL;
-@@ -39,7 +39,7 @@ int format(`prog%d', i)(struct xdp_md *c
+@@ -40,7 +40,7 @@ int format(`prog%d', i)(struct xdp_md *c
}
')
--- a/lib/libxdp/Makefile
+++ b/lib/libxdp/Makefile
-@@ -28,7 +28,7 @@ PC_FILE := $(OBJDIR)/libxdp.pc
+@@ -30,7 +30,7 @@ PC_FILE := $(OBJDIR)/libxdp.pc
TEMPLATED_SOURCES := xdp-dispatcher.c
CFLAGS += -I$(HEADER_DIR)
--- a/lib/common.mk
+++ b/lib/common.mk
-@@ -111,12 +111,12 @@ $(XDP_OBJ): %.o: %.c $(KERN_USER_H) $(EX
+@@ -108,12 +108,12 @@ $(XDP_OBJ): %.o: %.c $(KERN_USER_H) $(EX
$(QUIET_CLANG)$(CLANG) -S \
-target $(BPF_TARGET) \
-D __BPF_TRACING__ \
--- a/lib/libxdp/Makefile
+++ b/lib/libxdp/Makefile
-@@ -138,12 +138,12 @@ $(XDP_OBJS): %.o: %.c $(BPF_HEADERS) $(L
+@@ -139,12 +139,12 @@ $(XDP_OBJS): %.o: %.c $(BPF_HEADERS) $(L
$(QUIET_CLANG)$(CLANG) -S \
-target $(BPF_TARGET) \
-D __BPF_TRACING__ \
find_tool()
--- a/lib/common.mk
+++ b/lib/common.mk
-@@ -118,7 +118,7 @@ $(XDP_OBJ): %.o: %.c $(KERN_USER_H) $(EX
+@@ -115,7 +115,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}
- $(BPF_SKEL_H): %.skel.h: %.bpf.o
- $(QUIET_GEN)$(BPFTOOL) gen skeleton $< name ${@:.skel.h=} > $@
+ .PHONY: man
+ ifeq ($(EMACS),)
--- a/lib/libxdp/Makefile
+++ b/lib/libxdp/Makefile
-@@ -145,7 +145,7 @@ $(XDP_OBJS): %.o: %.c $(BPF_HEADERS) $(L
+@@ -146,7 +146,7 @@ $(XDP_OBJS): %.o: %.c $(BPF_HEADERS) $(L
-Werror \
$(BPF_CFLAGS) \
-O2 -emit-llvm -c -g -o ${@:.o=.ll} $<