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

perf tools: Don't hardcode host include path for libslang

Hardcoding /usr/include/slang is fundamentally incompatible with cross
compilation and will lead to the inability for a cross-compiled
environment to properly detect whether slang is available or not.

If /usr/include/slang is necessary that is a distribution specific
knowledge that could be solved with either a standard pkg-config .pc
file (which slang has) or simply overriding CFLAGS accordingly, but the
default perf Makefile should be clean of all of that.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: bcm-kernel-feedback-list@broadcom.com
Cc: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Quentin Monnet <quentin.monnet@netronome.com>
Cc: Stanislav Fomichev <sdf@google.com>
Fixes: ef7b93a11904 ("perf report: Librarize the annotation code and use it in the newt browser")
Link: http://lkml.kernel.org/r/20190614183949.5588-1-f.fainelli@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Florian Fainelli and committed by
Arnaldo Carvalho de Melo
1955c8cf fdbdd7e8

+1 -2
+1 -1
tools/build/feature/Makefile
··· 182 182 $(BUILD) -laudit 183 183 184 184 $(OUTPUT)test-libslang.bin: 185 - $(BUILD) -I/usr/include/slang -lslang 185 + $(BUILD) -lslang 186 186 187 187 $(OUTPUT)test-libcrypto.bin: 188 188 $(BUILD) -lcrypto
-1
tools/perf/Makefile.config
··· 648 648 NO_SLANG := 1 649 649 else 650 650 # Fedora has /usr/include/slang/slang.h, but ubuntu /usr/include/slang.h 651 - CFLAGS += -I/usr/include/slang 652 651 CFLAGS += -DHAVE_SLANG_SUPPORT 653 652 EXTLIBS += -lslang 654 653 $(call detected,CONFIG_SLANG)