Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 3143504918105156 ("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>

authored by

Ian Rogers and committed by
Arnaldo Carvalho de Melo
8c5b4067 d2ac7e44

+1 -1
+1 -1
tools/lib/perf/Makefile
··· 50 50 -I$(srctree)/tools/include/uapi 51 51 52 52 # Append required CFLAGS 53 + override CFLAGS := $(INCLUDES) $(CFLAGS) 53 54 override CFLAGS += -g -Werror -Wall 54 55 override CFLAGS += -fPIC 55 - override CFLAGS += $(INCLUDES) 56 56 override CFLAGS += -fvisibility=hidden 57 57 override CFLAGS += $(EXTRA_WARNINGS) 58 58 override CFLAGS += $(EXTRA_CFLAGS)