Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

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