diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 01:02:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 01:02:38 +0000 |
commit | 08b74a000942a380fe028845f92cd3a0dee827d5 (patch) | |
tree | aa78b4e12607c3e1fcce8d5cc42df4330792f118 /debian/patches/bugfix/all/libbpf-add-soname-to-shared-object.patch | |
parent | Adding upstream version 4.19.249. (diff) | |
download | linux-debian/4.19.249-2.tar.xz linux-debian/4.19.249-2.zip |
Adding debian version 4.19.249-2.debian/4.19.249-2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/bugfix/all/libbpf-add-soname-to-shared-object.patch')
-rw-r--r-- | debian/patches/bugfix/all/libbpf-add-soname-to-shared-object.patch | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/debian/patches/bugfix/all/libbpf-add-soname-to-shared-object.patch b/debian/patches/bugfix/all/libbpf-add-soname-to-shared-object.patch new file mode 100644 index 000000000..40f2bcc1d --- /dev/null +++ b/debian/patches/bugfix/all/libbpf-add-soname-to-shared-object.patch @@ -0,0 +1,56 @@ +From: Hilko Bengen <bengen@debian.org> +Date: Sun, 02 Dec 2018 23:26:03 +0000 +Subject: libbpf: add SONAME to shared object + +tools/lib/bpf/libbpf: Add proper version to the shared object. + +Add versioning to the shared object to make it easier on distros to +distribute the library without having to watch for API/ABI versioning. + +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 +@@ -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 ++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 | cut -d. -f1,2) + + # Set compile option CFLAGS + ifdef EXTRA_CFLAGS +@@ -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 + +-$(OUTPUT)libbpf.so: $(BPF_IN) +- $(QUIET_LINK)$(CC) --shared $^ -o $@ ++$(OUTPUT)libbpf.so.$(LIBBPF_VERSION): $(BPF_IN) ++ $(QUIET_LINK)$(CC) --shared $^ -Wl,-soname,$(@F) -o $@ + + $(OUTPUT)libbpf.a: $(BPF_IN) + $(QUIET_LINK)$(RM) $@; $(AR) rcs $@ $^ +@@ -185,6 +185,7 @@ endef + install_lib: all_cmd + $(call QUIET_INSTALL, $(LIB_FILE)) \ + $(call do_install,$(LIB_FILE),$(libdir_SQ)) ++ $(Q)ln -sf libbpf.so.$(LIBBPF_VERSION) $(DESTDIR_SQ)$(libdir_SQ)/libbpf.so + + install_headers: + $(call QUIET_INSTALL, headers) \ |