aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorFederico Pellegrin <fede@evolware.org>2025-07-18 06:12:24 +0200
committerNamhyung Kim <namhyung@kernel.org>2025-07-20 20:49:35 -0700
commite9fdf0d2ecc095ce9f078588c7ce06967e0138b2 (patch)
treec26b6c1b638b31159451c73de82ead39065d27bd
parentperf sched timehist: decode process names of processes in zombie state (diff)
downloadwireguard-linux-e9fdf0d2ecc095ce9f078588c7ce06967e0138b2.tar.xz
wireguard-linux-e9fdf0d2ecc095ce9f078588c7ce06967e0138b2.zip
perf build: Always disable stack protection for BPF skeleton objects
When the clang toolchain has stack protection enabled, the bpf skeletons build fails with: error: A call to built-in function '__stack_chk_fail' is not supported. Since stack-protector makes no sense for the BPF bits, just unconditionally disable it. See also similar case at 878625e1c7a10dfbb1fdaaaae2c4d2a58fbce627 Signed-off-by: Federico Pellegrin <fede@evolware.org> Link: https://lore.kernel.org/r/20250718041224.12389-1-fede@evolware.org [ rearrange long lines ] Signed-off-by: Namhyung Kim <namhyung@kernel.org>
-rw-r--r--tools/perf/Makefile.perf6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 9b51593628c1..e2150acc2c13 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -1249,8 +1249,10 @@ else
$(Q)cp "$(VMLINUX_H)" $@
endif
-$(SKEL_TMP_OUT)/%.bpf.o: util/bpf_skel/%.bpf.c $(OUTPUT)PERF-VERSION-FILE util/bpf_skel/perf_version.h $(LIBBPF) $(SKEL_OUT)/vmlinux.h | $(SKEL_TMP_OUT)
- $(QUIET_CLANG)$(CLANG) -g -O2 --target=bpf $(CLANG_OPTIONS) $(BPF_INCLUDE) $(TOOLS_UAPI_INCLUDE) \
+$(SKEL_TMP_OUT)/%.bpf.o: $(OUTPUT)PERF-VERSION-FILE util/bpf_skel/perf_version.h | $(SKEL_TMP_OUT)
+$(SKEL_TMP_OUT)/%.bpf.o: util/bpf_skel/%.bpf.c $(LIBBPF) $(SKEL_OUT)/vmlinux.h
+ $(QUIET_CLANG)$(CLANG) -g -O2 -fno-stack-protector --target=bpf \
+ $(CLANG_OPTIONS) $(BPF_INCLUDE) $(TOOLS_UAPI_INCLUDE) \
-include $(OUTPUT)PERF-VERSION-FILE -include util/bpf_skel/perf_version.h \
-c $(filter util/bpf_skel/%.bpf.c,$^) -o $@