HID: hiddev: Fix slab-out-of-bounds write in hiddev_ioctl_usage()
[linux/fpc-iii.git] / tools / build / feature / Makefile
blobcea04ce9f35cdfb7e5b217077d60b214894b6c48
2 FILES= \
3 test-all.bin \
4 test-backtrace.bin \
5 test-bionic.bin \
6 test-dwarf.bin \
7 test-fortify-source.bin \
8 test-sync-compare-and-swap.bin \
9 test-glibc.bin \
10 test-gtk2.bin \
11 test-gtk2-infobar.bin \
12 test-hello.bin \
13 test-libaudit.bin \
14 test-libbfd.bin \
15 test-liberty.bin \
16 test-liberty-z.bin \
17 test-cplus-demangle.bin \
18 test-libelf.bin \
19 test-libelf-getphdrnum.bin \
20 test-libelf-mmap.bin \
21 test-libnuma.bin \
22 test-numa_num_possible_cpus.bin \
23 test-libperl.bin \
24 test-libpython.bin \
25 test-libpython-version.bin \
26 test-libslang.bin \
27 test-libunwind.bin \
28 test-libunwind-debug-frame.bin \
29 test-pthread-attr-setaffinity-np.bin \
30 test-stackprotector-all.bin \
31 test-timerfd.bin \
32 test-libdw-dwarf-unwind.bin \
33 test-libbabeltrace.bin \
34 test-compile-32.bin \
35 test-compile-x32.bin \
36 test-zlib.bin \
37 test-lzma.bin \
38 test-bpf.bin \
39 test-get_cpuid.bin
41 CC := $(CROSS_COMPILE)gcc -MD
42 PKG_CONFIG := $(CROSS_COMPILE)pkg-config
44 all: $(FILES)
46 __BUILD = $(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ $(patsubst %.bin,%.c,$@) $(LDFLAGS)
47 BUILD = $(__BUILD) > $(OUTPUT)$(@:.bin=.make.output) 2>&1
49 ###############################
51 test-all.bin:
52 $(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -laudit -I/usr/include/slang -lslang $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl -lz -llzma
54 test-hello.bin:
55 $(BUILD)
57 test-pthread-attr-setaffinity-np.bin:
58 $(BUILD) -D_GNU_SOURCE -lpthread
60 test-stackprotector-all.bin:
61 $(BUILD) -fstack-protector-all
63 test-fortify-source.bin:
64 $(BUILD) -O2 -D_FORTIFY_SOURCE=2
66 test-bionic.bin:
67 $(BUILD)
69 test-libelf.bin:
70 $(BUILD) -lelf
72 test-glibc.bin:
73 $(BUILD)
75 DWARFLIBS := -ldw
76 ifeq ($(findstring -static,${LDFLAGS}),-static)
77 DWARFLIBS += -lelf -lebl -lz -llzma -lbz2
78 endif
80 test-dwarf.bin:
81 $(BUILD) $(DWARFLIBS)
83 test-libelf-mmap.bin:
84 $(BUILD) -lelf
86 test-libelf-getphdrnum.bin:
87 $(BUILD) -lelf
89 test-libnuma.bin:
90 $(BUILD) -lnuma
92 test-numa_num_possible_cpus.bin:
93 $(BUILD) -lnuma
95 test-libunwind.bin:
96 $(BUILD) -lelf
98 test-libunwind-debug-frame.bin:
99 $(BUILD) -lelf
101 test-libaudit.bin:
102 $(BUILD) -laudit
104 test-libslang.bin:
105 $(BUILD) -I/usr/include/slang -lslang
107 test-gtk2.bin:
108 $(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
110 test-gtk2-infobar.bin:
111 $(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null)
113 grep-libs = $(filter -l%,$(1))
114 strip-libs = $(filter-out -l%,$(1))
116 PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null)
117 PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS))
118 PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS))
119 PERL_EMBED_CCOPTS = `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
120 FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS)
122 test-libperl.bin:
123 $(BUILD) $(FLAGS_PERL_EMBED)
125 test-libpython.bin:
126 $(BUILD)
128 test-libpython-version.bin:
129 $(BUILD)
131 test-libbfd.bin:
132 $(BUILD) -DPACKAGE='"perf"' -lbfd -lz -liberty -ldl
134 test-liberty.bin:
135 $(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty
137 test-liberty-z.bin:
138 $(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty -lz
140 test-cplus-demangle.bin:
141 $(BUILD) -liberty
143 test-backtrace.bin:
144 $(BUILD)
146 test-timerfd.bin:
147 $(BUILD)
149 test-libdw-dwarf-unwind.bin:
150 $(BUILD) # -ldw provided by $(FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind)
152 test-libbabeltrace.bin:
153 $(BUILD) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace)
155 test-sync-compare-and-swap.bin:
156 $(BUILD)
158 test-compile-32.bin:
159 $(CC) -m32 -o $(OUTPUT)$@ test-compile.c
161 test-compile-x32.bin:
162 $(CC) -mx32 -o $(OUTPUT)$@ test-compile.c
164 test-zlib.bin:
165 $(BUILD) -lz
167 test-lzma.bin:
168 $(BUILD) -llzma
170 test-get_cpuid.bin:
171 $(BUILD)
173 test-bpf.bin:
174 $(BUILD)
176 -include *.d
178 ###############################
180 clean:
181 rm -f $(FILES) *.d $(FILES:.bin=.make.output)