1+ From 7db11926f4dcb8b58c68cd3ce2d517c57199479b Mon Sep 17 00:00:00 2001
2+ From: Rudi Heitbaum <rudi@heitbaum.com>
3+ Date: Sun, 17 Oct 2021 18:05:42 +1100
4+ Subject: [PATCH] fix crosscompile and sysroot
5+
6+ ---
7+ src/Makefile | 9 +++------
8+ src/libbpf.pc.template | 2 +-
9+ 2 files changed, 4 insertions(+), 7 deletions(-)
10+
111diff --git a/src/Makefile b/src/Makefile
2- index 81ea6b8..7ab5f13 100644
12+ index 91cc02abb4..6046d06cc4 100644
313--- a/src/Makefile
414+++ b/src/Makefile
5- @@ -67 ,15 +67 ,12 @@ INSTALL = install
15+ @@ -84 ,15 +84 ,12 @@ INSTALL = install
616 DESTDIR ?=
717
818 HOSTARCH = $(firstword $(subst -, ,$(shell $(CC) -dumpmachine)))
@@ -20,7 +30,7 @@ index 81ea6b8..7ab5f13 100644
2030 LIBDIR_PC := $$\{prefix\}/$(LIBSUBDIR)
2131 else
2232 LIBDIR_PC := $(LIBDIR)
23- @@ -106 ,7 +103 ,7 @@ $(OBJDIR)/libbpf.so.$(LIBBPF_VERSION): $(SHARED_OBJS)
33+ @@ -123 ,7 +120 ,7 @@ $(OBJDIR)/libbpf.so.$(LIBBPF_VERSION): $(SHARED_OBJS)
2434 $^ $(ALL_LDFLAGS) -o $@
2535
2636 $(OBJDIR)/libbpf.pc: force | $(OBJDIR)
@@ -30,7 +40,7 @@ index 81ea6b8..7ab5f13 100644
3040 -e "s|@VERSION@|$(LIBBPF_VERSION)|" \
3141 < libbpf.pc.template > $@
3242diff --git a/src/libbpf.pc.template b/src/libbpf.pc.template
33- index b45ed53..fe6ddde 100644
43+ index b45ed534bd..fe6ddde5ac 100644
3444--- a/src/libbpf.pc.template
3545+++ b/src/libbpf.pc.template
3646@@ -7,6 +7,6 @@ includedir=${prefix}/include
@@ -41,3 +51,6 @@ index b45ed53..fe6ddde 100644
4151+ Libs: -L${libdir} -lbpf -lz
4252 Requires.private: libelf zlib
4353 Cflags: -I${includedir}
54+ - -
55+ 2.53.0
56+
0 commit comments