Debian Codegraph @

sysdeps/unix/sysv/linux/Makefile

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