~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/build/feature/Makefile

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /tools/build/feature/Makefile (Architecture mips) and /tools/build/feature/Makefile (Architecture i386)


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

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php