18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ciFILES= \ 38c2ecf20Sopenharmony_ci test-all.bin \ 48c2ecf20Sopenharmony_ci test-backtrace.bin \ 58c2ecf20Sopenharmony_ci test-bionic.bin \ 68c2ecf20Sopenharmony_ci test-dwarf.bin \ 78c2ecf20Sopenharmony_ci test-dwarf_getlocations.bin \ 88c2ecf20Sopenharmony_ci test-eventfd.bin \ 98c2ecf20Sopenharmony_ci test-fortify-source.bin \ 108c2ecf20Sopenharmony_ci test-sync-compare-and-swap.bin \ 118c2ecf20Sopenharmony_ci test-get_current_dir_name.bin \ 128c2ecf20Sopenharmony_ci test-glibc.bin \ 138c2ecf20Sopenharmony_ci test-gtk2.bin \ 148c2ecf20Sopenharmony_ci test-gtk2-infobar.bin \ 158c2ecf20Sopenharmony_ci test-hello.bin \ 168c2ecf20Sopenharmony_ci test-libaudit.bin \ 178c2ecf20Sopenharmony_ci test-libbfd.bin \ 188c2ecf20Sopenharmony_ci test-libbfd-buildid.bin \ 198c2ecf20Sopenharmony_ci test-disassembler-four-args.bin \ 208c2ecf20Sopenharmony_ci test-reallocarray.bin \ 218c2ecf20Sopenharmony_ci test-libbfd-liberty.bin \ 228c2ecf20Sopenharmony_ci test-libbfd-liberty-z.bin \ 238c2ecf20Sopenharmony_ci test-cplus-demangle.bin \ 248c2ecf20Sopenharmony_ci test-libcap.bin \ 258c2ecf20Sopenharmony_ci test-libelf.bin \ 268c2ecf20Sopenharmony_ci test-libelf-getphdrnum.bin \ 278c2ecf20Sopenharmony_ci test-libelf-gelf_getnote.bin \ 288c2ecf20Sopenharmony_ci test-libelf-getshdrstrndx.bin \ 298c2ecf20Sopenharmony_ci test-libdebuginfod.bin \ 308c2ecf20Sopenharmony_ci test-libnuma.bin \ 318c2ecf20Sopenharmony_ci test-numa_num_possible_cpus.bin \ 328c2ecf20Sopenharmony_ci test-libperl.bin \ 338c2ecf20Sopenharmony_ci test-libpython.bin \ 348c2ecf20Sopenharmony_ci test-libslang.bin \ 358c2ecf20Sopenharmony_ci test-libslang-include-subdir.bin \ 368c2ecf20Sopenharmony_ci test-libcrypto.bin \ 378c2ecf20Sopenharmony_ci test-libunwind.bin \ 388c2ecf20Sopenharmony_ci test-libunwind-debug-frame.bin \ 398c2ecf20Sopenharmony_ci test-libunwind-x86.bin \ 408c2ecf20Sopenharmony_ci test-libunwind-x86_64.bin \ 418c2ecf20Sopenharmony_ci test-libunwind-arm.bin \ 428c2ecf20Sopenharmony_ci test-libunwind-aarch64.bin \ 438c2ecf20Sopenharmony_ci test-libunwind-debug-frame-arm.bin \ 448c2ecf20Sopenharmony_ci test-libunwind-debug-frame-aarch64.bin \ 458c2ecf20Sopenharmony_ci test-pthread-attr-setaffinity-np.bin \ 468c2ecf20Sopenharmony_ci test-pthread-barrier.bin \ 478c2ecf20Sopenharmony_ci test-stackprotector-all.bin \ 488c2ecf20Sopenharmony_ci test-timerfd.bin \ 498c2ecf20Sopenharmony_ci test-libdw-dwarf-unwind.bin \ 508c2ecf20Sopenharmony_ci test-libbabeltrace.bin \ 518c2ecf20Sopenharmony_ci test-compile-32.bin \ 528c2ecf20Sopenharmony_ci test-compile-x32.bin \ 538c2ecf20Sopenharmony_ci test-zlib.bin \ 548c2ecf20Sopenharmony_ci test-lzma.bin \ 558c2ecf20Sopenharmony_ci test-bpf.bin \ 568c2ecf20Sopenharmony_ci test-libbpf.bin \ 578c2ecf20Sopenharmony_ci test-get_cpuid.bin \ 588c2ecf20Sopenharmony_ci test-sdt.bin \ 598c2ecf20Sopenharmony_ci test-cxx.bin \ 608c2ecf20Sopenharmony_ci test-gettid.bin \ 618c2ecf20Sopenharmony_ci test-jvmti.bin \ 628c2ecf20Sopenharmony_ci test-jvmti-cmlr.bin \ 638c2ecf20Sopenharmony_ci test-sched_getcpu.bin \ 648c2ecf20Sopenharmony_ci test-setns.bin \ 658c2ecf20Sopenharmony_ci test-libopencsd.bin \ 668c2ecf20Sopenharmony_ci test-clang.bin \ 678c2ecf20Sopenharmony_ci test-llvm.bin \ 688c2ecf20Sopenharmony_ci test-llvm-version.bin \ 698c2ecf20Sopenharmony_ci test-libaio.bin \ 708c2ecf20Sopenharmony_ci test-libzstd.bin \ 718c2ecf20Sopenharmony_ci test-clang-bpf-co-re.bin \ 728c2ecf20Sopenharmony_ci test-file-handle.bin \ 738c2ecf20Sopenharmony_ci test-libpfm4.bin 748c2ecf20Sopenharmony_ci 758c2ecf20Sopenharmony_ciFILES := $(addprefix $(OUTPUT),$(FILES)) 768c2ecf20Sopenharmony_ci 778c2ecf20Sopenharmony_ciPKG_CONFIG ?= $(CROSS_COMPILE)pkg-config 788c2ecf20Sopenharmony_ciLLVM_CONFIG ?= llvm-config 798c2ecf20Sopenharmony_ciCLANG ?= clang 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_ciall: $(FILES) 828c2ecf20Sopenharmony_ci 838c2ecf20Sopenharmony_ci__BUILD = $(CC) $(CFLAGS) -MD -Wall -Werror -o $@ $(patsubst %.bin,%.c,$(@F)) $(LDFLAGS) 848c2ecf20Sopenharmony_ci BUILD = $(__BUILD) > $(@:.bin=.make.output) 2>&1 858c2ecf20Sopenharmony_ci 868c2ecf20Sopenharmony_ci__BUILDXX = $(CXX) $(CXXFLAGS) -MD -Wall -Werror -o $@ $(patsubst %.bin,%.cpp,$(@F)) $(LDFLAGS) 878c2ecf20Sopenharmony_ci BUILDXX = $(__BUILDXX) > $(@:.bin=.make.output) 2>&1 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_ci############################### 908c2ecf20Sopenharmony_ci 918c2ecf20Sopenharmony_ci$(OUTPUT)test-all.bin: 928c2ecf20Sopenharmony_ci $(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -I/usr/include/slang -lslang $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl -lz -llzma -lzstd -lcap 938c2ecf20Sopenharmony_ci 948c2ecf20Sopenharmony_ci$(OUTPUT)test-hello.bin: 958c2ecf20Sopenharmony_ci $(BUILD) 968c2ecf20Sopenharmony_ci 978c2ecf20Sopenharmony_ci$(OUTPUT)test-pthread-attr-setaffinity-np.bin: 988c2ecf20Sopenharmony_ci $(BUILD) -D_GNU_SOURCE -lpthread 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_ci$(OUTPUT)test-pthread-barrier.bin: 1018c2ecf20Sopenharmony_ci $(BUILD) -lpthread 1028c2ecf20Sopenharmony_ci 1038c2ecf20Sopenharmony_ci$(OUTPUT)test-stackprotector-all.bin: 1048c2ecf20Sopenharmony_ci $(BUILD) -fstack-protector-all 1058c2ecf20Sopenharmony_ci 1068c2ecf20Sopenharmony_ci$(OUTPUT)test-fortify-source.bin: 1078c2ecf20Sopenharmony_ci $(BUILD) -O2 -D_FORTIFY_SOURCE=2 1088c2ecf20Sopenharmony_ci 1098c2ecf20Sopenharmony_ci$(OUTPUT)test-bionic.bin: 1108c2ecf20Sopenharmony_ci $(BUILD) 1118c2ecf20Sopenharmony_ci 1128c2ecf20Sopenharmony_ci$(OUTPUT)test-libcap.bin: 1138c2ecf20Sopenharmony_ci $(BUILD) -lcap 1148c2ecf20Sopenharmony_ci 1158c2ecf20Sopenharmony_ci$(OUTPUT)test-libelf.bin: 1168c2ecf20Sopenharmony_ci $(BUILD) -lelf 1178c2ecf20Sopenharmony_ci 1188c2ecf20Sopenharmony_ci$(OUTPUT)test-eventfd.bin: 1198c2ecf20Sopenharmony_ci $(BUILD) 1208c2ecf20Sopenharmony_ci 1218c2ecf20Sopenharmony_ci$(OUTPUT)test-get_current_dir_name.bin: 1228c2ecf20Sopenharmony_ci $(BUILD) 1238c2ecf20Sopenharmony_ci 1248c2ecf20Sopenharmony_ci$(OUTPUT)test-glibc.bin: 1258c2ecf20Sopenharmony_ci $(BUILD) 1268c2ecf20Sopenharmony_ci 1278c2ecf20Sopenharmony_ci$(OUTPUT)test-sched_getcpu.bin: 1288c2ecf20Sopenharmony_ci $(BUILD) 1298c2ecf20Sopenharmony_ci 1308c2ecf20Sopenharmony_ci$(OUTPUT)test-setns.bin: 1318c2ecf20Sopenharmony_ci $(BUILD) 1328c2ecf20Sopenharmony_ci 1338c2ecf20Sopenharmony_ci$(OUTPUT)test-libopencsd.bin: 1348c2ecf20Sopenharmony_ci $(BUILD) # -lopencsd_c_api -lopencsd provided by 1358c2ecf20Sopenharmony_ci # $(FEATURE_CHECK_LDFLAGS-libopencsd) 1368c2ecf20Sopenharmony_ci 1378c2ecf20Sopenharmony_ciDWARFLIBS := -ldw 1388c2ecf20Sopenharmony_ciifeq ($(findstring -static,${LDFLAGS}),-static) 1398c2ecf20Sopenharmony_ciDWARFLIBS += -lelf -lebl -lz -llzma -lbz2 1408c2ecf20Sopenharmony_ciendif 1418c2ecf20Sopenharmony_ci 1428c2ecf20Sopenharmony_ci$(OUTPUT)test-dwarf.bin: 1438c2ecf20Sopenharmony_ci $(BUILD) $(DWARFLIBS) 1448c2ecf20Sopenharmony_ci 1458c2ecf20Sopenharmony_ci$(OUTPUT)test-dwarf_getlocations.bin: 1468c2ecf20Sopenharmony_ci $(BUILD) $(DWARFLIBS) 1478c2ecf20Sopenharmony_ci 1488c2ecf20Sopenharmony_ci$(OUTPUT)test-libelf-getphdrnum.bin: 1498c2ecf20Sopenharmony_ci $(BUILD) -lelf 1508c2ecf20Sopenharmony_ci 1518c2ecf20Sopenharmony_ci$(OUTPUT)test-libelf-gelf_getnote.bin: 1528c2ecf20Sopenharmony_ci $(BUILD) -lelf 1538c2ecf20Sopenharmony_ci 1548c2ecf20Sopenharmony_ci$(OUTPUT)test-libelf-getshdrstrndx.bin: 1558c2ecf20Sopenharmony_ci $(BUILD) -lelf 1568c2ecf20Sopenharmony_ci 1578c2ecf20Sopenharmony_ci$(OUTPUT)test-libdebuginfod.bin: 1588c2ecf20Sopenharmony_ci $(BUILD) -ldebuginfod 1598c2ecf20Sopenharmony_ci 1608c2ecf20Sopenharmony_ci$(OUTPUT)test-libnuma.bin: 1618c2ecf20Sopenharmony_ci $(BUILD) -lnuma 1628c2ecf20Sopenharmony_ci 1638c2ecf20Sopenharmony_ci$(OUTPUT)test-numa_num_possible_cpus.bin: 1648c2ecf20Sopenharmony_ci $(BUILD) -lnuma 1658c2ecf20Sopenharmony_ci 1668c2ecf20Sopenharmony_ci$(OUTPUT)test-libunwind.bin: 1678c2ecf20Sopenharmony_ci $(BUILD) -lelf 1688c2ecf20Sopenharmony_ci 1698c2ecf20Sopenharmony_ci$(OUTPUT)test-libunwind-debug-frame.bin: 1708c2ecf20Sopenharmony_ci $(BUILD) -lelf 1718c2ecf20Sopenharmony_ci$(OUTPUT)test-libunwind-x86.bin: 1728c2ecf20Sopenharmony_ci $(BUILD) -lelf -lunwind-x86 1738c2ecf20Sopenharmony_ci 1748c2ecf20Sopenharmony_ci$(OUTPUT)test-libunwind-x86_64.bin: 1758c2ecf20Sopenharmony_ci $(BUILD) -lelf -lunwind-x86_64 1768c2ecf20Sopenharmony_ci 1778c2ecf20Sopenharmony_ci$(OUTPUT)test-libunwind-arm.bin: 1788c2ecf20Sopenharmony_ci $(BUILD) -lelf -lunwind-arm 1798c2ecf20Sopenharmony_ci 1808c2ecf20Sopenharmony_ci$(OUTPUT)test-libunwind-aarch64.bin: 1818c2ecf20Sopenharmony_ci $(BUILD) -lelf -lunwind-aarch64 1828c2ecf20Sopenharmony_ci 1838c2ecf20Sopenharmony_ci$(OUTPUT)test-libunwind-debug-frame-arm.bin: 1848c2ecf20Sopenharmony_ci $(BUILD) -lelf -lunwind-arm 1858c2ecf20Sopenharmony_ci 1868c2ecf20Sopenharmony_ci$(OUTPUT)test-libunwind-debug-frame-aarch64.bin: 1878c2ecf20Sopenharmony_ci $(BUILD) -lelf -lunwind-aarch64 1888c2ecf20Sopenharmony_ci 1898c2ecf20Sopenharmony_ci$(OUTPUT)test-libaudit.bin: 1908c2ecf20Sopenharmony_ci $(BUILD) -laudit 1918c2ecf20Sopenharmony_ci 1928c2ecf20Sopenharmony_ci$(OUTPUT)test-libslang.bin: 1938c2ecf20Sopenharmony_ci $(BUILD) -lslang 1948c2ecf20Sopenharmony_ci 1958c2ecf20Sopenharmony_ci$(OUTPUT)test-libslang-include-subdir.bin: 1968c2ecf20Sopenharmony_ci $(BUILD) -lslang 1978c2ecf20Sopenharmony_ci 1988c2ecf20Sopenharmony_ci$(OUTPUT)test-libcrypto.bin: 1998c2ecf20Sopenharmony_ci $(BUILD) -lcrypto 2008c2ecf20Sopenharmony_ci 2018c2ecf20Sopenharmony_ci$(OUTPUT)test-gtk2.bin: 2028c2ecf20Sopenharmony_ci $(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) -Wno-deprecated-declarations 2038c2ecf20Sopenharmony_ci 2048c2ecf20Sopenharmony_ci$(OUTPUT)test-gtk2-infobar.bin: 2058c2ecf20Sopenharmony_ci $(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) 2068c2ecf20Sopenharmony_ci 2078c2ecf20Sopenharmony_cigrep-libs = $(filter -l%,$(1)) 2088c2ecf20Sopenharmony_cistrip-libs = $(filter-out -l%,$(1)) 2098c2ecf20Sopenharmony_ci 2108c2ecf20Sopenharmony_ciPERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null) 2118c2ecf20Sopenharmony_ciPERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS)) 2128c2ecf20Sopenharmony_ciPERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS)) 2138c2ecf20Sopenharmony_ciPERL_EMBED_CCOPTS = $(shell perl -MExtUtils::Embed -e ccopts 2>/dev/null) 2148c2ecf20Sopenharmony_ciFLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS) 2158c2ecf20Sopenharmony_ci 2168c2ecf20Sopenharmony_ciifeq ($(CC_NO_CLANG), 0) 2178c2ecf20Sopenharmony_ci PERL_EMBED_LDOPTS := $(filter-out -specs=%,$(PERL_EMBED_LDOPTS)) 2188c2ecf20Sopenharmony_ci PERL_EMBED_CCOPTS := $(filter-out -flto=auto -ffat-lto-objects, $(PERL_EMBED_CCOPTS)) 2198c2ecf20Sopenharmony_ci PERL_EMBED_CCOPTS := $(filter-out -specs=%,$(PERL_EMBED_CCOPTS)) 2208c2ecf20Sopenharmony_ci FLAGS_PERL_EMBED += -Wno-compound-token-split-by-macro 2218c2ecf20Sopenharmony_ciendif 2228c2ecf20Sopenharmony_ci 2238c2ecf20Sopenharmony_ci$(OUTPUT)test-libperl.bin: 2248c2ecf20Sopenharmony_ci $(BUILD) $(FLAGS_PERL_EMBED) 2258c2ecf20Sopenharmony_ci 2268c2ecf20Sopenharmony_ci$(OUTPUT)test-libpython.bin: 2278c2ecf20Sopenharmony_ci $(BUILD) $(FLAGS_PYTHON_EMBED) 2288c2ecf20Sopenharmony_ci 2298c2ecf20Sopenharmony_ci$(OUTPUT)test-libbfd.bin: 2308c2ecf20Sopenharmony_ci $(BUILD) -DPACKAGE='"perf"' -lbfd -ldl 2318c2ecf20Sopenharmony_ci 2328c2ecf20Sopenharmony_ci$(OUTPUT)test-libbfd-buildid.bin: 2338c2ecf20Sopenharmony_ci $(BUILD) -DPACKAGE='"perf"' -lbfd -ldl 2348c2ecf20Sopenharmony_ci 2358c2ecf20Sopenharmony_ci$(OUTPUT)test-disassembler-four-args.bin: 2368c2ecf20Sopenharmony_ci $(BUILD) -DPACKAGE='"perf"' -lbfd -lopcodes 2378c2ecf20Sopenharmony_ci 2388c2ecf20Sopenharmony_ci$(OUTPUT)test-reallocarray.bin: 2398c2ecf20Sopenharmony_ci $(BUILD) 2408c2ecf20Sopenharmony_ci 2418c2ecf20Sopenharmony_ci$(OUTPUT)test-libbfd-liberty.bin: 2428c2ecf20Sopenharmony_ci $(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty 2438c2ecf20Sopenharmony_ci 2448c2ecf20Sopenharmony_ci$(OUTPUT)test-libbfd-liberty-z.bin: 2458c2ecf20Sopenharmony_ci $(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty -lz 2468c2ecf20Sopenharmony_ci 2478c2ecf20Sopenharmony_ci$(OUTPUT)test-cplus-demangle.bin: 2488c2ecf20Sopenharmony_ci $(BUILD) -liberty 2498c2ecf20Sopenharmony_ci 2508c2ecf20Sopenharmony_ci$(OUTPUT)test-backtrace.bin: 2518c2ecf20Sopenharmony_ci $(BUILD) 2528c2ecf20Sopenharmony_ci 2538c2ecf20Sopenharmony_ci$(OUTPUT)test-timerfd.bin: 2548c2ecf20Sopenharmony_ci $(BUILD) 2558c2ecf20Sopenharmony_ci 2568c2ecf20Sopenharmony_ci$(OUTPUT)test-libdw-dwarf-unwind.bin: 2578c2ecf20Sopenharmony_ci $(BUILD) # -ldw provided by $(FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind) 2588c2ecf20Sopenharmony_ci 2598c2ecf20Sopenharmony_ci$(OUTPUT)test-libbabeltrace.bin: 2608c2ecf20Sopenharmony_ci $(BUILD) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace) 2618c2ecf20Sopenharmony_ci 2628c2ecf20Sopenharmony_ci$(OUTPUT)test-sync-compare-and-swap.bin: 2638c2ecf20Sopenharmony_ci $(BUILD) 2648c2ecf20Sopenharmony_ci 2658c2ecf20Sopenharmony_ci$(OUTPUT)test-compile-32.bin: 2668c2ecf20Sopenharmony_ci $(CC) -m32 -o $@ test-compile.c 2678c2ecf20Sopenharmony_ci 2688c2ecf20Sopenharmony_ci$(OUTPUT)test-compile-x32.bin: 2698c2ecf20Sopenharmony_ci $(CC) -mx32 -o $@ test-compile.c 2708c2ecf20Sopenharmony_ci 2718c2ecf20Sopenharmony_ci$(OUTPUT)test-zlib.bin: 2728c2ecf20Sopenharmony_ci $(BUILD) -lz 2738c2ecf20Sopenharmony_ci 2748c2ecf20Sopenharmony_ci$(OUTPUT)test-lzma.bin: 2758c2ecf20Sopenharmony_ci $(BUILD) -llzma 2768c2ecf20Sopenharmony_ci 2778c2ecf20Sopenharmony_ci$(OUTPUT)test-get_cpuid.bin: 2788c2ecf20Sopenharmony_ci $(BUILD) 2798c2ecf20Sopenharmony_ci 2808c2ecf20Sopenharmony_ci$(OUTPUT)test-bpf.bin: 2818c2ecf20Sopenharmony_ci $(BUILD) 2828c2ecf20Sopenharmony_ci 2838c2ecf20Sopenharmony_ci$(OUTPUT)test-libbpf.bin: 2848c2ecf20Sopenharmony_ci $(BUILD) -lbpf 2858c2ecf20Sopenharmony_ci 2868c2ecf20Sopenharmony_ci$(OUTPUT)test-sdt.bin: 2878c2ecf20Sopenharmony_ci $(BUILD) 2888c2ecf20Sopenharmony_ci 2898c2ecf20Sopenharmony_ci$(OUTPUT)test-cxx.bin: 2908c2ecf20Sopenharmony_ci $(BUILDXX) -std=gnu++11 2918c2ecf20Sopenharmony_ci 2928c2ecf20Sopenharmony_ci$(OUTPUT)test-gettid.bin: 2938c2ecf20Sopenharmony_ci $(BUILD) 2948c2ecf20Sopenharmony_ci 2958c2ecf20Sopenharmony_ci$(OUTPUT)test-jvmti.bin: 2968c2ecf20Sopenharmony_ci $(BUILD) 2978c2ecf20Sopenharmony_ci 2988c2ecf20Sopenharmony_ci$(OUTPUT)test-jvmti-cmlr.bin: 2998c2ecf20Sopenharmony_ci $(BUILD) 3008c2ecf20Sopenharmony_ci 3018c2ecf20Sopenharmony_ci$(OUTPUT)test-llvm.bin: 3028c2ecf20Sopenharmony_ci $(BUILDXX) -std=gnu++11 \ 3038c2ecf20Sopenharmony_ci -I$(shell $(LLVM_CONFIG) --includedir) \ 3048c2ecf20Sopenharmony_ci -L$(shell $(LLVM_CONFIG) --libdir) \ 3058c2ecf20Sopenharmony_ci $(shell $(LLVM_CONFIG) --libs Core BPF) \ 3068c2ecf20Sopenharmony_ci $(shell $(LLVM_CONFIG) --system-libs) \ 3078c2ecf20Sopenharmony_ci > $(@:.bin=.make.output) 2>&1 3088c2ecf20Sopenharmony_ci 3098c2ecf20Sopenharmony_ci$(OUTPUT)test-llvm-version.bin: 3108c2ecf20Sopenharmony_ci $(BUILDXX) -std=gnu++11 \ 3118c2ecf20Sopenharmony_ci -I$(shell $(LLVM_CONFIG) --includedir) \ 3128c2ecf20Sopenharmony_ci > $(@:.bin=.make.output) 2>&1 3138c2ecf20Sopenharmony_ci 3148c2ecf20Sopenharmony_ci$(OUTPUT)test-clang.bin: 3158c2ecf20Sopenharmony_ci $(BUILDXX) -std=gnu++11 \ 3168c2ecf20Sopenharmony_ci -I$(shell $(LLVM_CONFIG) --includedir) \ 3178c2ecf20Sopenharmony_ci -L$(shell $(LLVM_CONFIG) --libdir) \ 3188c2ecf20Sopenharmony_ci -Wl,--start-group -lclangBasic -lclangDriver \ 3198c2ecf20Sopenharmony_ci -lclangFrontend -lclangEdit -lclangLex \ 3208c2ecf20Sopenharmony_ci -lclangAST -Wl,--end-group \ 3218c2ecf20Sopenharmony_ci $(shell $(LLVM_CONFIG) --libs Core option) \ 3228c2ecf20Sopenharmony_ci $(shell $(LLVM_CONFIG) --system-libs) \ 3238c2ecf20Sopenharmony_ci > $(@:.bin=.make.output) 2>&1 3248c2ecf20Sopenharmony_ci 3258c2ecf20Sopenharmony_ci-include $(OUTPUT)*.d 3268c2ecf20Sopenharmony_ci 3278c2ecf20Sopenharmony_ci$(OUTPUT)test-libaio.bin: 3288c2ecf20Sopenharmony_ci $(BUILD) -lrt 3298c2ecf20Sopenharmony_ci 3308c2ecf20Sopenharmony_ci$(OUTPUT)test-libzstd.bin: 3318c2ecf20Sopenharmony_ci $(BUILD) -lzstd 3328c2ecf20Sopenharmony_ci 3338c2ecf20Sopenharmony_ci$(OUTPUT)test-clang-bpf-co-re.bin: 3348c2ecf20Sopenharmony_ci $(CLANG) -S -g -target bpf -o - $(patsubst %.bin,%.c,$(@F)) | \ 3358c2ecf20Sopenharmony_ci grep BTF_KIND_VAR 3368c2ecf20Sopenharmony_ci 3378c2ecf20Sopenharmony_ci$(OUTPUT)test-file-handle.bin: 3388c2ecf20Sopenharmony_ci $(BUILD) 3398c2ecf20Sopenharmony_ci 3408c2ecf20Sopenharmony_ci$(OUTPUT)test-libpfm4.bin: 3418c2ecf20Sopenharmony_ci $(BUILD) -lpfm 3428c2ecf20Sopenharmony_ci 3438c2ecf20Sopenharmony_ci############################### 3448c2ecf20Sopenharmony_ci 3458c2ecf20Sopenharmony_ciclean: 3468c2ecf20Sopenharmony_ci rm -f $(FILES) $(OUTPUT)*.d $(FILES:.bin=.make.output) 347