All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 0/8] tools build: bpf: Append EXTRA_CFLAGS and HOST_EXTRACFLAGS
@ 2026-06-02 14:47 Leo Yan
  2026-06-02 14:47 ` [PATCH bpf-next v2 1/8] bpftool: Pass host flags to bootstrap libbpf Leo Yan
                   ` (7 more replies)
  0 siblings, 8 replies; 17+ messages in thread
From: Leo Yan @ 2026-06-02 14:47 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,
	Ihor Solodrai

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 on bpf-ci (with tools changes [2]:

  https://github.com/kernel-patches/bpf/actions/runs/26815163486

[1] https://gcc.gnu.org/gcc-15/changes.html
[2] https://lore.kernel.org/all/20260602-tools_build_fix_zero_init-v7-0-631baf679fe7@arm.com/

Signed-off-by: Leo Yan <leo.yan@arm.com>
---
Changes in v2:
- Used strscpy() instead in patch 06 (Ihor).
- Added prefix "bpf-next" in subject (Alexei).
- Added patch 01 to pass host cflags to bootstrap libbpf.
- Added patch 08 to avoid static LLVM linking for cross build.
- Link to v1: https://lore.kernel.org/r/20260323-tools_build_fix_zero_init_bpf_only-v1-0-d1cfad2f4cd1@arm.com

---
Leo Yan (8):
      bpftool: Pass host flags to bootstrap libbpf
      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: Use common CFLAGS for urandom_read
      selftests/bpf: Avoid static LLVM linking for cross builds

 tools/bpf/Makefile                                    |  1 +
 tools/bpf/bpftool/Makefile                            | 15 ++++++++++++---
 tools/lib/bpf/Makefile                                | 17 +++++++++--------
 tools/testing/selftests/bpf/Makefile                  | 19 +++++++++++++------
 tools/testing/selftests/bpf/prog_tests/verifier_log.c |  1 +
 5 files changed, 36 insertions(+), 17 deletions(-)
---
base-commit: b93c55b4932dd7e32dca8cf34a3443cc87a02906
change-id: 20260323-tools_build_fix_zero_init_bpf_only-52232f62fb7f

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


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

end of thread, other threads:[~2026-06-13  1:37 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-02 14:47 [PATCH bpf-next v2 0/8] tools build: bpf: Append EXTRA_CFLAGS and HOST_EXTRACFLAGS Leo Yan
2026-06-02 14:47 ` [PATCH bpf-next v2 1/8] bpftool: Pass host flags to bootstrap libbpf Leo Yan
2026-06-03  9:21   ` Quentin Monnet
2026-06-02 14:47 ` [PATCH bpf-next v2 2/8] bpftool: Avoid adding EXTRA_CFLAGS to HOST_CFLAGS Leo Yan
2026-06-02 14:47 ` [PATCH bpf-next v2 3/8] bpftool: Append extra host flags Leo Yan
2026-06-02 14:47 ` [PATCH bpf-next v2 4/8] libbpf: Initialize CFLAGS before including Makefile.include Leo Yan
2026-06-02 15:11   ` sashiko-bot
2026-06-02 14:47 ` [PATCH bpf-next v2 5/8] tools/bpf: build: Append extra cflags Leo Yan
2026-06-13  1:09   ` Ihor Solodrai
2026-06-02 14:47 ` [PATCH bpf-next v2 6/8] selftests/bpf: Initialize operation name before use Leo Yan
2026-06-13  1:11   ` Ihor Solodrai
2026-06-02 14:47 ` [PATCH bpf-next v2 7/8] selftests/bpf: Use common CFLAGS for urandom_read Leo Yan
2026-06-02 15:32   ` bot+bpf-ci
2026-06-02 17:25   ` sashiko-bot
2026-06-13  1:37     ` Ihor Solodrai
2026-06-02 14:47 ` [PATCH bpf-next v2 8/8] selftests/bpf: Avoid static LLVM linking for cross builds Leo Yan
2026-06-02 17:33   ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.