linux/tools/lib/perf
Ian Rogers 8c5b40678c libperf build: Always place libperf includes first
When building tools/perf the CFLAGS can contain a directory for the
installed headers.

As the headers may be being installed while building libperf.a this can
cause headers to be partially installed and found in the include path
while building an object file for libperf.a.

The installed header may reference other installed headers that are
missing given the partial nature of the install and then the build fails
with a missing header file.

Avoid this by ensuring the libperf source headers are always first in
the CFLAGS.

Fixes: 3143504918 ("libperf: Make libperf.a part of the perf build")
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2026-02-03 18:01:27 -03:00
..
Documentation perf sched stats: Add record and rawdump support 2026-01-22 12:29:28 -03:00
include perf sched stats: Add schedstat v17 support 2026-01-22 12:31:51 -03:00
tests libperf cpumap: Replace usage of perf_cpu_map__new(NULL) with perf_cpu_map__new_online_cpus() 2023-12-12 14:55:13 -03:00
.gitignore libperf: Add gitignore 2024-08-01 12:11:33 -03:00
Build libperf: Change tests to single static and shared binaries 2021-07-07 11:41:58 -03:00
core.c libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00
cpumap.c libperf cpumap: Fix perf_cpu_map__max for an empty/NULL map 2025-12-04 00:36:14 -08:00
evlist.c perf parse-events: Support user CPUs mixed with threads/processes 2025-07-24 13:41:35 -07:00
evsel.c libperf evsel: Factor perf_evsel__exit out of perf_evsel__delete 2025-07-24 13:41:35 -07:00
internal.h libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00
lib.c libperf: Add preadn() 2022-05-23 10:11:12 -03:00
libperf.map libperf cpumap: Remove perf_cpu_map__read() 2024-12-09 17:52:41 -03:00
libperf.pc.template libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00
Makefile libperf build: Always place libperf includes first 2026-02-03 18:01:27 -03:00
mmap.c libperf mmap: In user mmap rdpmc avoid undefined behavior 2025-10-02 15:02:47 -03:00
threadmap.c libperf threadmap: Add perf_thread_map__idx() 2025-05-21 15:07:13 -03:00
xyarray.c libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00