From: Don Zickus on
gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2749#note_1607...
@codonell-rh @vmalikrh - patching samples/bpf/Makefile (add quotes around
TPROGS_LDFLAGS) allowed me to use TPROGS_LDFLAGS correctly.
@vmalikrh - who to send this patch to upstream? I assume they will take it?
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 4ccf4236031c..053f148e4b52 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -247,7 +247,7 @@ clean:
$(LIBBPF): $(wildcard $(LIBBPF_SRC)/*.[ch] $(LIBBPF_SRC)/Makefile) |
$(LIBBPF_OUTPUT)
# Fix up variables inherited from Kbuild that tools/ build system won't like
$(MAKE) -C $(LIBBPF_SRC) RM='rm -rf'
EXTRA_CFLAGS="$(TPROGS_CFLAGS)" \
- LDFLAGS=$(TPROGS_LDFLAGS) srctree=$(BPF_SAMPLES_PATH)/../../ \
+ LDFLAGS="$(TPROGS_LDFLAGS)" srctree=$(BPF_SAMPLES_PATH)/../../
\
O= OUTPUT=$(LIBBPF_OUTPUT)/ DESTDIR=$(LIBBPF_DESTDIR) prefix=
\
$@ install_headers