1 # SPDX-License-Identifier: GPL-2.0 1 # SPDX-License-Identifier: GPL-2.0 2 include ../../scripts/Makefile.include 2 include ../../scripts/Makefile.include 3 3 4 FILES= 4 FILES= \ 5 test-all.bin 5 test-all.bin \ 6 test-backtrace.bin 6 test-backtrace.bin \ 7 test-bionic.bin 7 test-bionic.bin \ 8 test-dwarf.bin 8 test-dwarf.bin \ 9 test-dwarf_getlocations.bin 9 test-dwarf_getlocations.bin \ 10 test-dwarf_getcfi.bin << 11 test-eventfd.bin 10 test-eventfd.bin \ 12 test-fortify-source.bin 11 test-fortify-source.bin \ 13 test-get_current_dir_name.bin 12 test-get_current_dir_name.bin \ 14 test-glibc.bin 13 test-glibc.bin \ 15 test-gtk2.bin 14 test-gtk2.bin \ 16 test-gtk2-infobar.bin 15 test-gtk2-infobar.bin \ 17 test-hello.bin 16 test-hello.bin \ 18 test-libaudit.bin 17 test-libaudit.bin \ 19 test-libbfd.bin 18 test-libbfd.bin \ 20 test-libbfd-buildid.bin 19 test-libbfd-buildid.bin \ 21 test-disassembler-four-args.bin 20 test-disassembler-four-args.bin \ 22 test-disassembler-init-styled.bin 21 test-disassembler-init-styled.bin \ 23 test-reallocarray.bin 22 test-reallocarray.bin \ 24 test-libbfd-liberty.bin 23 test-libbfd-liberty.bin \ 25 test-libbfd-liberty-z.bin 24 test-libbfd-liberty-z.bin \ 26 test-cplus-demangle.bin 25 test-cplus-demangle.bin \ 27 test-cxa-demangle.bin << 28 test-libcap.bin 26 test-libcap.bin \ 29 test-libelf.bin 27 test-libelf.bin \ 30 test-libelf-getphdrnum.bin 28 test-libelf-getphdrnum.bin \ 31 test-libelf-gelf_getnote.bin 29 test-libelf-gelf_getnote.bin \ 32 test-libelf-getshdrstrndx.bin 30 test-libelf-getshdrstrndx.bin \ 33 test-libdebuginfod.bin 31 test-libdebuginfod.bin \ 34 test-libnuma.bin 32 test-libnuma.bin \ 35 test-numa_num_possible_cpus.bin 33 test-numa_num_possible_cpus.bin \ 36 test-libperl.bin 34 test-libperl.bin \ 37 test-libpython.bin 35 test-libpython.bin \ 38 test-libslang.bin 36 test-libslang.bin \ 39 test-libslang-include-subdir.bin 37 test-libslang-include-subdir.bin \ 40 test-libtraceevent.bin 38 test-libtraceevent.bin \ 41 test-libtracefs.bin 39 test-libtracefs.bin \ 42 test-libcrypto.bin 40 test-libcrypto.bin \ 43 test-libunwind.bin 41 test-libunwind.bin \ 44 test-libunwind-debug-frame.bin 42 test-libunwind-debug-frame.bin \ 45 test-libunwind-x86.bin 43 test-libunwind-x86.bin \ 46 test-libunwind-x86_64.bin 44 test-libunwind-x86_64.bin \ 47 test-libunwind-arm.bin 45 test-libunwind-arm.bin \ 48 test-libunwind-aarch64.bin 46 test-libunwind-aarch64.bin \ 49 test-libunwind-debug-frame-arm.bin 47 test-libunwind-debug-frame-arm.bin \ 50 test-libunwind-debug-frame-aarch64.bi 48 test-libunwind-debug-frame-aarch64.bin \ 51 test-pthread-attr-setaffinity-np.bin 49 test-pthread-attr-setaffinity-np.bin \ 52 test-pthread-barrier.bin 50 test-pthread-barrier.bin \ 53 test-stackprotector-all.bin 51 test-stackprotector-all.bin \ 54 test-timerfd.bin 52 test-timerfd.bin \ 55 test-libdw-dwarf-unwind.bin 53 test-libdw-dwarf-unwind.bin \ 56 test-libbabeltrace.bin 54 test-libbabeltrace.bin \ 57 test-libcapstone.bin << 58 test-compile-32.bin 55 test-compile-32.bin \ 59 test-compile-x32.bin 56 test-compile-x32.bin \ 60 test-zlib.bin 57 test-zlib.bin \ 61 test-lzma.bin 58 test-lzma.bin \ 62 test-bpf.bin 59 test-bpf.bin \ 63 test-libbpf.bin 60 test-libbpf.bin \ >> 61 test-libbpf-btf__load_from_kernel_by_id.bin \ >> 62 test-libbpf-bpf_prog_load.bin \ >> 63 test-libbpf-bpf_map_create.bin \ >> 64 test-libbpf-bpf_object__next_program.bin \ >> 65 test-libbpf-bpf_object__next_map.bin \ >> 66 test-libbpf-bpf_program__set_insns.bin \ >> 67 test-libbpf-btf__raw_data.bin \ 64 test-get_cpuid.bin 68 test-get_cpuid.bin \ 65 test-sdt.bin 69 test-sdt.bin \ 66 test-cxx.bin 70 test-cxx.bin \ 67 test-gettid.bin 71 test-gettid.bin \ 68 test-jvmti.bin 72 test-jvmti.bin \ 69 test-jvmti-cmlr.bin 73 test-jvmti-cmlr.bin \ 70 test-scandirat.bin << 71 test-sched_getcpu.bin 74 test-sched_getcpu.bin \ 72 test-setns.bin 75 test-setns.bin \ 73 test-libopencsd.bin 76 test-libopencsd.bin \ 74 test-clang.bin 77 test-clang.bin \ 75 test-llvm.bin 78 test-llvm.bin \ 76 test-llvm-perf.bin \ !! 79 test-llvm-version.bin \ 77 test-libaio.bin 80 test-libaio.bin \ 78 test-libzstd.bin 81 test-libzstd.bin \ 79 test-clang-bpf-co-re.bin 82 test-clang-bpf-co-re.bin \ 80 test-file-handle.bin 83 test-file-handle.bin \ 81 test-libpfm4.bin 84 test-libpfm4.bin 82 85 83 FILES := $(addprefix $(OUTPUT),$(FILES)) 86 FILES := $(addprefix $(OUTPUT),$(FILES)) 84 87 85 # Some distros provide the command $(CROSS_COM !! 88 PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config 86 # searching packges installed with Multiarch. << 87 # compilation if it is existed. << 88 ifneq (, $(shell which $(CROSS_COMPILE)pkg-con << 89 PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config << 90 else << 91 PKG_CONFIG ?= pkg-config << 92 << 93 # PKG_CONFIG_PATH or PKG_CONFIG_LIBDIR, alon << 94 # for modified system root, are required for << 95 # If these PKG_CONFIG environment variables << 96 # paths are used instead. << 97 ifdef CROSS_COMPILE << 98 ifeq ($(PKG_CONFIG_LIBDIR)$(PKG_CONFIG_PAT << 99 CROSS_ARCH = $(shell $(CC) -dumpmachine) << 100 PKG_CONFIG_LIBDIR := /usr/local/$(CROSS_ << 101 PKG_CONFIG_LIBDIR := $(PKG_CONFIG_LIBDIR << 102 PKG_CONFIG_LIBDIR := $(PKG_CONFIG_LIBDIR << 103 PKG_CONFIG_LIBDIR := $(PKG_CONFIG_LIBDIR << 104 PKG_CONFIG_LIBDIR := $(PKG_CONFIG_LIBDIR << 105 export PKG_CONFIG_LIBDIR << 106 endif << 107 endif << 108 endif << 109 89 110 all: $(FILES) 90 all: $(FILES) 111 91 112 __BUILD = $(CC) $(CFLAGS) -MD -Wall -Werror -o 92 __BUILD = $(CC) $(CFLAGS) -MD -Wall -Werror -o $@ $(patsubst %.bin,%.c,$(@F)) $(LDFLAGS) 113 BUILD = $(__BUILD) > $(@:.bin=.make.output) 93 BUILD = $(__BUILD) > $(@:.bin=.make.output) 2>&1 114 BUILD_BFD = $(BUILD) -DPACKAGE='"perf"' -lbf 94 BUILD_BFD = $(BUILD) -DPACKAGE='"perf"' -lbfd -ldl 115 BUILD_ALL = $(BUILD) -fstack-protector-all - 95 BUILD_ALL = $(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -lslang $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl -lz -llzma -lzstd -lcap 116 96 117 __BUILDXX = $(CXX) $(CXXFLAGS) -MD -Wall -Werr 97 __BUILDXX = $(CXX) $(CXXFLAGS) -MD -Wall -Werror -o $@ $(patsubst %.bin,%.cpp,$(@F)) $(LDFLAGS) 118 BUILDXX = $(__BUILDXX) > $(@:.bin=.make.outp 98 BUILDXX = $(__BUILDXX) > $(@:.bin=.make.output) 2>&1 119 99 120 ############################### 100 ############################### 121 101 122 $(OUTPUT)test-all.bin: 102 $(OUTPUT)test-all.bin: 123 $(BUILD_ALL) || $(BUILD_ALL) -lopcodes 103 $(BUILD_ALL) || $(BUILD_ALL) -lopcodes -liberty 124 104 125 $(OUTPUT)test-hello.bin: 105 $(OUTPUT)test-hello.bin: 126 $(BUILD) 106 $(BUILD) 127 107 128 $(OUTPUT)test-pthread-attr-setaffinity-np.bin: 108 $(OUTPUT)test-pthread-attr-setaffinity-np.bin: 129 $(BUILD) -D_GNU_SOURCE -lpthread 109 $(BUILD) -D_GNU_SOURCE -lpthread 130 110 131 $(OUTPUT)test-pthread-barrier.bin: 111 $(OUTPUT)test-pthread-barrier.bin: 132 $(BUILD) -lpthread 112 $(BUILD) -lpthread 133 113 134 $(OUTPUT)test-stackprotector-all.bin: 114 $(OUTPUT)test-stackprotector-all.bin: 135 $(BUILD) -fstack-protector-all 115 $(BUILD) -fstack-protector-all 136 116 137 $(OUTPUT)test-fortify-source.bin: 117 $(OUTPUT)test-fortify-source.bin: 138 $(BUILD) -O2 -D_FORTIFY_SOURCE=2 118 $(BUILD) -O2 -D_FORTIFY_SOURCE=2 139 119 140 $(OUTPUT)test-bionic.bin: 120 $(OUTPUT)test-bionic.bin: 141 $(BUILD) 121 $(BUILD) 142 122 143 $(OUTPUT)test-libcap.bin: 123 $(OUTPUT)test-libcap.bin: 144 $(BUILD) -lcap 124 $(BUILD) -lcap 145 125 146 $(OUTPUT)test-libelf.bin: 126 $(OUTPUT)test-libelf.bin: 147 $(BUILD) -lelf 127 $(BUILD) -lelf 148 128 149 $(OUTPUT)test-eventfd.bin: 129 $(OUTPUT)test-eventfd.bin: 150 $(BUILD) 130 $(BUILD) 151 131 152 $(OUTPUT)test-get_current_dir_name.bin: 132 $(OUTPUT)test-get_current_dir_name.bin: 153 $(BUILD) 133 $(BUILD) 154 134 155 $(OUTPUT)test-glibc.bin: 135 $(OUTPUT)test-glibc.bin: 156 $(BUILD) 136 $(BUILD) 157 137 158 $(OUTPUT)test-scandirat.bin: << 159 $(BUILD) << 160 << 161 $(OUTPUT)test-sched_getcpu.bin: 138 $(OUTPUT)test-sched_getcpu.bin: 162 $(BUILD) 139 $(BUILD) 163 140 164 $(OUTPUT)test-setns.bin: 141 $(OUTPUT)test-setns.bin: 165 $(BUILD) 142 $(BUILD) 166 143 167 $(OUTPUT)test-libopencsd.bin: 144 $(OUTPUT)test-libopencsd.bin: 168 $(BUILD) # -lopencsd_c_api -lopencsd p 145 $(BUILD) # -lopencsd_c_api -lopencsd provided by 169 # $(FEATURE_CHECK_LDFLAGS-lib 146 # $(FEATURE_CHECK_LDFLAGS-libopencsd) 170 147 171 DWARFLIBS := -ldw 148 DWARFLIBS := -ldw 172 ifeq ($(findstring -static,${LDFLAGS}),-static 149 ifeq ($(findstring -static,${LDFLAGS}),-static) 173 DWARFLIBS += -lelf -lz -llzma -lbz2 -lzstd !! 150 DWARFLIBS += -lelf -lebl -lz -llzma -lbz2 174 << 175 LIBDW_VERSION := $(shell $(PKG_CONFIG) --mod << 176 LIBDW_VERSION_1 := $(word 1, $(subst ., ,$(L << 177 LIBDW_VERSION_2 := $(word 2, $(subst ., ,$(L << 178 << 179 # Elfutils merged libebl.a into libdw.a star << 180 # Link libebl.a only if libdw is older than << 181 ifeq ($(shell test $(LIBDW_VERSION_2) -lt 17 << 182 DWARFLIBS += -lebl << 183 endif << 184 << 185 # Must put -ldl after -lebl for dependency << 186 DWARFLIBS += -ldl << 187 endif 151 endif 188 152 189 $(OUTPUT)test-dwarf.bin: 153 $(OUTPUT)test-dwarf.bin: 190 $(BUILD) $(DWARFLIBS) 154 $(BUILD) $(DWARFLIBS) 191 155 192 $(OUTPUT)test-dwarf_getlocations.bin: 156 $(OUTPUT)test-dwarf_getlocations.bin: 193 $(BUILD) $(DWARFLIBS) 157 $(BUILD) $(DWARFLIBS) 194 158 195 $(OUTPUT)test-dwarf_getcfi.bin: << 196 $(BUILD) $(DWARFLIBS) << 197 << 198 $(OUTPUT)test-libelf-getphdrnum.bin: 159 $(OUTPUT)test-libelf-getphdrnum.bin: 199 $(BUILD) -lelf 160 $(BUILD) -lelf 200 161 201 $(OUTPUT)test-libelf-gelf_getnote.bin: 162 $(OUTPUT)test-libelf-gelf_getnote.bin: 202 $(BUILD) -lelf 163 $(BUILD) -lelf 203 164 204 $(OUTPUT)test-libelf-getshdrstrndx.bin: 165 $(OUTPUT)test-libelf-getshdrstrndx.bin: 205 $(BUILD) -lelf 166 $(BUILD) -lelf 206 167 207 $(OUTPUT)test-libdebuginfod.bin: 168 $(OUTPUT)test-libdebuginfod.bin: 208 $(BUILD) -ldebuginfod 169 $(BUILD) -ldebuginfod 209 170 210 $(OUTPUT)test-libnuma.bin: 171 $(OUTPUT)test-libnuma.bin: 211 $(BUILD) -lnuma 172 $(BUILD) -lnuma 212 173 213 $(OUTPUT)test-numa_num_possible_cpus.bin: 174 $(OUTPUT)test-numa_num_possible_cpus.bin: 214 $(BUILD) -lnuma 175 $(BUILD) -lnuma 215 176 216 $(OUTPUT)test-libunwind.bin: 177 $(OUTPUT)test-libunwind.bin: 217 $(BUILD) -lelf -llzma !! 178 $(BUILD) -lelf 218 179 219 $(OUTPUT)test-libunwind-debug-frame.bin: 180 $(OUTPUT)test-libunwind-debug-frame.bin: 220 $(BUILD) -lelf -llzma !! 181 $(BUILD) -lelf 221 $(OUTPUT)test-libunwind-x86.bin: 182 $(OUTPUT)test-libunwind-x86.bin: 222 $(BUILD) -lelf -llzma -lunwind-x86 !! 183 $(BUILD) -lelf -lunwind-x86 223 184 224 $(OUTPUT)test-libunwind-x86_64.bin: 185 $(OUTPUT)test-libunwind-x86_64.bin: 225 $(BUILD) -lelf -llzma -lunwind-x86_64 !! 186 $(BUILD) -lelf -lunwind-x86_64 226 187 227 $(OUTPUT)test-libunwind-arm.bin: 188 $(OUTPUT)test-libunwind-arm.bin: 228 $(BUILD) -lelf -llzma -lunwind-arm !! 189 $(BUILD) -lelf -lunwind-arm 229 190 230 $(OUTPUT)test-libunwind-aarch64.bin: 191 $(OUTPUT)test-libunwind-aarch64.bin: 231 $(BUILD) -lelf -llzma -lunwind-aarch64 !! 192 $(BUILD) -lelf -lunwind-aarch64 232 193 233 $(OUTPUT)test-libunwind-debug-frame-arm.bin: 194 $(OUTPUT)test-libunwind-debug-frame-arm.bin: 234 $(BUILD) -lelf -llzma -lunwind-arm !! 195 $(BUILD) -lelf -lunwind-arm 235 196 236 $(OUTPUT)test-libunwind-debug-frame-aarch64.bi 197 $(OUTPUT)test-libunwind-debug-frame-aarch64.bin: 237 $(BUILD) -lelf -llzma -lunwind-aarch64 !! 198 $(BUILD) -lelf -lunwind-aarch64 238 199 239 $(OUTPUT)test-libaudit.bin: 200 $(OUTPUT)test-libaudit.bin: 240 $(BUILD) -laudit 201 $(BUILD) -laudit 241 202 242 $(OUTPUT)test-libslang.bin: 203 $(OUTPUT)test-libslang.bin: 243 $(BUILD) -lslang 204 $(BUILD) -lslang 244 205 245 $(OUTPUT)test-libslang-include-subdir.bin: 206 $(OUTPUT)test-libslang-include-subdir.bin: 246 $(BUILD) -lslang 207 $(BUILD) -lslang 247 208 248 $(OUTPUT)test-libtraceevent.bin: 209 $(OUTPUT)test-libtraceevent.bin: 249 $(BUILD) -ltraceevent 210 $(BUILD) -ltraceevent 250 211 251 $(OUTPUT)test-libtracefs.bin: 212 $(OUTPUT)test-libtracefs.bin: 252 $(BUILD) $(shell $(PKG_CONFIG) --cfla !! 213 $(BUILD) -ltracefs 253 214 254 $(OUTPUT)test-libcrypto.bin: 215 $(OUTPUT)test-libcrypto.bin: 255 $(BUILD) -lcrypto 216 $(BUILD) -lcrypto 256 217 257 $(OUTPUT)test-gtk2.bin: 218 $(OUTPUT)test-gtk2.bin: 258 $(BUILD) $(shell $(PKG_CONFIG) --libs 219 $(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) -Wno-deprecated-declarations 259 220 260 $(OUTPUT)test-gtk2-infobar.bin: 221 $(OUTPUT)test-gtk2-infobar.bin: 261 $(BUILD) $(shell $(PKG_CONFIG) --libs 222 $(BUILD) $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) 262 223 263 grep-libs = $(filter -l%,$(1)) 224 grep-libs = $(filter -l%,$(1)) 264 strip-libs = $(filter-out -l%,$(1)) 225 strip-libs = $(filter-out -l%,$(1)) 265 226 266 PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::E 227 PERL_EMBED_LDOPTS = $(shell perl -MExtUtils::Embed -e ldopts 2>/dev/null) 267 PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_ 228 PERL_EMBED_LDFLAGS = $(call strip-libs,$(PERL_EMBED_LDOPTS)) 268 PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EM 229 PERL_EMBED_LIBADD = $(call grep-libs,$(PERL_EMBED_LDOPTS)) 269 PERL_EMBED_CCOPTS = $(shell perl -MExtUtils::E 230 PERL_EMBED_CCOPTS = $(shell perl -MExtUtils::Embed -e ccopts 2>/dev/null) 270 FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_E 231 FLAGS_PERL_EMBED=$(PERL_EMBED_CCOPTS) $(PERL_EMBED_LDOPTS) 271 232 272 ifeq ($(CC_NO_CLANG), 0) 233 ifeq ($(CC_NO_CLANG), 0) 273 PERL_EMBED_LDOPTS := $(filter-out -specs=%,$ 234 PERL_EMBED_LDOPTS := $(filter-out -specs=%,$(PERL_EMBED_LDOPTS)) 274 PERL_EMBED_CCOPTS := $(filter-out -flto=auto 235 PERL_EMBED_CCOPTS := $(filter-out -flto=auto -ffat-lto-objects, $(PERL_EMBED_CCOPTS)) 275 PERL_EMBED_CCOPTS := $(filter-out -specs=%,$ 236 PERL_EMBED_CCOPTS := $(filter-out -specs=%,$(PERL_EMBED_CCOPTS)) 276 FLAGS_PERL_EMBED += -Wno-compound-token-spli 237 FLAGS_PERL_EMBED += -Wno-compound-token-split-by-macro 277 endif 238 endif 278 239 279 $(OUTPUT)test-libperl.bin: 240 $(OUTPUT)test-libperl.bin: 280 $(BUILD) $(FLAGS_PERL_EMBED) 241 $(BUILD) $(FLAGS_PERL_EMBED) 281 242 282 $(OUTPUT)test-libpython.bin: 243 $(OUTPUT)test-libpython.bin: 283 $(BUILD) $(FLAGS_PYTHON_EMBED) 244 $(BUILD) $(FLAGS_PYTHON_EMBED) 284 245 285 $(OUTPUT)test-libbfd.bin: 246 $(OUTPUT)test-libbfd.bin: 286 $(BUILD_BFD) 247 $(BUILD_BFD) 287 248 288 $(OUTPUT)test-libbfd-buildid.bin: 249 $(OUTPUT)test-libbfd-buildid.bin: 289 $(BUILD_BFD) || $(BUILD_BFD) -liberty 250 $(BUILD_BFD) || $(BUILD_BFD) -liberty || $(BUILD_BFD) -liberty -lz 290 251 291 $(OUTPUT)test-disassembler-four-args.bin: 252 $(OUTPUT)test-disassembler-four-args.bin: 292 $(BUILD_BFD) -lopcodes || $(BUILD_BFD) 253 $(BUILD_BFD) -lopcodes || $(BUILD_BFD) -lopcodes -liberty || \ 293 $(BUILD_BFD) -lopcodes -liberty -lz 254 $(BUILD_BFD) -lopcodes -liberty -lz 294 255 295 $(OUTPUT)test-disassembler-init-styled.bin: 256 $(OUTPUT)test-disassembler-init-styled.bin: 296 $(BUILD_BFD) -lopcodes || $(BUILD_BFD) 257 $(BUILD_BFD) -lopcodes || $(BUILD_BFD) -lopcodes -liberty || \ 297 $(BUILD_BFD) -lopcodes -liberty -lz 258 $(BUILD_BFD) -lopcodes -liberty -lz 298 259 299 $(OUTPUT)test-reallocarray.bin: 260 $(OUTPUT)test-reallocarray.bin: 300 $(BUILD) 261 $(BUILD) 301 262 302 $(OUTPUT)test-libbfd-liberty.bin: 263 $(OUTPUT)test-libbfd-liberty.bin: 303 $(CC) $(CFLAGS) -Wall -Werror -o $@ te 264 $(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty 304 265 305 $(OUTPUT)test-libbfd-liberty-z.bin: 266 $(OUTPUT)test-libbfd-liberty-z.bin: 306 $(CC) $(CFLAGS) -Wall -Werror -o $@ te 267 $(CC) $(CFLAGS) -Wall -Werror -o $@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty -lz 307 268 308 $(OUTPUT)test-cplus-demangle.bin: 269 $(OUTPUT)test-cplus-demangle.bin: 309 $(BUILD) -liberty 270 $(BUILD) -liberty 310 271 311 $(OUTPUT)test-cxa-demangle.bin: << 312 $(BUILDXX) << 313 << 314 $(OUTPUT)test-backtrace.bin: 272 $(OUTPUT)test-backtrace.bin: 315 $(BUILD) 273 $(BUILD) 316 274 317 $(OUTPUT)test-timerfd.bin: 275 $(OUTPUT)test-timerfd.bin: 318 $(BUILD) 276 $(BUILD) 319 277 320 $(OUTPUT)test-libdw-dwarf-unwind.bin: 278 $(OUTPUT)test-libdw-dwarf-unwind.bin: 321 $(BUILD) # -ldw provided by $(FEATURE_ 279 $(BUILD) # -ldw provided by $(FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind) 322 280 323 $(OUTPUT)test-libbabeltrace.bin: 281 $(OUTPUT)test-libbabeltrace.bin: 324 $(BUILD) # -lbabeltrace provided by $( 282 $(BUILD) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace) 325 283 326 $(OUTPUT)test-libcapstone.bin: << 327 $(BUILD) # -lcapstone provided by $(FE << 328 << 329 $(OUTPUT)test-compile-32.bin: 284 $(OUTPUT)test-compile-32.bin: 330 $(CC) -m32 -o $@ test-compile.c 285 $(CC) -m32 -o $@ test-compile.c 331 286 332 $(OUTPUT)test-compile-x32.bin: 287 $(OUTPUT)test-compile-x32.bin: 333 $(CC) -mx32 -o $@ test-compile.c 288 $(CC) -mx32 -o $@ test-compile.c 334 289 335 $(OUTPUT)test-zlib.bin: 290 $(OUTPUT)test-zlib.bin: 336 $(BUILD) -lz 291 $(BUILD) -lz 337 292 338 $(OUTPUT)test-lzma.bin: 293 $(OUTPUT)test-lzma.bin: 339 $(BUILD) -llzma 294 $(BUILD) -llzma 340 295 341 $(OUTPUT)test-get_cpuid.bin: 296 $(OUTPUT)test-get_cpuid.bin: 342 $(BUILD) 297 $(BUILD) 343 298 344 $(OUTPUT)test-bpf.bin: 299 $(OUTPUT)test-bpf.bin: 345 $(BUILD) 300 $(BUILD) 346 301 347 $(OUTPUT)test-libbpf.bin: 302 $(OUTPUT)test-libbpf.bin: 348 $(BUILD) -lbpf 303 $(BUILD) -lbpf 349 304 350 $(OUTPUT)test-libbpf-btf__load_from_kernel_by_ 305 $(OUTPUT)test-libbpf-btf__load_from_kernel_by_id.bin: 351 $(BUILD) -lbpf 306 $(BUILD) -lbpf 352 307 353 $(OUTPUT)test-libbpf-bpf_prog_load.bin: 308 $(OUTPUT)test-libbpf-bpf_prog_load.bin: 354 $(BUILD) -lbpf 309 $(BUILD) -lbpf 355 310 356 $(OUTPUT)test-libbpf-bpf_map_create.bin: 311 $(OUTPUT)test-libbpf-bpf_map_create.bin: 357 $(BUILD) -lbpf 312 $(BUILD) -lbpf 358 313 359 $(OUTPUT)test-libbpf-bpf_object__next_program. 314 $(OUTPUT)test-libbpf-bpf_object__next_program.bin: 360 $(BUILD) -lbpf 315 $(BUILD) -lbpf 361 316 362 $(OUTPUT)test-libbpf-bpf_object__next_map.bin: 317 $(OUTPUT)test-libbpf-bpf_object__next_map.bin: 363 $(BUILD) -lbpf 318 $(BUILD) -lbpf 364 319 365 $(OUTPUT)test-libbpf-bpf_program__set_insns.bi 320 $(OUTPUT)test-libbpf-bpf_program__set_insns.bin: 366 $(BUILD) -lbpf 321 $(BUILD) -lbpf 367 322 368 $(OUTPUT)test-libbpf-btf__raw_data.bin: 323 $(OUTPUT)test-libbpf-btf__raw_data.bin: 369 $(BUILD) -lbpf 324 $(BUILD) -lbpf 370 325 371 $(OUTPUT)test-sdt.bin: 326 $(OUTPUT)test-sdt.bin: 372 $(BUILD) 327 $(BUILD) 373 328 374 $(OUTPUT)test-cxx.bin: 329 $(OUTPUT)test-cxx.bin: 375 $(BUILDXX) -std=gnu++11 330 $(BUILDXX) -std=gnu++11 376 331 377 $(OUTPUT)test-gettid.bin: 332 $(OUTPUT)test-gettid.bin: 378 $(BUILD) 333 $(BUILD) 379 334 380 $(OUTPUT)test-jvmti.bin: 335 $(OUTPUT)test-jvmti.bin: 381 $(BUILD) 336 $(BUILD) 382 337 383 $(OUTPUT)test-jvmti-cmlr.bin: 338 $(OUTPUT)test-jvmti-cmlr.bin: 384 $(BUILD) 339 $(BUILD) 385 340 386 $(OUTPUT)test-llvm.bin: 341 $(OUTPUT)test-llvm.bin: 387 $(BUILDXX) -std=gnu++17 !! 342 $(BUILDXX) -std=gnu++14 \ 388 -I$(shell $(LLVM_CONFIG) --inc 343 -I$(shell $(LLVM_CONFIG) --includedir) \ 389 -L$(shell $(LLVM_CONFIG) --lib 344 -L$(shell $(LLVM_CONFIG) --libdir) \ 390 $(shell $(LLVM_CONFIG) --libs 345 $(shell $(LLVM_CONFIG) --libs Core BPF) \ 391 $(shell $(LLVM_CONFIG) --syste 346 $(shell $(LLVM_CONFIG) --system-libs) \ 392 > $(@:.bin=.make.output) 2>&1 347 > $(@:.bin=.make.output) 2>&1 393 348 394 $(OUTPUT)test-llvm-perf.bin: !! 349 $(OUTPUT)test-llvm-version.bin: 395 $(BUILDXX) -std=gnu++17 !! 350 $(BUILDXX) -std=gnu++14 \ 396 -I$(shell $(LLVM_CONFIG) --inc !! 351 -I$(shell $(LLVM_CONFIG) --includedir) \ 397 -L$(shell $(LLVM_CONFIG) --lib << 398 $(shell $(LLVM_CONFIG) --libs << 399 $(shell $(LLVM_CONFIG) --syste << 400 > $(@:.bin=.make.output) 2>&1 352 > $(@:.bin=.make.output) 2>&1 401 353 402 $(OUTPUT)test-clang.bin: 354 $(OUTPUT)test-clang.bin: 403 $(BUILDXX) -std=gnu++17 !! 355 $(BUILDXX) -std=gnu++14 \ 404 -I$(shell $(LLVM_CONFIG) --inc 356 -I$(shell $(LLVM_CONFIG) --includedir) \ 405 -L$(shell $(LLVM_CONFIG) --lib 357 -L$(shell $(LLVM_CONFIG) --libdir) \ 406 -Wl,--start-group -lclang-cpp !! 358 -Wl,--start-group -lclangBasic -lclangDriver \ >> 359 -lclangFrontend -lclangEdit -lclangLex \ >> 360 -lclangAST -Wl,--end-group \ 407 $(shell $(LLVM_CONFIG) --libs 361 $(shell $(LLVM_CONFIG) --libs Core option) \ 408 $(shell $(LLVM_CONFIG) --syste 362 $(shell $(LLVM_CONFIG) --system-libs) \ 409 > $(@:.bin=.make.output) 2>&1 363 > $(@:.bin=.make.output) 2>&1 410 364 411 -include $(OUTPUT)*.d 365 -include $(OUTPUT)*.d 412 366 413 $(OUTPUT)test-libaio.bin: 367 $(OUTPUT)test-libaio.bin: 414 $(BUILD) -lrt 368 $(BUILD) -lrt 415 369 416 $(OUTPUT)test-libzstd.bin: 370 $(OUTPUT)test-libzstd.bin: 417 $(BUILD) -lzstd 371 $(BUILD) -lzstd 418 372 419 $(OUTPUT)test-clang-bpf-co-re.bin: 373 $(OUTPUT)test-clang-bpf-co-re.bin: 420 $(CLANG) -S -g --target=bpf -o - $(pat !! 374 $(CLANG) -S -g -target bpf -o - $(patsubst %.bin,%.c,$(@F)) | \ 421 grep BTF_KIND_VAR 375 grep BTF_KIND_VAR 422 376 423 $(OUTPUT)test-file-handle.bin: 377 $(OUTPUT)test-file-handle.bin: 424 $(BUILD) 378 $(BUILD) 425 379 426 $(OUTPUT)test-libpfm4.bin: 380 $(OUTPUT)test-libpfm4.bin: 427 $(BUILD) -lpfm 381 $(BUILD) -lpfm 428 382 429 ############################### 383 ############################### 430 384 431 clean: 385 clean: 432 rm -f $(FILES) $(OUTPUT)*.d $(FILES:.b 386 rm -f $(FILES) $(OUTPUT)*.d $(FILES:.bin=.make.output)
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.