public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 00/30] tools build: Append -fzero-init-padding-bits=all option
@ 2026-03-11  8:29 Leo Yan
  2026-03-11  8:29 ` [PATCH v4 01/30] tools: lib: thermal: Fix typo Leo Yan
                   ` (30 more replies)
  0 siblings, 31 replies; 57+ messages in thread
From: Leo Yan @ 2026-03-11  8:29 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Ian Rogers, Namhyung Kim, James Clark,
	Kees Cook, Quentin Monnet, Nathan Chancellor, Nicolas Schier,
	Nick Desaulniers, Bill Wendling, Justin Stitt, 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,
	Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Lukasz Luba,
	Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Adrian Hunter, Masami Hiramatsu, William Breathitt Gray,
	Barry Song, Qinxin Xia, Bartosz Golaszewski, Kent Gibson,
	K. Y. Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui, Long Li,
	Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
	Andrew Morton, Willy Tarreau, Thomas Weißschuh,
	Josh Poimboeuf, Robert Moore, Len Brown, Srinivas Pandruvada,
	Tejun Heo, David Vernet, Andrea Righi, Changwoo Min, Mark Brown,
	Steven Rostedt, Gabriele Monaco, Shuah Khan, Jiri Kosina,
	Benjamin Tissoires
  Cc: linux-kbuild, linux-kernel, llvm, bpf, linux-perf-users, Leo Yan,
	Bartosz Golaszewski

Thank you for reviewing v3 and I appreciate much Ian's suggestions, most
of which have been adopted into this series.

For anyone new to the series, the reason for appending this compiler
option is described in v3 (see "Link to v3" below).

In this version, the changes are organized into three parts:

  Patches 01 – 07: Preparation before adding the new compiler option.
                   Fix typos, adjust Makefiles to ensure the newly
                   introduced option does not cause regressions.
  Patch 08:        Propagate -fzero-init-padding-bits=all to
                   EXTRA_CFLAGS and HOST_EXTRACFLAGS for the
                   CC and HOSTCC compilers, respectively.
  Patches 09 – 30: Apply EXTRA_CFLAGS and HOST_EXTRACFLAGS in
                   project Makefiles.

The change has been verified:

Test 1: Cross compiling perf
	host: gcc 15.2.0 (x86_64), target: aarch64-linux-gnu-gcc

  make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- LDFLAGS="-static" \
	    -C tools/perf VF=1 CORESIGHT=1 NO_JEVENTS=1 DEBUG=1

Test 2: Cross compiling selftest bpf and sched_ext
	host: gcc 15.2.0 (x86_64), target: aarch64-linux-gnu-gcc

  export ARCH=arm64
  export CROSS_COMPILE=aarch64-linux-gnu-
  make -C tools/testing/selftests/ TARGETS="bpf sched_ext" SKIP_TARGETS=""

Test 3: Native compiling selftest bpf and sched_ext
	host: gcc 15.2.0 (x86_64)

  make -C tools/testing/selftests/ TARGETS="bpf sched_ext" SKIP_TARGETS=""

Signed-off-by: Leo Yan <leo.yan@arm.com>
---
Changes in v4:
- Placed EXTRA_CFLAGS last so it can override the default options (Ian).
- Cached evaluated values to avoid invoking cc-option when each
  reference EXTRA_CFLAGS/HOST_EXTRACFLAGS (Ian).
- Dropped useless patches for feature, verification and nolibc
  (Gabriele / Ian / Thomas).
- Fixed typos for thermal (Ian).
- Removed duplicate $(CLANG_CROSS_FLAGS) in libbpf (Ian).
- Collected maintainers' reviewed and ACK tags.
- Link to v3: https://lore.kernel.org/r/20260308-tools_build_fix_zero_init-v3-0-6477808123b7@arm.com

Changes in v3:
- Extended to support cross compilation (Quentin).
- Link to v2: https://lore.kernel.org/r/20260224-tools_build_fix_zero_init-v2-1-b1acc817a01e@arm.com

---
Leo Yan (30):
      tools: lib: thermal: Fix typo
      tools/thermal: Fix typo
      tools: lib: thermal: Initialize CFLAGS before including Makefile.include
      tools/thermal: Initialize CFLAGS before including Makefile.include
      bpftool: Avoid adding EXTRA_CFLAGS to HOST_CFLAGS
      libbpf: Remove duplicate $(CLANG_CROSS_FLAGS)
      libbpf: Initialize CFLAGS before including Makefile.include
      tools build: Append -fzero-init-padding-bits=all to extra cflags
      bpftool: Append extra host flags
      perf build: Append extra host flags
      tools/bpf: build: Append extra cflags
      tools build: Append extra host cflags
      tools: bootconfig: Append extra cflags
      tools: counter: Append extra cflags
      tools: dma: Append extra cflags
      tools: gpio: Append extra cflags
      tools: hv: Append extra cflags
      tools: iio: Append extra cflags
      tools: mm: Append extra cflags
      tools: objtool: Append extra host cflags
      tools: power: acpi: Append extra cflags
      tools: power: x86/intel-speed-select: Append extra cflags
      tools: sched_ext: Append extra cflags
      tools: spi: Append extra cflags
      tools: tracing: Append extra cflags
      tools: usb: Append extra cflags
      selftests/bpf: Append extra cflags
      selftests/hid: Append extra cflags
      selftests/nolibc: Append extra cflags
      selftests/sched_ext: Append extra cflags

 tools/bootconfig/Makefile                   |  1 +
 tools/bpf/Makefile                          |  1 +
 tools/bpf/bpftool/Makefile                  |  9 +++++++--
 tools/build/Makefile                        |  6 ++++--
 tools/counter/Makefile                      |  1 +
 tools/dma/Makefile                          |  1 +
 tools/gpio/Makefile                         |  1 +
 tools/hv/Makefile                           |  1 +
 tools/iio/Makefile                          |  1 +
 tools/lib/bpf/Makefile                      | 17 ++++++++--------
 tools/lib/thermal/Makefile                  | 20 ++++++++++---------
 tools/mm/Makefile                           |  1 +
 tools/objtool/Makefile                      |  2 ++
 tools/perf/Makefile.config                  |  2 +-
 tools/power/acpi/Makefile.config            |  1 +
 tools/power/x86/intel-speed-select/Makefile |  1 +
 tools/sched_ext/Makefile                    |  1 +
 tools/scripts/Makefile.include              | 30 +++++++++++++++++++++++++++++
 tools/spi/Makefile                          |  1 +
 tools/testing/selftests/bpf/Makefile        | 10 ++++++++--
 tools/testing/selftests/hid/Makefile        |  1 +
 tools/testing/selftests/nolibc/Makefile     |  6 ++----
 tools/testing/selftests/sched_ext/Makefile  |  1 +
 tools/thermal/lib/Makefile                  | 20 ++++++++++---------
 tools/tracing/latency/Makefile              |  1 +
 tools/usb/Makefile                          |  1 +
 26 files changed, 101 insertions(+), 37 deletions(-)
---
base-commit: 4ae12d8bd9a830799db335ee661d6cbc6597f838
change-id: 20260224-tools_build_fix_zero_init-dc5261bd8b8b

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


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

end of thread, other threads:[~2026-03-22 12:00 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-11  8:29 [PATCH v4 00/30] tools build: Append -fzero-init-padding-bits=all option Leo Yan
2026-03-11  8:29 ` [PATCH v4 01/30] tools: lib: thermal: Fix typo Leo Yan
2026-03-16 11:50   ` Daniel Lezcano
2026-03-11  8:29 ` [PATCH v4 02/30] tools/thermal: " Leo Yan
2026-03-16 11:51   ` Daniel Lezcano
2026-03-11  8:29 ` [PATCH v4 03/30] tools: lib: thermal: Initialize CFLAGS before including Makefile.include Leo Yan
2026-03-16 11:51   ` Daniel Lezcano
2026-03-11  8:29 ` [PATCH v4 04/30] tools/thermal: " Leo Yan
2026-03-11  8:29 ` [PATCH v4 05/30] bpftool: Avoid adding EXTRA_CFLAGS to HOST_CFLAGS Leo Yan
2026-03-12 17:19   ` Ian Rogers
2026-03-13 15:56     ` Leo Yan
2026-03-13 16:07       ` Quentin Monnet
2026-03-13 16:24         ` Leo Yan
2026-03-13 16:26           ` Quentin Monnet
2026-03-11  8:29 ` [PATCH v4 06/30] libbpf: Remove duplicate $(CLANG_CROSS_FLAGS) Leo Yan
2026-03-11  9:02   ` bot+bpf-ci
2026-03-11  9:35     ` Leo Yan
2026-03-11  8:29 ` [PATCH v4 07/30] libbpf: Initialize CFLAGS before including Makefile.include Leo Yan
2026-03-16 10:18   ` Leo Yan
2026-03-16 14:17     ` Alexei Starovoitov
2026-03-11  8:29 ` [PATCH v4 08/30] tools build: Append -fzero-init-padding-bits=all to extra cflags Leo Yan
2026-03-12 18:31   ` Namhyung Kim
2026-03-11  8:29 ` [PATCH v4 09/30] bpftool: Append extra host flags Leo Yan
2026-03-11  8:29 ` [PATCH v4 10/30] perf build: " Leo Yan
2026-03-12 18:31   ` Namhyung Kim
2026-03-11  8:29 ` [PATCH v4 11/30] tools/bpf: build: Append extra cflags Leo Yan
2026-03-11  8:29 ` [PATCH v4 12/30] tools build: Append extra host cflags Leo Yan
2026-03-12  0:29   ` Ian Rogers
2026-03-11  8:29 ` [PATCH v4 13/30] tools: bootconfig: Append extra cflags Leo Yan
2026-03-11  8:29 ` [PATCH v4 14/30] tools: counter: " Leo Yan
2026-03-11  8:29 ` [PATCH v4 15/30] tools: dma: " Leo Yan
2026-03-11  8:29 ` [PATCH v4 16/30] tools: gpio: " Leo Yan
2026-03-11  8:29 ` [PATCH v4 17/30] tools: hv: " Leo Yan
2026-03-11  8:29 ` [PATCH v4 18/30] tools: iio: " Leo Yan
2026-03-22 12:00   ` Jonathan Cameron
2026-03-11  8:29 ` [PATCH v4 19/30] tools: mm: " Leo Yan
2026-03-11  8:29 ` [PATCH v4 20/30] tools: objtool: Append extra host cflags Leo Yan
2026-03-11  8:29 ` [PATCH v4 21/30] tools: power: acpi: Append extra cflags Leo Yan
2026-03-11  8:29 ` [PATCH v4 22/30] tools: power: x86/intel-speed-select: " Leo Yan
2026-03-11  8:29 ` [PATCH v4 23/30] tools: sched_ext: " Leo Yan
2026-03-11  8:29 ` [PATCH v4 24/30] tools: spi: " Leo Yan
2026-03-11  8:29 ` [PATCH v4 25/30] tools: tracing: " Leo Yan
2026-03-11  8:29 ` [PATCH v4 26/30] tools: usb: " Leo Yan
2026-03-11  8:29 ` [PATCH v4 27/30] selftests/bpf: " Leo Yan
2026-03-12 17:24   ` Ian Rogers
2026-03-13 16:11     ` Leo Yan
2026-03-11  8:29 ` [PATCH v4 28/30] selftests/hid: " Leo Yan
2026-03-13 13:33   ` Benjamin Tissoires
2026-03-11  8:29 ` [PATCH v4 29/30] selftests/nolibc: " Leo Yan
2026-03-16 22:27   ` Thomas Weißschuh
2026-03-17 11:00     ` Leo Yan
2026-03-11  8:29 ` [PATCH v4 30/30] selftests/sched_ext: " Leo Yan
2026-03-11  8:44 ` [PATCH v4 00/30] tools build: Append -fzero-init-padding-bits=all option Daniel Lezcano
2026-03-11  8:52   ` Jonathan Cameron
2026-03-11  9:23     ` Leo Yan
2026-03-11 18:35       ` Andrew Morton
2026-03-11  9:15   ` Leo Yan

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