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