7 test-fortify-source.bin \
8 test-sync-compare-and-swap.bin \
11 test-gtk2-infobar.bin \
17 test-cplus-demangle.bin \
19 test-libelf-getphdrnum.bin \
20 test-libelf-mmap.bin \
22 test-numa_num_possible_cpus.bin \
25 test-libpython-version.bin \
28 test-libunwind-debug-frame.bin \
29 test-pthread-attr-setaffinity-np.bin \
30 test-stackprotector-all.bin \
32 test-libdw-dwarf-unwind.bin \
33 test-libbabeltrace.bin \
35 test-compile-x32.bin \
41 CC := $(CROSS_COMPILE)gcc -MD
42 PKG_CONFIG := $(CROSS_COMPILE)pkg-config
46 __BUILD = $(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ $(patsubst %.bin,%.c,$@) $(LDFLAGS)
47 BUILD = $(__BUILD) > $(OUTPUT)$(@:.bin=.make.output) 2>&1
49 ###############################
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
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
76 ifeq ($(findstring -static,${LDFLAGS}),-static)
77 DWARFLIBS += -lelf -lebl -lz -llzma -lbz2
86 test-libelf-getphdrnum.bin:
92 test-numa_num_possible_cpus.bin:
98 test-libunwind-debug-frame.bin:
105 $(BUILD) -I/usr/include/slang -lslang
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)
123 $(BUILD) $(FLAGS_PERL_EMBED)
128 test-libpython-version.bin:
132 $(BUILD) -DPACKAGE='"perf"' -lbfd -lz -liberty -ldl
135 $(CC) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty
138 $(CC) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty -lz
140 test-cplus-demangle.bin:
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:
159 $(CC) -m32 -o $(OUTPUT)$@ test-compile.c
161 test-compile-x32.bin:
162 $(CC) -mx32 -o $(OUTPUT)$@ test-compile.c
178 ###############################
181 rm -f $(FILES) *.d $(FILES:.bin=.make.output)