Debian Codegraph @

sysdeps/unix/sysv/linux/Makefile

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1 # Option to pass to Python scripts to set the C compiler. Rewriting
2 # MODULE_NAME is required to enable the _ISOMAC verbatim header
3 # environment.
4 sysdeps-linux-python-cc = \
5 --cc="$(CC) $(patsubst -DMODULE_NAME=%,-DMODULE_NAME=testsuite,$(CPPFLAGS))"
6
7 # Additional dependencies for Python scripts.
8 sysdeps-linux-python-deps = \
9 $(..)scripts/glibcextract.py \
10 $(..)sysdeps/unix/sysv/linux/glibcsyscalls.py \
11 # sysdeps-linux-python-deps
12
13 # Invocation of the Python interpreter with the Python search path.
14 sysdeps-linux-python = \
15 PYTHONPATH=$(..)scripts:$(..)sysdeps/unix/sysv/linux $(PYTHON)
16
17 ifndef subdir
18 # This target performs two actions:
19 #
20 # Replace <arch-syscall.h> with a file generated from kernel headers
21 # and <fixup-asm-unistd.h>. Both files are located via the sysdeps
22 # override search path.
23 #
24 # Update sysdeps/unix/sysv/linux/syscall-names.list with additional
25 # names found in the generated <arch-syscall.h> file, so that the
26 # global system call names list is a superset of the
27 # architecture-specific system call names.
28 #
29 # To bootstrap a new architecture, create an empty file in the right
30 # place and run `make update-syscall-lists' from the top-level of a
31 # configured, but not-yet-built glibc tree.
32 #
33 # --lock points to a file not replaced during the update operation, so
34 # that mutual exclusion is achieved.
35 .PHONY: update-syscall-lists
36 update-syscall-lists: arch-syscall.h
37 $(sysdeps-linux-python) \
38 sysdeps/unix/sysv/linux/update-syscall-lists.py \
39 $(sysdeps-linux-python-cc) \
40 --lock=sysdeps/unix/sysv/linux/update-syscall-lists.py $< \
41 sysdeps/unix/sysv/linux/syscall-names.list
42 endif
43
44 ifeq ($(subdir),csu)
45 sysdep_routines += \
46 errno-loc \
47 # sysdep_routines
48 endif
49
50 ifeq ($(subdir),assert)
51 CFLAGS-assert.c += -DFATAL_PREPARE_INCLUDE='<fatal-prepare.h>'
52 CFLAGS-assert-perr.c += -DFATAL_PREPARE_INCLUDE='<fatal-prepare.h>'
53 endif
54
55 ifeq ($(subdir),malloc)
56 CFLAGS-malloc.c += -DMORECORE_CLEARS=2
57 endif
58
59 ifeq ($(subdir),misc)
60 sysdep_routines += \
61 adjtimex \
62 clock_adjtime \
63 clone \
64 clone-internal \
65 clone-pidfd-support \
66 clone3 \
67 closefrom_fallback \
68 convert_scm_timestamps \
69 epoll_create \
70 epoll_pwait \
71 epoll_pwait2 \
72 epoll_wait \
73 eventfd \
74 eventfd_read \
75 eventfd_write \
76 fanotify_mark \
77 fxstat \
78 fxstat64 \
79 fxstatat \
80 fxstatat64 \
81 inotify_init \
82 lxstat \
83 lxstat64 \
84 mlock2 \
85 mremap \
86 open_by_handle_at \
87 personality \
88 pkey_get \
89 pkey_mprotect \
90 pkey_set \
91 prctl \
92 prlimit \
93 prlimit64 \
94 process_vm_readv \
95 process_vm_writev \
96 pselect32 \
97 readahead \
98 sched_getattr \
99 sched_setattr \
100 setfsgid \
101 setfsuid \
102 setvmaname \
103 signalfd \
104 splice \
105 sysctl \
106 tee \
107 timerfd_gettime \
108 timerfd_settime \
109 umount \
110 umount2 \
111 vmsplice \
112 xmknod \
113 xmknodat \
114 xstat \
115 xstat64 \
116 # sysdep_routines
117
118 CFLAGS-gethostid.c = -fexceptions
119 CFLAGS-tee.c = -fexceptions -fasynchronous-unwind-tables
120 CFLAGS-vmsplice.c = -fexceptions -fasynchronous-unwind-tables
121 CFLAGS-splice.c = -fexceptions -fasynchronous-unwind-tables
122 CFLAGS-open_by_handle_at.c = -fexceptions -fasynchronous-unwind-tables
123 CFLAGS-sync_file_range.c = -fexceptions -fasynchronous-unwind-tables
124 CFLAGS-pselect32.c = -fexceptions -fasynchronous-unwind-tables
125 CFLAGS-tst-writev.c += "-DARTIFICIAL_LIMIT=(0x80000000-sysconf(_SC_PAGESIZE))"
126
127 # The test triggers FORTIFY abortion due to purposely wrong parameters
128 CFLAGS-test-errno-linux.c += $(no-fortify-source)
129
130 sysdep_headers += \
131 bits/a.out.h \
•132 bits/cloexec.h \
133 bits/epoll.h \
134 bits/eventfd.h \
135 bits/inotify.h \
136 bits/mman-linux.h \
137 bits/mman-map-flags-generic.h \
138 bits/mman-shared.h \
139 bits/openat2.h \
140 bits/procfs-extra.h \
141 bits/procfs-id.h \
142 bits/procfs-prregset.h \
143 bits/procfs.h \
144 bits/pthread_stack_min-dynamic.h \
145 bits/pthread_stack_min.h \
146 bits/ptrace-shared.h \
147 bits/rseq.h \
148 bits/shmlba.h \
149 bits/siginfo-arch.h \
150 bits/siginfo-consts-arch.h \
151 bits/signalfd.h \
152 bits/socket_type.h \
153 bits/struct_stat.h \
154 bits/struct_stat_time64_helper.h \
155 bits/syscall.h \
156 bits/timerfd.h \
157 bits/types/struct_msqid64_ds.h \
158 bits/types/struct_msqid64_ds_helper.h \
159 bits/types/struct_semid64_ds.h \
160 bits/types/struct_semid64_ds_helper.h \
161 bits/types/struct_semid_ds.h \
162 bits/types/struct_shmid64_ds.h \
163 bits/types/struct_shmid64_ds_helper.h \
164 scsi/scsi.h \
165 scsi/scsi_ioctl.h \
166 scsi/sg.h \
167 sys/acct.h \
168 sys/epoll.h \
169 sys/eventfd.h \
170 sys/fanotify.h \
171 sys/fsuid.h \
172 sys/inotify.h \
173 sys/kd.h \
174 sys/klog.h \
175 sys/mount.h \
176 sys/pci.h \
177 sys/personality.h \
178 sys/pidfd.h \
179 sys/prctl.h \
180 sys/quota.h \
181 sys/raw.h \
182 sys/rseq.h \
183 sys/signalfd.h \
184 sys/soundcard.h \
185 sys/timerfd.h \
186 sys/user.h \
187 sys/vt.h \
188 # sysdep_headers
189
190 tests += \
191 test-errno-linux \
192 tst-adjtimex \
193 tst-clock_adjtime \
194 tst-clone \
195 tst-clone2 \
196 tst-clone3 \
197 tst-copy_file_range-large \
198 tst-epoll \
199 tst-epoll-ioctls \
200 tst-fanotify \
201 tst-fdopendir-o_path \
202 tst-getauxval \
203 tst-gettid \
204 tst-gettid-kill \
205 tst-linux-mremap1 \
206 tst-memfd_create \
207 tst-misalign-clone \
208 tst-mlock2 \
209 tst-mount \
210 tst-mseal \
211 tst-mseal-pkey \
212 tst-ntp_adjtime \
213 tst-ntp_gettime \
214 tst-ntp_gettimex \
215 tst-ofdlocks \
216 tst-personality \
217 tst-pidfd \
218 tst-pidfd_getinfo \
219 tst-pidfd_getpid \
220 tst-pkey \
221 tst-ppoll \
222 tst-prctl \
223 tst-process_mrelease \
224 tst-quota \
225 tst-rlimit-infinity \
226 tst-sched-affinity-inheritance \
227 tst-sched_setattr \
228 tst-sched_setattr-thread \
229 tst-scm_rights \
230 tst-sigtimedwait \
231 tst-sync_file_range \
232 tst-syscall-restart \
233 tst-sysconf-iov_max \
234 tst-sysvmsg-linux \
235 tst-sysvsem-linux \
236 tst-sysvshm-linux \
237 tst-tgkill \
238 tst-timerfd \
239 tst-ttyname-direct \
240 tst-ttyname-namespace \
241 # tests
242
243 # process_madvise requires CAP_SYS_ADMIN.
244 xtests += \
245 tst-process_madvise \
246 # xtests
247
248 # For +depfiles in Makerules.
249 extra-test-objs += \
250 tst-sysconf-iov_max-uapi.o \
251 # extra-test-objs
252
253 # Test for the symbol version of fcntl that was replaced in glibc 2.28.
254 ifeq ($(have-GLIBC_2.27)$(build-shared),yesyes)
255 tests += \
256 tst-ofdlocks-compat \
257 # tests
258 endif
259
260 tests-internal += \
261 tst-rseq \
262 tst-sigcontext-get_pc \
263 # tests-internal
264
265 tests-internal += \
266 tst-rseq-disable \
267 # tests-internal
268
269 tests-static += \
270 tst-rseq-disable-static \
271 tst-rseq-static \
272 # tests-static
273
274 tests-time64 += \
275 tst-adjtimex-time64 \
276 tst-clock_adjtime-time64 \
277 tst-epoll-time64 \
278 tst-ntp_adjtime-time64 \
279 tst-ntp_gettime-time64 \
280 tst-ntp_gettimex-time64 \
281 tst-ppoll-time64 \
282 tst-prctl-time64 \
283 tst-scm_rights-time64 \
284 tst-sigtimedwait-time64 \
285 tst-timerfd-time64 \
286 # tests-time64
287
288 tests-clone-internal = \
289 tst-align-clone-internal \
290 tst-clone2-internal \
291 tst-clone3-internal \
292 tst-getpid1-internal
293 # tests-clone-internal
294 tests-internal += \
295 $(tests-clone-internal) \
296 # tests-internal
297 tests-static += \
298 $(tests-clone-internal) \
299 # tests-static
300
301 CFLAGS-tst-sigcontext-get_pc.c = -fasynchronous-unwind-tables
302
303 # Generate the list of SYS_* macros for the system calls (__NR_*
304 # macros). The file syscall-names.list contains all possible system
305 # call names, and the generated header file produces SYS_* macros for
306 # the __NR_* macros which are actually defined.
307
308 generated += bits/syscall.h
309 $(objpfx)bits/syscall.h: \
310 ../sysdeps/unix/sysv/linux/gen-syscall-h.awk \
311 ../sysdeps/unix/sysv/linux/syscall-names.list
312 $(make-target-directory)
313 LC_ALL=C $(AWK) -f $^ > $@-tmp
314 $(move-if-change) $@-tmp $@
315 before-compile += $(objpfx)bits/syscall.h
316
317 # All macros defined by <sys/syscall.h>. Include <bits/syscall.h>
318 # explicitly because <sys/syscall.h> skips it if _LIBC is defined.
319 $(objpfx)tst-syscall-list-macros.list: \
320 $(objpfx)bits/syscall.h ../sysdeps/unix/sysv/linux/sys/syscall.h
321 printf '#include <linux/version.h>\n\
322 #include <sys/syscall.h>\n#include <bits/syscall.h>\n' | \
323 $(CC) -E -o $@-tmp $(CFLAGS) $(CPPFLAGS) -x c - -dM
324 $(move-if-change) $@-tmp $@
325
326 # __NR_* system call names. Used by the test below.
327 $(objpfx)tst-syscall-list-nr.list: \
328 ../sysdeps/unix/sysv/linux/filter-nr-syscalls.awk \
329 $(objpfx)tst-syscall-list-macros.list
330 LC_ALL=C $(AWK) -f $^ > $@-tmp
331 $(move-if-change) $@-tmp $@
332
333 # SYS_* system call names. Used by the test below.
334 $(objpfx)tst-syscall-list-sys.list: $(objpfx)tst-syscall-list-macros.list
335 LC_ALL=C $(AWK) '/^#define SYS_/ { print substr($$2, 5) }' $< > $@-tmp
336 $(move-if-change) $@-tmp $@
337
338 tests-special += \
339 $(objpfx)tst-syscall-list.out
340 # tests-special
341 $(objpfx)tst-syscall-list.out: \
342 ../sysdeps/unix/sysv/linux/tst-syscall-list.sh \
343 $(objpfx)tst-syscall-list-macros.list \
344 $(objpfx)tst-syscall-list-nr.list \
345 $(objpfx)tst-syscall-list-sys.list
346 $(BASH) $^ $(AWK) > $@; $(evaluate-test)
347
348 tests-special += \
349 $(objpfx)tst-glibcsyscalls.out
350 # tests-special
351 # arch-syscall.h is located via the sysdeps override search path.
352 $(objpfx)tst-glibcsyscalls.out: arch-syscall.h \
353 ../sysdeps/unix/sysv/linux/syscall-names.list
354 $(sysdeps-linux-python) \
355 ../sysdeps/unix/sysv/linux/tst-glibcsyscalls.py \
356 $(sysdeps-linux-python-cc) $< \
357 ../sysdeps/unix/sysv/linux/syscall-names.list \
358 < /dev/null > $@ 2>&1; $(evaluate-test)
359 $(objpfx)tst-glibcsyscalls.out: \
360 ../sysdeps/unix/sysv/linux/tst-glibcsyscalls.py \
361 $(sysdeps-linux-python-deps)
362
363 # Separate object file for access to the constant from the UAPI header.
364 $(objpfx)tst-sysconf-iov_max: $(objpfx)tst-sysconf-iov_max-uapi.o
365
366 tests-special += \
367 $(objpfx)tst-mman-consts.out \
368 # tests-special
369 $(objpfx)tst-mman-consts.out: ../sysdeps/unix/sysv/linux/tst-mman-consts.py
370 $(sysdeps-linux-python) \
371 ../sysdeps/unix/sysv/linux/tst-mman-consts.py \
372 $(sysdeps-linux-python-cc) \
373 < /dev/null > $@ 2>&1; $(evaluate-test)
374 $(objpfx)tst-mman-consts.out: $(sysdeps-linux-python-deps)
375
376 tests-special += \
377 $(objpfx)tst-pidfd-consts.out \
378 # tests-special
379 $(objpfx)tst-pidfd-consts.out: ../sysdeps/unix/sysv/linux/tst-pidfd-consts.py
380 $(sysdeps-linux-python) \
381 ../sysdeps/unix/sysv/linux/tst-pidfd-consts.py \
382 $(sysdeps-linux-python-cc) \
383 < /dev/null > $@ 2>&1; $(evaluate-test)
384 $(objpfx)tst-pidfd-consts.out: $(sysdeps-linux-python-deps)
385
386 tests-special += \
387 $(objpfx)tst-mount-consts.out \
388 # tests-special
389 $(objpfx)tst-mount-consts.out: ../sysdeps/unix/sysv/linux/tst-mount-consts.py
390 $(sysdeps-linux-python) \
391 ../sysdeps/unix/sysv/linux/tst-mount-consts.py \
392 $(sysdeps-linux-python-cc) \
393 < /dev/null > $@ 2>&1; $(evaluate-test)
394 $(objpfx)tst-mount-consts.out: $(sysdeps-linux-python-deps)
395
396 tests-special += \
397 $(objpfx)tst-mount-compile.out \
398 # tests-special
399 $(objpfx)tst-mount-compile.out: ../sysdeps/unix/sysv/linux/tst-mount-compile.py
400 $(sysdeps-linux-python) \
401 ../sysdeps/unix/sysv/linux/tst-mount-compile.py \
402 $(sysdeps-linux-python-cc) \
403 < /dev/null > $@ 2>&1; $(evaluate-test)
404 $(objpfx)tst-mount-compile.out: $(sysdeps-linux-python-deps)
405
406 tests-special += \
407 $(objpfx)tst-sched-consts.out \
408 # tests-special
409 $(objpfx)tst-sched-consts.out: ../sysdeps/unix/sysv/linux/tst-sched-consts.py
410 $(sysdeps-linux-python) \
411 ../sysdeps/unix/sysv/linux/tst-sched-consts.py \
412 $(sysdeps-linux-python-cc) \
413 < /dev/null > $@ 2>&1; $(evaluate-test)
414 $(objpfx)tst-sched-consts.out: $(sysdeps-linux-python-deps)
415
416 tst-rseq-disable-ENV = GLIBC_TUNABLES=glibc.pthread.rseq=0
417 tst-rseq-disable-static-ENV = GLIBC_TUNABLES=glibc.pthread.rseq=0
418
419 endif # $(subdir) == misc
420
421 ifeq ($(subdir),termios)
422 sysdep_headers += \
423 bits/termios-c_cc.h \
424 bits/termios-c_cflag.h \
425 bits/termios-c_iflag.h \
426 bits/termios-c_lflag.h \
427 bits/termios-c_oflag.h \
428 bits/termios-cbaud.h \
429 bits/termios-misc.h \
430 bits/termios-struct.h \
431 bits/termios-tcflow.h \
432 # sysdep_headers
433
434 tests += \
435 tst-termios-linux \
436 # tests
437 endif
438
439 ifeq ($(subdir),time)
440 sysdep_headers += \
441 bits/timex.h \
442 sys/timex.h \
443 # sysdep_headers
444
445 sysdep_routines += \
446 ntp_gettime \
447 ntp_gettimex \
448 # sysdep_routines
449
450 tests += \
451 tst-clock_gettime-clobber \
452 tst-gettimeofday-clobber \
453 tst-time-clobber \
454 # tests
455 endif
456
457 ifeq ($(subdir),signal)
458 tests-special += \
459 $(objpfx)tst-signal-numbers.out \
460 # tests-special
461
462 # Depending on signal.o* is a hack. What we actually want is a dependency
463 # on signal.h and everything it includes. That's impractical to write
464 # in this context, but signal.c includes signal.h and not much else so it'll
465 # be conservatively correct.
466 $(objpfx)tst-signal-numbers.out: \
467 ../sysdeps/unix/sysv/linux/tst-signal-numbers.py \
468 $(objpfx)signal.o*
469 $(sysdeps-linux-python) \
470 ../sysdeps/unix/sysv/linux/tst-signal-numbers.py \
471 $(sysdeps-linux-python-cc) \
472 < /dev/null > $@ 2>&1; $(evaluate-test)
473 $(objpfx)tst-signal-numbers.out: $(sysdeps-linux-python-deps)
474 endif
475
476 ifeq ($(subdir),socket)
477 sysdep_headers += \
478 bits/socket-constants.h \
479 net/ethernet.h \
480 net/if_arp.h \
481 net/if_packet.h \
482 net/if_ppp.h \
483 net/if_shaper.h \
484 net/if_slip.h \
485 net/ppp-comp.h \
486 net/ppp_defs.h \
487 net/route.h \
488 # sysdep_headers
489
490 sysdep_routines += \
491 cmsg_nxthdr \
492 # sysdep_routines
493
494 CFLAGS-recvmmsg.c = -fexceptions -fasynchronous-unwind-tables
495 CFLAGS-sendmmsg.c = -fexceptions -fasynchronous-unwind-tables
496
497 tests += \
498 tst-socket-timestamp \
499 tst-socket-timestamp-compat \
500 # tests
501 tests-time64 += \
502 tst-socket-timestamp-compat-time64 \
503 tst-socket-timestamp-time64 \
504 # tests-time64
505
506 tests-special += \
507 $(objpfx)tst-socket-consts.out \
508 # tests-special
509 $(objpfx)tst-socket-consts.out: ../sysdeps/unix/sysv/linux/tst-socket-consts.py
510 PYTHONPATH=../scripts \
511 $(PYTHON) ../sysdeps/unix/sysv/linux/tst-socket-consts.py \
512 --cc="$(CC) $(patsubst -DMODULE_NAME=%, \
513 -DMODULE_NAME=testsuite, \
514 $(CPPFLAGS)) -D_ISOMAC" \
515 < /dev/null > $@ 2>&1; $(evaluate-test)
516 endif # $(subdir) == socket
517
518 ifeq ($(subdir),sunrpc)
519 sysdep_headers += \
520 nfs/nfs.h \
521 # sysdep_headers
522 endif
523
524 ifeq ($(subdir),posix)
525 sysdep_headers += \
526 bits/initspin.h \
527 # sysdep_headers
528
529 sysdep_routines += \
530 getcpu \
531 oldglob \
532 pidfd_getpid \
533 pidfd_spawn \
534 pidfd_spawnp \
535 procutils \
536 sched_getcpu \
537 spawnattr_getcgroup_np \
538 spawnattr_setcgroup_np \
539 # sysdep_routines
540
541 tests += \
542 tst-affinity \
543 tst-affinity-pid \
544 tst-posix_spawn-setsid-pidfd \
545 tst-spawn-cgroup \
546 tst-spawn-chdir-pidfd \
547 tst-spawn-pidfd \
548 tst-spawn2-pidfd \
549 tst-spawn3-pidfd \
550 tst-spawn4-pidfd \
551 tst-spawn5-pidfd \
552 tst-spawn6-pidfd \
553 tst-spawn7-pidfd \
554 # tests
555
556 tests-static += \
557 tst-affinity-static \
558 # tests-static
559
560 tests += \
561 $(tests-static) \
562 # tests
563
564 CFLAGS-fork.c = $(libio-mtsafe)
565 CFLAGS-getpid.o = -fomit-frame-pointer
566 CFLAGS-getpid.os = -fomit-frame-pointer
567 CFLAGS-tst-spawn3-pidfd.c += -DOBJPFX=\"$(objpfx)\"
568
569 tst-spawn-cgroup-ARGS = -- $(host-test-program-cmd)
570 tst-spawn-pidfd-ARGS = -- $(host-test-program-cmd)
571 tst-spawn5-pidfd-ARGS = -- $(host-test-program-cmd)
572 tst-spawn6-pidfd-ARGS = -- $(host-test-program-cmd)
573 tst-spawn7-pidfd-ARGS = -- $(host-test-program-cmd)
574 tst-posix_spawn-setsid-pidfd-ARGS = -- $(host-test-program-cmd)
575 endif
576
577 ifeq ($(subdir),inet)
578 sysdep_headers += \
579 netash/ash.h \
580 netatalk/at.h \
581 netax25/ax25.h \
582 neteconet/ec.h \
583 netinet/if_fddi.h \
584 netinet/if_tr.h \
585 netipx/ipx.h \
586 netiucv/iucv.h \
587 netpacket/packet.h \
588 netrom/netrom.h \
589 netrose/rose.h \
590 # sysdep_headers
591
592 sysdep_routines += \
593 netlink_assert_response \
594 # sysdep_routines
595
596 CFLAGS-check_pf.c += -fexceptions
597 endif
598
599 # Don't compile the ctype glue code, since there is no old non-GNU C library.
600 inhibit-glue = yes
601
602 ifeq ($(subdir),dirent)
603 sysdep_routines += \
604 getdirentries \
605 getdirentries64 \
606 # sysdep_routines
607
608 tests += \
609 tst-getdents64 \
610 tst-readdir64-compat \
611 # tests
612 endif # $(subdir) == dirent
613
614 ifeq ($(subdir),nis)
615 CFLAGS-ypclnt.c = -DUSE_BINDINGDIR=1
616 endif
617
618 ifeq ($(subdir),io)
619 sysdep_routines += \
620 close_nocancel \
621 close_nocancel_nostatus \
622 fallocate \
623 fallocate64 \
624 fcntl_nocancel \
625 internal_statvfs \
626 open64_nocancel \
627 open_nocancel \
628 openat2 \
629 openat64_nocancel \
630 openat_nocancel \
631 pread64_nocancel \
632 read_nocancel \
633 stat_t64_cp \
634 statx_cp \
635 sync_file_range \
636 write_nocancel \
637 xstatconv \
638 # sysdep_routines
639
640 routines_no_fortify += \
641 openat2 \
642 # routines_no_fortify
643
644 sysdep_headers += \
645 bits/fcntl-linux-fortify.h \
646 bits/fcntl-linux.h \
647 # sysdep_headers
648
649 tests += \
650 tst-fallocate \
651 tst-fallocate64 \
652 tst-getcwd-smallbuff \
653 tst-o_path-locks \
654 tst-openat2 \
655 tst-openat2-lfs \
656 # tests
657
658 tests-special += \
659 $(objpfx)tst-openat2-consts.out \
660 # tests-special
661 $(objpfx)tst-openat2-consts.out: ../sysdeps/unix/sysv/linux/tst-openat2-consts.py
662 $(sysdeps-linux-python) \
663 ../sysdeps/unix/sysv/linux/tst-openat2-consts.py \
664 $(sysdeps-linux-python-cc) \
665 < /dev/null > $@ 2>&1; $(evaluate-test)
666 $(objpfx)tst-openat2-consts.out: $(sysdeps-linux-python-deps)
667
668 # openat2 only provides LFS support, the tests check if the interface is correctly
669 # provided regardless of the flags.
670 CFLAGS-tst-openat2-lfs.c += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
671
672 endif
673
674 ifeq ($(subdir),elf)
675 dl-routines += \
676 dl-rseq-symbols \
677 # dl-routines
678
679 sysdep-rtld-routines += \
680 dl-brk \
681 dl-getcwd \
682 dl-openat64 \
683 dl-opendir \
684 dl-sbrk \
685 # sysdep-rtld-routines
686
687 others += \
688 pldd \
689 # others
690
691 install-bin += \
692 pldd \
693 # install-bin
694
695 $(objpfx)pldd: $(objpfx)xmalloc.o
696
697 tests += tst-rseq-tls-range tst-rseq-tls-range-4096
698 tests-static += tst-rseq-tls-range-static tst-rseq-tls-range-4096-static
699 modules-names += tst-rseq-tls-range-mod
700 CFLAGS-tst-rseq-tls-range.c += -DMAIN_TLS_ALIGN=4
701 CFLAGS-tst-rseq-tls-range-4096.c += -DMAIN_TLS_ALIGN=4096
702 CFLAGS-tst-rseq-tls-range-static.c += -DMAIN_TLS_ALIGN=4
703 CFLAGS-tst-rseq-tls-range-4096-static.c += -DMAIN_TLS_ALIGN=4096
704 $(objpfx)tst-rseq-tls-range.out: $(objpfx)tst-rseq-tls-range-mod.so
705 $(objpfx)tst-rseq-tls-range-4096.out: $(objpfx)tst-rseq-tls-range-mod.so
706 $(objpfx)tst-rseq-tls-range-static.out: $(objpfx)tst-rseq-tls-range-mod.so
707 $(objpfx)tst-rseq-tls-range-4096-static.out: $(objpfx)tst-rseq-tls-range-mod.so
708 tst-rseq-tls-range-static-ENV = LD_LIBRARY_PATH=$(objpfx):$(common-objpfx)
709 tst-rseq-tls-range-4096-static-ENV = LD_LIBRARY_PATH=$(objpfx):$(common-objpfx)
710
711 test-internal-extras += tst-nolink-libc
712 ifeq ($(run-built-tests),yes)
713 tests-special += \
714 $(objpfx)tst-nolink-libc-1.out \
715 $(objpfx)tst-nolink-libc-2.out \
716 # tests-special
717 endif
718 endif # $(subdir) == elf
719
720 ifeq ($(subdir),rt)
721 CFLAGS-mq_send.c += -fexceptions
722 CFLAGS-mq_receive.c += -fexceptions
723 endif
724
725 ifeq ($(subdir),nscd)
726 sysdep-CFLAGS += -DHAVE_EPOLL -DHAVE_INOTIFY -DHAVE_NETLINK
727 CFLAGS-gai.c += -DNEED_NETLINK
728 endif
729
730 ifeq ($(subdir),nptl)
731 tests += \
732 tst-align-clone \
733 tst-getpid1 \
734 tst-sem_getvalue-affinity \
735 # tests
736
737 # tst-rseq-nptl is an internal test because it requires a definition of
738 # __NR_rseq from the internal system call list.
739 tests-internal += \
740 tst-rseq-nptl \
741 # tests-internal
742
743 tests-static += \
744 tst-rseq-nptl-static \
745 # tests-static
746 endif
747
748 ifeq ($(subdir),string)
749 modules-names += \
750 tst-xsi-strerror_r-mod \
751 # modules-names
752
753 tests += \
754 tst-sigabbrev_np-strings \
755 tst-strerror-strings \
756 tst-strerror_l-strings \
757 tst-strerror_r-strings \
758 tst-strerrordesc_np-strings \
759 tst-strsignal-strings \
760 tst-xsi-strerror_r-strings \
761 # tests
762
763 $(objpfx)tst-xsi-strerror_r-strings: $(objpfx)tst-xsi-strerror_r-mod.so
764 endif # $(subdir) == string