public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH 0/6] tools build: bpf: Append EXTRA_CFLAGS and HOST_EXTRACFLAGS
@ 2026-03-23 15:40 Leo Yan
  2026-03-23 15:40 ` [PATCH 1/6] bpftool: Avoid adding EXTRA_CFLAGS to HOST_CFLAGS Leo Yan
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Leo Yan @ 2026-03-23 15:40 UTC (permalink / raw)
  To: Quentin Monnet, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko, Martin KaFai Lau, Eduard Zingerman, Song Liu,
	Yonghong Song, John Fastabend, KP Singh, Stanislav Fomichev,
	Hao Luo, Jiri Olsa, Shuah Khan, Lorenz Bauer, Nathan Chancellor,
	Nick Desaulniers, Bill Wendling, Justin Stitt
  Cc: Arnaldo Carvalho de Melo, Namhyung Kim, Ian Rogers, James Clark,
	Kees Cook, bpf, linux-kernel, linux-kselftest, llvm, Leo Yan

Append EXTRA_CFLAGS and HOST_EXTRACFLAGS to the BPF build.

This mitigates an issue introduced in GCC 15, where a {0} initializer
does not guarantee zeroing the entire union [1].

The common changes under tools to support EXTRA_CFLAGS and
HOST_EXTRACFLAGS are sent separately [2].  As suggested, BPF patches
would be picked up via the bpf tree, so this series only includes BPF
related changes.

Verification (bpf-ci):

Test 1: With full tools changes applied
  https://github.com/kernel-patches/bpf/actions/runs/23439834394

Test 2: Only BPF changes
  https://github.com/kernel-patches/bpf/actions/runs/23440507945

[1] https://gcc.gnu.org/gcc-15/changes.html
[2] https://lore.kernel.org/linux-perf-users/20260323-tools_build_fix_zero_init-v6-0-235858c51af9@arm.com/T/#t

Signed-off-by: Leo Yan <leo.yan@arm.com>
---
Leo Yan (6):
      bpftool: Avoid adding EXTRA_CFLAGS to HOST_CFLAGS
      bpftool: Append extra host flags
      libbpf: Initialize CFLAGS before including Makefile.include
      tools/bpf: build: Append extra cflags
      selftests/bpf: Initialize operation name before use
      selftests/bpf: Append extra cflags

 tools/bpf/Makefile                                    |  1 +
 tools/bpf/bpftool/Makefile                            |  9 +++++++--
 tools/lib/bpf/Makefile                                | 17 +++++++++--------
 tools/testing/selftests/bpf/Makefile                  | 10 ++++++++--
 tools/testing/selftests/bpf/prog_tests/verifier_log.c |  1 +
 5 files changed, 26 insertions(+), 12 deletions(-)
---
base-commit: bfec8e88ff6022b056615ec71506703e7e54de82
change-id: 20260323-tools_build_fix_zero_init_bpf_only-52232f62fb7f

Best regards,
-- 
Leo Yan <leo.yan@arm.com>


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-03-31  8:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-23 15:40 [PATCH 0/6] tools build: bpf: Append EXTRA_CFLAGS and HOST_EXTRACFLAGS Leo Yan
2026-03-23 15:40 ` [PATCH 1/6] bpftool: Avoid adding EXTRA_CFLAGS to HOST_CFLAGS Leo Yan
2026-03-31  8:46   ` kernel test robot
2026-03-23 15:40 ` [PATCH 2/6] bpftool: Append extra host flags Leo Yan
2026-03-23 15:40 ` [PATCH 3/6] libbpf: Initialize CFLAGS before including Makefile.include Leo Yan
2026-03-23 22:50   ` Ihor Solodrai
2026-03-23 15:40 ` [PATCH 4/6] tools/bpf: build: Append extra cflags Leo Yan
2026-03-23 15:40 ` [PATCH 5/6] selftests/bpf: Initialize operation name before use Leo Yan
2026-03-23 22:52   ` Ihor Solodrai
2026-03-24  6:58     ` Leo Yan
2026-03-24 15:55       ` Alexei Starovoitov
2026-03-23 15:40 ` [PATCH 6/6] selftests/bpf: Append extra cflags Leo Yan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox