aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorBenoît Monin <benoit.monin@bootlin.com>2026-09-28 10:55:09 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2026-09-28 18:37:42 +0200
commitea2058a975c549bc2cae3ae42490c3f5a846ad81 (patch)
treef46b9bffdf0c5cadc59aa6a2ca7a3a4f828215fe /scripts/Makefile.thinlto
parentMAINTAINERS: Update John Garry's address for from arm64 perf tools (diff)
perf build: Improve fix for "argument list too long" error
The orphaned pmu-events JSON files are passed to the shell via `echo "$^"`, which puts the whole list into a single argument. With a long enough output directory path and enough files, exec'ing /bin/sh fails with: make[5]: /bin/sh: Argument list too long make[5]: *** [pmu-events/Build:228: prune_orphans] Error 127 This only happens with out-of-tree builds, when setting O= to a relatively long path. To reproduce, build once with JEVENTS_ARCH=all, then rebuild with a smaller JEVENTS_ARCH without cleaning first, so the leftover files become orphans. Using nds32 (which leaves ~1100 orphans), an output path of only ~70 characters is already enough to trigger it: OUT=/any/long/path (at least 70 characters) make -C tools/perf JEVENTS_ARCH=all O=$OUT -j$(nproc) make -C tools/perf JEVENTS_ARCH=nds32 O=$OUT -j$(nproc) Express the orphan file list as paths relative to $(OUT_DIR) by stripping the common prefix and restoring it with printf, the same approach used in scripts/Makefile.clean, so the shell arguments stay short. Fixes: b6712d91f8f5a289 ("perf build: Prevent "argument list too long" error") Suggested-by: Vladimir Kondratiev <vladimir.kondratiev@mobileye.com> Reviewed-by: James Clark <james.clark@linaro.org> Signed-off-by: Benoît Monin <benoit.monin@bootlin.com> Tested-by: Vladimir Kondratiev <vladimir.kondratiev@mobileye.com> Acked-by: Ian Rogers <irogers@google.com> Cc: Markus Mayer <mmayer@broadcom.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions