diff options
| author | Brian Norris <[email protected]> | 2024-07-15 20:32:44 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2024-08-05 15:19:48 +0000 |
| commit | dbb2a7a986971ef43d5a60d235c05491647e16f4 (patch) | |
| tree | 07a926eb50058e2bef10955cc9be64c26bcf7715 /tools/perf/builtin-annotate.c | |
| parent | tools build: Avoid circular .fixdep-in.o.cmd issues (diff) | |
| download | kernel-dbb2a7a986971ef43d5a60d235c05491647e16f4.tar.gz kernel-dbb2a7a986971ef43d5a60d235c05491647e16f4.zip | |
tools build: Correct bpf fixdep dependencies
The dependencies in tools/lib/bpf/Makefile are incorrect. Before we
recurse to build $(BPF_IN_STATIC), we need to build its 'fixdep'
executable.
I can't use the usual shortcut from Makefile.include:
<target>: <sources> fixdep
because its 'fixdep' target relies on $(OUTPUT), and $(OUTPUT) differs
in the parent 'make' versus the child 'make' -- so I imitate it via
open-coding.
I tweak a few $(MAKE) invocations while I'm at it, because
1. I'm adding a new recursive make; and
2. these recursive 'make's print spurious lines about files that are "up
to date" (which isn't normally a feature in Kbuild subtargets) or
"jobserver not available" (see [1])
I also need to tweak the assignment of the OUTPUT variable, so that
relative path builds work. For example, for 'make tools/lib/bpf', OUTPUT
is unset, and is usually treated as "cwd" -- but recursive make will
change cwd and so OUTPUT has a new meaning. For consistency, I ensure
OUTPUT is always an absolute path.
And $(Q) gets a backup definition in tools/build/Makefile.include,
because Makefile.include is sometimes included without
tools/build/Makefile, so the "quiet command" stuff doesn't actually work
consistently without it.
After this change, top-level builds result in an empty grep result from:
$ grep 'cannot find fixdep' $(find tools/ -name '*.cmd')
[1] https://www.gnu.org/software/make/manual/html_node/MAKE-Variable.html
If we're not using $(MAKE) directly, then we need to use more '+'.
Signed-off-by: Brian Norris <[email protected]>
Acked-by: Andrii Nakryiko <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Josh Poimboeuf <[email protected]>
Cc: Masahiro Yamada <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Richter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/builtin-annotate.c')
0 files changed, 0 insertions, 0 deletions
