mirror of
https://github.com/torvalds/linux.git
synced 2026-03-13 22:36:17 +01:00
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 878625e1c7
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>
This commit is contained in:
parent
39f473f6d0
commit
e9fdf0d2ec
1 changed files with 4 additions and 2 deletions
|
|
@ -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 $@
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue