Commit a6879552 authored by Ben Hutchings's avatar Ben Hutchings

Drop unnecessary changes from "libbpf: add SONAME to shared object"

It's not necessary to delete the definitions of the variables that
become unused.  Nor is it necessary to move the definition of
LIBBPF_VERSION before LIB_FILES, because the latter is defined
as recursively expanded (i.e. its variable references are not
immediately expanded).

This makes the actual change we're making clearer, and should
reduce the future work to maintain this patch.
parent 9329ccdf
linux (4.19.37-4) UNRELEASED; urgency=medium
* libbpf: Fix various build bugs:
- Drop unnecessary changes from "libbpf: add SONAME to shared object"
-- Ben Hutchings <ben@decadent.org.uk> Sun, 19 May 2019 00:04:16 +0100
linux (4.19.37-3) unstable; urgency=medium
* [powerpc*] 64s: Include cpu header (fixes FTBFS)
......
......@@ -11,44 +11,29 @@ This is similar to the change made to tools/lib/lockdep/Makefile in
be227b45fb228adff4371b8de9e3989904209ff4.
Signed-off-by: Hilko Bengen <bengen@debian.org>
[bwh: Drop unnecessary changes]
---
Index: linux/tools/lib/bpf/Makefile
===================================================================
--- linux.orig/tools/lib/bpf/Makefile
+++ linux/tools/lib/bpf/Makefile
@@ -1,10 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
# Most of this file is copied from tools/lib/traceevent/Makefile
-BPF_VERSION = 0
-BPF_PATCHLEVEL = 0
-BPF_EXTRAVERSION = 1
-
MAKEFLAGS += --no-print-directory
ifeq ($(srctree),)
@@ -94,17 +90,13 @@ export prefix libdir src obj
--- a/tools/lib/bpf/Makefile
+++ b/tools/lib/bpf/Makefile
@@ -94,7 +94,7 @@ export prefix libdir src obj
libdir_SQ = $(subst ','\'',$(libdir))
libdir_relative_SQ = $(subst ','\'',$(libdir_relative))
-LIB_FILE = libbpf.a libbpf.so
+LIBBPF_VERSION=$(shell make --no-print-directory -sC ../../.. kernelversion)
-VERSION = $(BPF_VERSION)
-PATCHLEVEL = $(BPF_PATCHLEVEL)
-EXTRAVERSION = $(BPF_EXTRAVERSION)
+LIB_FILE = libbpf.a libbpf.so.$(LIBBPF_VERSION)
VERSION = $(BPF_VERSION)
PATCHLEVEL = $(BPF_PATCHLEVEL)
@@ -103,7 +103,7 @@ EXTRAVERSION = $(BPF_EXTRAVERSION)
OBJ = $@
N =
-LIBBPF_VERSION = $(BPF_VERSION).$(BPF_PATCHLEVEL).$(BPF_EXTRAVERSION)
-
+LIBBPF_VERSION = $(shell make --no-print-directory -sC ../../.. kernelversion)
# Set compile option CFLAGS
ifdef EXTRA_CFLAGS
CFLAGS := $(EXTRA_CFLAGS)
@@ -168,8 +160,8 @@ $(BPF_IN): force elfdep bpfdep
@@ -169,8 +169,8 @@ $(BPF_IN): force elfdep bpfdep
echo "Warning: Kernel ABI header at 'tools/include/uapi/linux/if_link.h' differs from latest version at 'include/uapi/linux/if_link.h'" >&2 )) || true
$(Q)$(MAKE) $(build)=libbpf
......@@ -59,7 +44,7 @@ Index: linux/tools/lib/bpf/Makefile
$(OUTPUT)libbpf.a: $(BPF_IN)
$(QUIET_LINK)$(RM) $@; $(AR) rcs $@ $^
@@ -184,6 +176,7 @@ endef
@@ -185,6 +185,7 @@ endef
install_lib: all_cmd
$(call QUIET_INSTALL, $(LIB_FILE)) \
$(call do_install,$(LIB_FILE),$(libdir_SQ))
......
......@@ -12,15 +12,15 @@ Applied-Upstream: yes
FEATURE-DUMP.libbpf
--- a/tools/lib/bpf/Makefile
+++ b/tools/lib/bpf/Makefile
@@ -93,6 +93,7 @@
LIBBPF_VERSION=$(shell make --no-print-directory -sC ../../.. kernelversion)
@@ -95,6 +95,7 @@ libdir_SQ = $(subst ','\'',$(libdir))
libdir_relative_SQ = $(subst ','\'',$(libdir_relative))
LIB_FILE = libbpf.a libbpf.so.$(LIBBPF_VERSION)
+PC_FILE = libbpf.pc
OBJ = $@
N =
@@ -136,8 +137,9 @@
VERSION = $(BPF_VERSION)
PATCHLEVEL = $(BPF_PATCHLEVEL)
@@ -144,8 +145,9 @@ include $(srctree)/tools/build/Makefile.
BPF_IN := $(OUTPUT)libbpf-in.o
LIB_FILE := $(addprefix $(OUTPUT),$(LIB_FILE))
......@@ -31,7 +31,7 @@ Applied-Upstream: yes
TARGETS = $(CMD_TARGETS)
@@ -166,6 +168,12 @@
@@ -175,6 +177,12 @@ $(OUTPUT)libbpf.so.$(LIBBPF_VERSION): $(
$(OUTPUT)libbpf.a: $(BPF_IN)
$(QUIET_LINK)$(RM) $@; $(AR) rcs $@ $^
......@@ -44,7 +44,7 @@ Applied-Upstream: yes
define do_install
if [ ! -d '$(DESTDIR_SQ)$2' ]; then \
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$2'; \
@@ -184,7 +192,12 @@
@@ -193,7 +201,12 @@ install_headers:
$(call do_install,libbpf.h,$(prefix)/include/bpf,644);
$(call do_install,btf.h,$(prefix)/include/bpf,644);
......@@ -58,7 +58,7 @@ Applied-Upstream: yes
### Cleaning rules
@@ -193,7 +206,7 @@
@@ -202,7 +215,7 @@ config-clean:
$(Q)$(MAKE) -C $(srctree)/tools/build/feature/ clean >/dev/null
clean:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment