bpftool: Update to v7.4.0
authorTony Ambardar <itugrok@yahoo.com>
Wed, 3 Apr 2024 22:31:22 +0000 (15:31 -0700)
committerRobert Marko <robimarko@gmail.com>
Sat, 13 Apr 2024 09:20:41 +0000 (11:20 +0200)
Update to the latest upstream release to include recent improvements and
bugfixes. Update copyright, fix typo in PKG_NAME, and remove unneeded use
of MAKE_VARS definition in Makefile. Drop 001-cflags.patch and simplify
002-includes.patch after refreshing. Also simplify LTO/DCE build flags.

Link: https://github.com/libbpf/bpftool/releases/tag/v7.4.0
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
package/network/utils/bpftool/Makefile
package/network/utils/bpftool/patches/001-cflags.patch [deleted file]
package/network/utils/bpftool/patches/002-includes.patch

index d81cf95102bf4f759fe4625417c427a53efc79de..45f8904d8ddf74def5d10d0041b2ba792ded0e47 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2020-2023 Tony Ambardar <itugrok@yahoo.com>
+# Copyright (C) 2020-2024 Tony Ambardar <itugrok@yahoo.com>
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -7,18 +7,18 @@
 
 include $(TOPDIR)/rules.mk
 
-PKG_NAME:=bpftools
-PKG_VERSION:=7.3.0
+PKG_NAME:=bpftool
+PKG_VERSION:=7.4.0
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=https://github.com/libbpf/bpftool
-PKG_MIRROR_HASH:=42030a007714aa075fbd402ccb0196e4892344fb7215b4f51a99b633cc5104fa
+PKG_MIRROR_HASH:=18e22f72e67ff402b5ecaf314445f25c40bfe23299cb783b5834a496297c51ed
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=v7.3.0
+PKG_SOURCE_VERSION:=v7.4.0
 
 PKG_MAINTAINER:=Tony Ambardar <itugrok@yahoo.com>
 
-PKG_BUILD_FLAGS:=no-mips16
+PKG_BUILD_FLAGS:=no-mips16 gc-sections lto
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
@@ -62,19 +62,12 @@ define Package/bpftool-full/description
   eBPF programs and jited code.
 endef
 
-TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
-TARGET_LDFLAGS += -Wl,--gc-sections -flto
-
 ifeq ($(BUILD_VARIANT),full)
   full:=1
 else
   full:=0
 endif
 
-MAKE_VARS = \
-       EXTRA_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
-       LDFLAGS="$(TARGET_LDFLAGS)"
-
 MAKE_FLAGS += \
        OUTPUT="$(PKG_BUILD_DIR)/" \
        prefix="/usr" \
diff --git a/package/network/utils/bpftool/patches/001-cflags.patch b/package/network/utils/bpftool/patches/001-cflags.patch
deleted file mode 100644 (file)
index 39cef10..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/libbpf/src/Makefile
-+++ b/libbpf/src/Makefile
-@@ -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              \
index ac1b5fcc2286c336503639d531cbb5a09629c72e..e6ec3f262b9a5e9eda7a90a34cb6ef41b2bd9c4d 100644 (file)
@@ -1,14 +1,3 @@
---- a/libbpf/include/linux/list.h
-+++ b/libbpf/include/linux/list.h
-@@ -3,6 +3,8 @@
- #ifndef __LINUX_LIST_H
- #define __LINUX_LIST_H
-+#include <linux/types.h>
-+
- #define LIST_HEAD_INIT(name) { &(name), &(name) }
- #define LIST_HEAD(name) \
-         struct list_head name = LIST_HEAD_INIT(name)
 --- a/src/Makefile
 +++ b/src/Makefile
 @@ -73,10 +73,10 @@ CFLAGS += -W -Wall -Wextra -Wno-unused-p