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