bpftool: Update to version 7.1.0
authorHauke Mehrtens <hauke@hauke-m.de>
Sat, 25 Feb 2023 21:21:15 +0000 (22:21 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 5 Mar 2023 18:23:42 +0000 (19:23 +0100)
bpftool changelog: https://github.com/libbpf/bpftool/releases
libbpf changelog: https://github.com/libbpf/libbpf/releases

This updates the bfptool to version 7.1.0. This also includes an update
of the libbpf to version 1.1.

This also adds some new feature options and removes some old ones which
were also removed form the source code. zlib for example is now
mandatory.

Add -flto also to LD flags to make it really work.

Before this change bpftool was on a git commit between version 6.7 and
6.8 and libbpf was on a commit between version 0.7 and 0.8.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/network/utils/bpftools/Makefile
package/network/utils/bpftools/patches/001-cflags.patch
package/network/utils/bpftools/patches/002-includes.patch

index 56422e79026638995cdfda9b41968f70247e7c96..7adda2edafceeaff773445a24295ed4aaf4b25b0 100644 (file)
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=https://github.com/libbpf/bpftool
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2022-03-08
-PKG_SOURCE_VERSION:=04c465fd1f561f67796dc68bbfe1aa7cfa956c3c
-PKG_MIRROR_HASH:=e22a954cd186f43228a96586bbdc120b11e6c87360ab88ae96ba37afb9c7cb58
+PKG_SOURCE_DATE:=7.1.0
+PKG_SOURCE_VERSION:=b01941c8f7890489f09713348a7d89567538504b
+PKG_MIRROR_HASH:=641fb337342e25ae784a3efe72c71d8c88600a326300d8d5834e26be21547015
 PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
 
 PKG_MAINTAINER:=Tony Ambardar <itugrok@yahoo.com>
@@ -82,7 +82,7 @@ endef
 # LTO not compatible with DSO using PIC
 ifneq ($(BUILD_VARIANT),lib)
   TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
-  TARGET_LDFLAGS += -Wl,--gc-sections
+  TARGET_LDFLAGS += -Wl,--gc-sections -flto
 endif
 
 ifeq ($(BUILD_VARIANT),full)
@@ -102,11 +102,11 @@ MAKE_FLAGS += \
        LIBSUBDIR=lib \
        check_feat=0 \
        feature-clang-bpf-co-re=0 \
-       feature-reallocarray=1 \
-       feature-zlib=1 \
        feature-libbfd=$(full) \
+       feature-llvm=0 \
        feature-libcap=0 \
-       feature-disassembler-four-args=$(full)
+       feature-disassembler-four-args=1 \
+       feature-disassembler-init-styled=0
 
 ifeq ($(BUILD_VARIANT),lib)
   MAKE_PATH = libbpf/src
index 48617e302bd22f5b4f2b0cf12339564d60c6a3d0..b06842a0be7f6674a9eab65c5fa4bb1292e15366 100644 (file)
@@ -1,10 +1,10 @@
 --- a/libbpf/src/Makefile
 +++ b/libbpf/src/Makefile
-@@ -25,6 +25,7 @@ ALL_CFLAGS := $(INCLUDES)
+@@ -34,6 +34,7 @@ ALL_CFLAGS := $(INCLUDES)
  
  SHARED_CFLAGS += -fPIC -fvisibility=hidden -DSHARED
  
 +CFLAGS = $(EXTRA_CFLAGS)
  CFLAGS ?= -g -O2 -Werror -Wall -std=gnu89
- ALL_CFLAGS += $(CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
- ALL_LDFLAGS += $(LDFLAGS)
+ ALL_CFLAGS += $(CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 $(EXTRA_CFLAGS)
+ ALL_LDFLAGS += $(LDFLAGS) $(EXTRA_LDFLAGS)
index 589d71c31e799909604d69b6b1f9e70dafe958a1..ac1b5fcc2286c336503639d531cbb5a09629c72e 100644 (file)
@@ -14,7 +14,7 @@
 @@ -73,10 +73,10 @@ CFLAGS += -W -Wall -Wextra -Wno-unused-p
  CFLAGS += $(filter-out -Wswitch-enum -Wnested-externs,$(EXTRA_WARNINGS))
  CFLAGS += -DPACKAGE='"bpftool"' -D__EXPORTED_HEADERS__ \
-       -I$(if $(OUTPUT),$(OUTPUT),.) \
+       -I$(or $(OUTPUT),.) \
 -      -I$(LIBBPF_INCLUDE) \
        -I$(srctree)/src/kernel/bpf/ \
        -I$(srctree)/include \