aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-10-02 09:30:35 -0400
committerIngo Molnar <mingo@kernel.org>2013-10-09 02:48:57 -0400
commit0648f839ff754e2825fee2cb7080df5874316b3f (patch)
tree059769bbac2fe467adac1f531930e5f5a7ee3fe7
parent1c47661a93fe6f729c80ed18a1f9ab1c7fb0cac2 (diff)
tools/perf/build: Remove unused config/feature-tests.mak
Also remove try-cc et al. These got obsoleted by the split-out feature checks in config/feature-checks/. Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Namhyung Kim <namhyung@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/n/tip-Y6ailbiranadqlrl8Dfivjbi@git.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--tools/perf/config/Makefile3
-rw-r--r--tools/perf/config/feature-tests.mak244
-rw-r--r--tools/perf/config/utilities.mak14
3 files changed, 1 insertions, 260 deletions
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 89b2d47d2e4b..e80ffe8262b0 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -51,7 +51,6 @@ LIB_INCLUDE := $(srctree)/tools/lib/
51# include ARCH specific config 51# include ARCH specific config
52-include $(src-perf)/arch/$(ARCH)/Makefile 52-include $(src-perf)/arch/$(ARCH)/Makefile
53 53
54include $(src-perf)/config/feature-tests.mak
55include $(src-perf)/config/utilities.mak 54include $(src-perf)/config/utilities.mak
56 55
57ifeq ($(call get-executable,$(FLEX)),) 56ifeq ($(call get-executable,$(FLEX)),)
@@ -274,7 +273,7 @@ else
274 msg := $(warning No libdw.h found or old libdw.h found or elfutils is older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev); 273 msg := $(warning No libdw.h found or old libdw.h found or elfutils is older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev);
275 NO_DWARF := 1 274 NO_DWARF := 1
276 endif # Dwarf support 275 endif # Dwarf support
277 endif # SOURCE_LIBELF 276 endif # libelf support
278endif # NO_LIBELF 277endif # NO_LIBELF
279 278
280ifndef NO_LIBELF 279ifndef NO_LIBELF
diff --git a/tools/perf/config/feature-tests.mak b/tools/perf/config/feature-tests.mak
index f79305739ecc..139597f9cb07 100644
--- a/tools/perf/config/feature-tests.mak
+++ b/tools/perf/config/feature-tests.mak
@@ -1,246 +1,2 @@
1define SOURCE_HELLO
2#include <stdio.h>
3int main(void)
4{
5 return puts(\"hi\");
6}
7endef
8 1
9ifndef NO_DWARF
10define SOURCE_DWARF
11#include <dwarf.h>
12#include <elfutils/libdw.h>
13#include <elfutils/version.h>
14#ifndef _ELFUTILS_PREREQ
15#error
16#endif
17 2
18int main(void)
19{
20 Dwarf *dbg = dwarf_begin(0, DWARF_C_READ);
21 return (long)dbg;
22}
23endef
24endif
25
26define SOURCE_LIBELF
27#include <libelf.h>
28
29int main(void)
30{
31 Elf *elf = elf_begin(0, ELF_C_READ, 0);
32 return (long)elf;
33}
34endef
35
36define SOURCE_GLIBC
37#include <gnu/libc-version.h>
38
39int main(void)
40{
41 const char *version = gnu_get_libc_version();
42 return (long)version;
43}
44endef
45
46define SOURCE_BIONIC
47#include <android/api-level.h>
48
49int main(void)
50{
51 return __ANDROID_API__;
52}
53endef
54
55define SOURCE_ELF_MMAP
56#include <libelf.h>
57int main(void)
58{
59 Elf *elf = elf_begin(0, ELF_C_READ_MMAP, 0);
60 return (long)elf;
61}
62endef
63
64define SOURCE_ELF_GETPHDRNUM
65#include <libelf.h>
66int main(void)
67{
68 size_t dst;
69 return elf_getphdrnum(0, &dst);
70}
71endef
72
73ifndef NO_SLANG
74define SOURCE_SLANG
75#include <slang.h>
76
77int main(void)
78{
79 return SLsmg_init_smg();
80}
81endef
82endif
83
84ifndef NO_GTK2
85define SOURCE_GTK2
86#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
87#include <gtk/gtk.h>
88#pragma GCC diagnostic error \"-Wstrict-prototypes\"
89
90int main(int argc, char *argv[])
91{
92 gtk_init(&argc, &argv);
93
94 return 0;
95}
96endef
97
98define SOURCE_GTK2_INFOBAR
99#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
100#include <gtk/gtk.h>
101#pragma GCC diagnostic error \"-Wstrict-prototypes\"
102
103int main(void)
104{
105 gtk_info_bar_new();
106
107 return 0;
108}
109endef
110endif
111
112ifndef NO_LIBPERL
113define SOURCE_PERL_EMBED
114#include <EXTERN.h>
115#include <perl.h>
116
117int main(void)
118{
119perl_alloc();
120return 0;
121}
122endef
123endif
124
125ifndef NO_LIBPYTHON
126define SOURCE_PYTHON_VERSION
127#include <Python.h>
128#if PY_VERSION_HEX >= 0x03000000
129 #error
130#endif
131int main(void)
132{
133 return 0;
134}
135endef
136define SOURCE_PYTHON_EMBED
137#include <Python.h>
138int main(void)
139{
140 Py_Initialize();
141 return 0;
142}
143endef
144endif
145
146define SOURCE_BFD
147#include <bfd.h>
148
149int main(void)
150{
151 bfd_demangle(0, 0, 0);
152 return 0;
153}
154endef
155
156define SOURCE_CPLUS_DEMANGLE
157extern char *cplus_demangle(const char *, int);
158
159int main(void)
160{
161 cplus_demangle(0, 0);
162 return 0;
163}
164endef
165
166define SOURCE_STRLCPY
167#include <stdlib.h>
168extern size_t strlcpy(char *dest, const char *src, size_t size);
169
170int main(void)
171{
172 strlcpy(NULL, NULL, 0);
173 return 0;
174}
175endef
176
177ifndef NO_LIBUNWIND
178define SOURCE_LIBUNWIND
179#include <libunwind.h>
180#include <stdlib.h>
181
182extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as,
183 unw_word_t ip,
184 unw_dyn_info_t *di,
185 unw_proc_info_t *pi,
186 int need_unwind_info, void *arg);
187
188
189#define dwarf_search_unwind_table UNW_OBJ(dwarf_search_unwind_table)
190
191int main(void)
192{
193 unw_addr_space_t addr_space;
194 addr_space = unw_create_addr_space(NULL, 0);
195 unw_init_remote(NULL, addr_space, NULL);
196 dwarf_search_unwind_table(addr_space, 0, NULL, NULL, 0, NULL);
197 return 0;
198}
199endef
200endif
201
202ifndef NO_BACKTRACE
203define SOURCE_BACKTRACE
204#include <execinfo.h>
205#include <stdio.h>
206
207int main(void)
208{
209 backtrace(NULL, 0);
210 backtrace_symbols(NULL, 0);
211 return 0;
212}
213endef
214endif
215
216ifndef NO_LIBAUDIT
217define SOURCE_LIBAUDIT
218#include <libaudit.h>
219
220int main(void)
221{
222 printf(\"error message: %s\", audit_errno_to_name(0));
223 return audit_open();
224}
225endef
226endif
227
228define SOURCE_ON_EXIT
229#include <stdio.h>
230
231int main(void)
232{
233 return on_exit(NULL, NULL);
234}
235endef
236
237define SOURCE_LIBNUMA
238#include <numa.h>
239#include <numaif.h>
240
241int main(void)
242{
243 numa_available();
244 return 0;
245}
246endef
diff --git a/tools/perf/config/utilities.mak b/tools/perf/config/utilities.mak
index 94d2d4f9c35d..4d985e0f03f5 100644
--- a/tools/perf/config/utilities.mak
+++ b/tools/perf/config/utilities.mak
@@ -178,17 +178,3 @@ endef
178_ge_attempt = $(if $(get-executable),$(get-executable),$(_gea_warn)$(call _gea_err,$(2))) 178_ge_attempt = $(if $(get-executable),$(get-executable),$(_gea_warn)$(call _gea_err,$(2)))
179_gea_warn = $(warning The path '$(1)' is not executable.) 179_gea_warn = $(warning The path '$(1)' is not executable.)
180_gea_err = $(if $(1),$(error Please set '$(1)' appropriately)) 180_gea_err = $(if $(1),$(error Please set '$(1)' appropriately))
181
182# try-cc
183# Usage: option = $(call try-cc, source-to-build, cc-options, msg)
184ifneq ($(V),1)
185TRY_CC_OUTPUT= > /dev/null 2>&1
186endif
187TRY_CC_MSG=echo " CHK $(3)" 1>&2;
188
189try-cc = $(shell sh -c \
190 'TMP="$(OUTPUT)$(TMPOUT).$$$$"; \
191 $(TRY_CC_MSG) \
192 echo "$(1)" | \
193 $(CC) -x c - $(2) -o "$$TMP" $(TRY_CC_OUTPUT) && echo y; \
194 rm -f "$$TMP"')