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 \
24 test-libpython-version.bin \
27 test-libunwind-debug-frame.bin \
28 test-pthread-attr-setaffinity-np.bin \
29 test-stackprotector-all.bin \
31 test-libdw-dwarf-unwind.bin \
32 test-libbabeltrace.bin \
34 test-compile-x32.bin \
39 CC
:= $(CROSS_COMPILE
)gcc
-MD
40 PKG_CONFIG
:= $(CROSS_COMPILE
)pkg-config
44 __BUILD
= $(CC
) $(CFLAGS
) -Wall
-Werror
-o
$(OUTPUT
)$@
$(patsubst %.bin
,%.c
,$@
) $(LDFLAGS
)
45 BUILD
= $(__BUILD
) > $(OUTPUT
)$(@
:.bin
=.make.output
) 2>&1
47 ###############################
50 $(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
55 test-pthread-attr-setaffinity-np.bin
:
56 $(BUILD
) -D_GNU_SOURCE
-lpthread
58 test-stackprotector-all.bin
:
59 $(BUILD
) -fstack-protector-all
61 test-fortify-source.bin
:
62 $(BUILD
) -O2
-D_FORTIFY_SOURCE
=2
74 ifeq ($(findstring -static
,${LDFLAGS}),-static
)
75 DWARFLIBS
+= -lelf
-lebl
-lz
-llzma
-lbz2
84 test-libelf-getphdrnum.bin
:
93 test-libunwind-debug-frame.bin
:
100 $(BUILD
) -I
/usr
/include/slang
-lslang
103 $(BUILD
) $(shell $(PKG_CONFIG
) --libs
--cflags gtk
+-2.0 2>/dev
/null
)
105 test-gtk2-infobar.bin
:
106 $(BUILD
) $(shell $(PKG_CONFIG
) --libs
--cflags gtk
+-2.0 2>/dev
/null
)
108 grep-libs
= $(filter -l
%,$(1))
109 strip-libs
= $(filter-out -l
%,$(1))
111 PERL_EMBED_LDOPTS
= $(shell perl
-MExtUtils
::Embed
-e ldopts
2>/dev
/null
)
112 PERL_EMBED_LDFLAGS
= $(call strip-libs
,$(PERL_EMBED_LDOPTS
))
113 PERL_EMBED_LIBADD
= $(call grep-libs
,$(PERL_EMBED_LDOPTS
))
114 PERL_EMBED_CCOPTS
= `perl -MExtUtils::Embed -e ccopts 2>/dev/null`
115 FLAGS_PERL_EMBED
=$(PERL_EMBED_CCOPTS
) $(PERL_EMBED_LDOPTS
)
118 $(BUILD
) $(FLAGS_PERL_EMBED
)
123 test-libpython-version.bin
:
127 $(BUILD
) -DPACKAGE
='"perf"' -lbfd
-lz
-liberty
-ldl
130 $(CC
) -Wall
-Werror
-o
$(OUTPUT
)$@ test-libbfd.c
-DPACKAGE
='"perf"' -lbfd
-ldl
-liberty
133 $(CC
) -Wall
-Werror
-o
$(OUTPUT
)$@ test-libbfd.c
-DPACKAGE
='"perf"' -lbfd
-ldl
-liberty
-lz
135 test-cplus-demangle.bin
:
144 test-libdw-dwarf-unwind.bin
:
145 $(BUILD
) # -ldw provided by $(FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind)
147 test-libbabeltrace.bin
:
148 $(BUILD
) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace)
150 test-sync-compare-and-swap.bin
:
154 $(CC
) -m32
-o
$(OUTPUT
)$@ test-compile.c
156 test-compile-x32.bin
:
157 $(CC
) -mx32
-o
$(OUTPUT
)$@ test-compile.c
170 ###############################
173 rm -f
$(FILES
) *.d
$(FILES
:.bin
=.make.output
)