bpftool: Update to v7.4.0

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>
This commit is contained in:
Tony Ambardar 2024-04-03 15:31:22 -07:00 committed by Robert Marko
parent 5b07c37dfa
commit 4d8a9a954a
3 changed files with 6 additions and 34 deletions

View 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" \

View File

@ -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 \

View 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