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