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 \
40 CC
:= $(CROSS_COMPILE
)gcc
-MD
41 PKG_CONFIG
:= $(CROSS_COMPILE
)pkg-config
45 __BUILD
= $(CC
) $(CFLAGS
) -Wall
-Werror
-o
$(OUTPUT
)$@
$(patsubst %.bin
,%.c
,$@
) $(LDFLAGS
)
46 BUILD
= $(__BUILD
) > $(OUTPUT
)$(@
:.bin
=.make.output
) 2>&1
48 ###############################
51 $(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
56 test-pthread-attr-setaffinity-np.bin
:
57 $(BUILD
) -D_GNU_SOURCE
-lpthread
59 test-stackprotector-all.bin
:
60 $(BUILD
) -fstack-protector-all
62 test-fortify-source.bin
:
63 $(BUILD
) -O2
-D_FORTIFY_SOURCE
=2
75 ifeq ($(findstring -static
,${LDFLAGS}),-static
)
76 DWARFLIBS
+= -lelf
-lebl
-lz
-llzma
-lbz2
85 test-libelf-getphdrnum.bin
:
91 test-numa_num_possible_cpus.bin
:
97 test-libunwind-debug-frame.bin
:
104 $(BUILD
) -I
/usr
/include/slang
-lslang
107 $(BUILD
) $(shell $(PKG_CONFIG
) --libs
--cflags gtk
+-2.0 2>/dev
/null
)
109 test-gtk2-infobar.bin
:
110 $(BUILD
) $(shell $(PKG_CONFIG
) --libs
--cflags gtk
+-2.0 2>/dev
/null
)
112 grep-libs
= $(filter -l
%,$(1))
113 strip-libs
= $(filter-out -l
%,$(1))
115 PERL_EMBED_LDOPTS
= $(shell perl
-MExtUtils
::Embed
-e ldopts
2>/dev
/null
)
116 PERL_EMBED_LDFLAGS
= $(call strip-libs
,$(PERL_EMBED_LDOPTS
))
117 PERL_EMBED_LIBADD
= $(call grep-libs
,$(PERL_EMBED_LDOPTS
))
118 PERL_EMBED_CCOPTS
= `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
119 FLAGS_PERL_EMBED
=$(PERL_EMBED_CCOPTS
) $(PERL_EMBED_LDOPTS
)
122 $(BUILD
) $(FLAGS_PERL_EMBED
)
127 test-libpython-version.bin
:
131 $(BUILD
) -DPACKAGE
='"perf"' -lbfd
-lz
-liberty
-ldl
134 $(CC
) -Wall
-Werror
-o
$(OUTPUT
)$@ test-libbfd.c
-DPACKAGE
='"perf"' -lbfd
-ldl
-liberty
137 $(CC
) -Wall
-Werror
-o
$(OUTPUT
)$@ test-libbfd.c
-DPACKAGE
='"perf"' -lbfd
-ldl
-liberty
-lz
139 test-cplus-demangle.bin
:
148 test-libdw-dwarf-unwind.bin
:
149 $(BUILD
) # -ldw provided by $(FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind)
151 test-libbabeltrace.bin
:
152 $(BUILD
) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace)
154 test-sync-compare-and-swap.bin
:
158 $(CC
) -m32
-o
$(OUTPUT
)$@ test-compile.c
160 test-compile-x32.bin
:
161 $(CC
) -mx32
-o
$(OUTPUT
)$@ test-compile.c
174 ###############################
177 rm -f
$(FILES
) *.d
$(FILES
:.bin
=.make.output
)