aboutsummaryrefslogtreecommitdiffstats
path: root/tools/build
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2019-06-18 16:43:35 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-06-18 16:43:35 -0400
commitcbefd24f0aee3a5d787a013f207f6fd31d3c76d2 (patch)
tree2387b3995977a4165abc4315a2f680a598957012 /tools/build
parent1955c8cf5e26b1f70d674190ff9984dbfd531ee9 (diff)
tools build: Add test to check if slang.h is in /usr/include/slang/
A few odd old distros (rhel5, 6, yeah, lots of those out in use, in many cases we want to use upstream perf on it) have the slang header files in /usr/include/slang/, so add a test that will be performed only when test-all.c (the one with the most common sane settings) fails, either because we're in one of these odd distros with slang/slang.h or because something else failed (say libelf is not present). So for the common case nothing changes, no additional test is performed. Next step is to check in perf the result of these tests. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Fixes: 1955c8cf5e26 ("perf tools: Don't hardcode host include path for libslang") Link: https://lkml.kernel.org/n/tip-2sy7hbwkx68jr6n97qxgg0c6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/build')
-rw-r--r--tools/build/Makefile.feature2
-rw-r--r--tools/build/feature/Makefile4
-rw-r--r--tools/build/feature/test-libslang-include-subdir.c7
3 files changed, 12 insertions, 1 deletions
diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
index 50377cc2f5f9..86b793dffbc4 100644
--- a/tools/build/Makefile.feature
+++ b/tools/build/Makefile.feature
@@ -53,6 +53,7 @@ FEATURE_TESTS_BASIC := \
53 libpython \ 53 libpython \
54 libpython-version \ 54 libpython-version \
55 libslang \ 55 libslang \
56 libslang-include-subdir \
56 libcrypto \ 57 libcrypto \
57 libunwind \ 58 libunwind \
58 pthread-attr-setaffinity-np \ 59 pthread-attr-setaffinity-np \
@@ -114,7 +115,6 @@ FEATURE_DISPLAY ?= \
114 numa_num_possible_cpus \ 115 numa_num_possible_cpus \
115 libperl \ 116 libperl \
116 libpython \ 117 libpython \
117 libslang \
118 libcrypto \ 118 libcrypto \
119 libunwind \ 119 libunwind \
120 libdw-dwarf-unwind \ 120 libdw-dwarf-unwind \
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index 7ef7cf04a292..0658b8cd0e53 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -31,6 +31,7 @@ FILES= \
31 test-libpython.bin \ 31 test-libpython.bin \
32 test-libpython-version.bin \ 32 test-libpython-version.bin \
33 test-libslang.bin \ 33 test-libslang.bin \
34 test-libslang-include-subdir.bin \
34 test-libcrypto.bin \ 35 test-libcrypto.bin \
35 test-libunwind.bin \ 36 test-libunwind.bin \
36 test-libunwind-debug-frame.bin \ 37 test-libunwind-debug-frame.bin \
@@ -184,6 +185,9 @@ $(OUTPUT)test-libaudit.bin:
184$(OUTPUT)test-libslang.bin: 185$(OUTPUT)test-libslang.bin:
185 $(BUILD) -lslang 186 $(BUILD) -lslang
186 187
188$(OUTPUT)test-libslang-include-subdir.bin:
189 $(BUILD) -lslang
190
187$(OUTPUT)test-libcrypto.bin: 191$(OUTPUT)test-libcrypto.bin:
188 $(BUILD) -lcrypto 192 $(BUILD) -lcrypto
189 193
diff --git a/tools/build/feature/test-libslang-include-subdir.c b/tools/build/feature/test-libslang-include-subdir.c
new file mode 100644
index 000000000000..3ea47ec7590e
--- /dev/null
+++ b/tools/build/feature/test-libslang-include-subdir.c
@@ -0,0 +1,7 @@
1// SPDX-License-Identifier: GPL-2.0
2#include <slang/slang.h>
3
4int main(void)
5{
6 return SLsmg_init_smg();
7}