2 sysdep_routines
+= errno-loc
5 ifeq ($(subdir
),assert
)
6 CFLAGS-assert.c
+= -DFATAL_PREPARE_INCLUDE
='<fatal-prepare.h>'
7 CFLAGS-assert-perr.c
+= -DFATAL_PREPARE_INCLUDE
='<fatal-prepare.h>'
10 ifeq ($(subdir
),malloc
)
11 CFLAGS-malloc.c
+= -DMORECORE_CLEARS
=2
15 include $(firstword $(wildcard $(sysdirs
:=/sysctl.mk
)))
17 sysdep_routines
+= clone umount umount2 readahead \
18 setfsuid setfsgid epoll_pwait signalfd \
19 eventfd eventfd_read eventfd_write prlimit \
20 personality epoll_wait tee vmsplice splice \
21 open_by_handle_at mlock2 pkey_mprotect pkey_set pkey_get
23 CFLAGS-gethostid.c
= -fexceptions
24 CFLAGS-tee.c
= -fexceptions
-fasynchronous-unwind-tables
25 CFLAGS-vmsplice.c
= -fexceptions
-fasynchronous-unwind-tables
26 CFLAGS-splice.c
= -fexceptions
-fasynchronous-unwind-tables
27 CFLAGS-open_by_handle_at.c
= -fexceptions
-fasynchronous-unwind-tables
28 CFLAGS-sync_file_range.c
= -fexceptions
-fasynchronous-unwind-tables
29 CFLAGS-tst-writev.c
+= "-DARTIFICIAL_LIMIT=(0x80000000-sysconf(_SC_PAGESIZE))"
31 sysdep_headers
+= sys
/mount.h sys
/acct.h sys
/sysctl.h \
33 sys
/user.h sys
/prctl.h \
34 sys
/kd.h sys
/soundcard.h sys
/vt.h \
35 sys
/quota.h sys
/fsuid.h \
36 scsi
/sg.h scsi
/scsi.h scsi
/scsi_ioctl.h sys
/pci.h \
37 sys
/raw.h sys
/personality.h sys
/epoll.h \
38 bits
/a.out.h sys
/inotify.h sys
/signalfd.h sys
/eventfd.h \
39 sys
/timerfd.h sys
/fanotify.h bits
/eventfd.h bits
/inotify.h \
40 bits
/signalfd.h bits
/timerfd.h bits
/epoll.h \
41 bits
/socket_type.h bits
/syscall.h bits
/sysctl.h \
42 bits
/mman-linux.h bits
/mman-shared.h bits
/ptrace-shared.h \
43 bits
/siginfo-arch.h bits
/siginfo-consts-arch.h \
44 bits
/procfs.h bits
/procfs-id.h bits
/procfs-extra.h \
45 bits
/procfs-prregset.h bits
/mman-map-flags-generic.h \
46 bits
/msq-pad.h bits
/sem-pad.h bits
/shmlba.h bits
/shm-pad.h \
47 bits
/termios-struct.h bits
/termios-c_cc.h \
48 bits
/termios-c_iflag.h bits
/termios-c_oflag.h \
49 bits
/termios-baud.h bits
/termios-c_cflag.h \
50 bits
/termios-c_lflag.h bits
/termios-tcflow.h \
53 tests
+= tst-clone tst-clone2 tst-clone3 tst-fanotify tst-personality \
54 tst-quota tst-sync_file_range tst-sysconf-iov_max tst-ttyname \
55 test-errno-linux tst-memfd_create tst-mlock2 tst-pkey \
56 tst-rlimit-infinity tst-ofdlocks tst-gettid tst-gettid-kill \
58 tests-internal
+= tst-ofdlocks-compat tst-sigcontext-get_pc
60 CFLAGS-tst-sigcontext-get_pc.c
= -fasynchronous-unwind-tables
62 # Generate the list of SYS_* macros for the system calls (__NR_*
63 # macros). The file syscall-names.list contains all possible system
64 # call names, and the generated header file produces SYS_* macros for
65 # the __NR_* macros which are actually defined.
67 generated
+= bits
/syscall.h
68 $(objpfx
)bits
/syscall.h
: \
69 ..
/sysdeps
/unix
/sysv
/linux
/gen-syscall-h.awk \
70 ..
/sysdeps
/unix
/sysv
/linux
/syscall-names.list
71 $(make-target-directory
)
72 LC_ALL
=C
$(AWK
) -f
$^
> $@
-tmp
73 $(move-if-change
) $@
-tmp
$@
74 before-compile
+= $(objpfx
)bits
/syscall.h
76 # All macros defined by <sys/syscall.h>. Include <bits/syscall.h>
77 # explicitly because <sys/sycall.h> skips it if _LIBC is defined.
78 $(objpfx
)tst-syscall-list-macros.list
: \
79 $(objpfx
)bits
/syscall.h ..
/sysdeps
/unix
/sysv
/linux
/sys
/syscall.h
80 printf
'#include <linux/version.h>\n\
81 #include <sys/syscall.h>\n#include <bits/syscall.h>\n' | \
82 $(CC
) -E
-o
$@
-tmp
$(CFLAGS
) $(CPPFLAGS
) -x c
- -dM
83 $(move-if-change
) $@
-tmp
$@
85 # __NR_* system call names. Used by the test below.
86 $(objpfx
)tst-syscall-list-nr.list
: \
87 ..
/sysdeps
/unix
/sysv
/linux
/filter-nr-syscalls.awk \
88 $(objpfx
)tst-syscall-list-macros.list
89 LC_ALL
=C
$(AWK
) -f
$^
> $@
-tmp
90 $(move-if-change
) $@
-tmp
$@
92 # SYS_* system call names. Used by the test below.
93 $(objpfx
)tst-syscall-list-sys.list
: $(objpfx
)tst-syscall-list-macros.list
94 LC_ALL
=C
$(AWK
) '/^#define SYS_/ { print substr($$2, 5) }' $< > $@
-tmp
95 $(move-if-change
) $@
-tmp
$@
97 tests-special
+= $(objpfx
)tst-syscall-list.out
98 $(objpfx
)tst-syscall-list.out
: \
99 ..
/sysdeps
/unix
/sysv
/linux
/tst-syscall-list.sh \
100 $(objpfx
)tst-syscall-list-macros.list \
101 $(objpfx
)tst-syscall-list-nr.list \
102 $(objpfx
)tst-syscall-list-sys.list
103 $(BASH
) $^
$(AWK
) > $@
; $(evaluate-test
)
105 # Separate object file for access to the constant from the UAPI header.
106 $(objpfx
)tst-sysconf-iov_max
: $(objpfx
)tst-sysconf-iov_max-uapi.o
108 $(objpfx
)tst-pkey
: $(shared-thread-library
)
110 tests-special
+= $(objpfx
)tst-mman-consts.out
111 $(objpfx
)tst-mman-consts.out
: ..
/sysdeps
/unix
/sysv
/linux
/tst-mman-consts.py
112 PYTHONPATH
=..
/scripts \
113 $(PYTHON
) ..
/sysdeps
/unix
/sysv
/linux
/tst-mman-consts.py \
114 --cc="$(CC) $(patsubst -DMODULE_NAME=%, \
115 -DMODULE_NAME=testsuite, \
117 < /dev
/null
> $@
2>&1; $(evaluate-test
)
119 $(objpfx
)tst-gettid
: $(shared-thread-library
)
120 $(objpfx
)tst-gettid-kill
: $(shared-thread-library
)
121 $(objpfx
)tst-tgkill
: $(shared-thread-library
)
123 endif # $(subdir) == misc
125 ifeq ($(subdir
),time
)
126 sysdep_headers
+= sys
/timex.h bits
/timex.h
128 sysdep_routines
+= ntp_gettime ntp_gettimex
131 ifeq ($(subdir
),signal
)
132 tests-special
+= $(objpfx
)tst-signal-numbers.out
133 # Depending on signal.o* is a hack. What we actually want is a dependency
134 # on signal.h and everything it includes. That's impractical to write
135 # in this context, but signal.c includes signal.h and not much else so it'll
136 # be conservatively correct.
137 $(objpfx
)tst-signal-numbers.out
: \
138 ..
/sysdeps
/unix
/sysv
/linux
/tst-signal-numbers.py \
140 PYTHONPATH
=..
/scripts \
141 $(PYTHON
) ..
/sysdeps
/unix
/sysv
/linux
/tst-signal-numbers.py \
142 --cc="$(CC) $(patsubst -DMODULE_NAME=%, \
143 -DMODULE_NAME=testsuite, \
145 < /dev
/null
> $@
2>&1; $(evaluate-test
)
148 ifeq ($(subdir
),socket
)
149 sysdep_headers
+= net
/if_ppp.h net
/ppp-comp.h \
150 net
/ppp_defs.h net
/if_arp.h net
/route.h net
/ethernet.h \
151 net
/if_slip.h net
/if_packet.h net
/if_shaper.h \
152 bits
/socket-constants.h
153 sysdep_routines
+= cmsg_nxthdr
154 CFLAGS-recvmmsg.c
= -fexceptions
-fasynchronous-unwind-tables
155 CFLAGS-sendmmsg.c
= -fexceptions
-fasynchronous-unwind-tables
157 tests-special
+= $(objpfx
)tst-socket-consts.out
158 $(objpfx
)tst-socket-consts.out
: ..
/sysdeps
/unix
/sysv
/linux
/tst-socket-consts.py
159 PYTHONPATH
=..
/scripts \
160 $(PYTHON
) ..
/sysdeps
/unix
/sysv
/linux
/tst-socket-consts.py \
161 --cc="$(CC) $(patsubst -DMODULE_NAME=%, \
162 -DMODULE_NAME=testsuite, \
163 $(CPPFLAGS)) -D_ISOMAC" \
164 < /dev
/null
> $@
2>&1; $(evaluate-test
)
165 endif # $(subdir) == socket
167 ifeq ($(subdir
),sunrpc
)
168 sysdep_headers
+= nfs
/nfs.h
171 ifeq ($(subdir
),termios
)
172 sysdep_headers
+= termio.h
175 ifeq ($(subdir
),posix
)
176 sysdep_headers
+= bits
/initspin.h
178 sysdep_routines
+= sched_getcpu oldglob getcpu
180 tests
+= tst-affinity tst-affinity-pid
182 tests-static
:= tst-affinity-static
183 tests
+= $(tests-static
)
185 CFLAGS-fork.c
= $(libio-mtsafe
)
186 CFLAGS-getpid.o
= -fomit-frame-pointer
187 CFLAGS-getpid.os
= -fomit-frame-pointer
190 ifeq ($(subdir
),inet
)
191 sysdep_headers
+= netinet
/if_fddi.h netinet
/if_tr.h \
192 netipx
/ipx.h netash
/ash.h netax25
/ax25.h netatalk
/at.h \
193 netrom
/netrom.h netpacket
/packet.h netrose
/rose.h \
194 neteconet
/ec.h netiucv
/iucv.h
195 sysdep_routines
+= netlink_assert_response
198 # Don't compile the ctype glue code, since there is no old non-GNU C library.
201 ifeq ($(subdir
),dirent
)
202 sysdep_routines
+= getdirentries getdirentries64
203 tests
+= tst-getdents64
204 tests-internal
+= tst-readdir64-compat
208 CFLAGS-ypclnt.c
= -DUSE_BINDINGDIR
=1
212 sysdep_routines
+= xstatconv internal_statvfs internal_statvfs64 \
213 sync_file_range fallocate fallocate64 \
214 close_nocancel fcntl_nocancel nanosleep_nocancel \
215 open_nocancel open64_nocancel \
216 openat_nocancel openat64_nocancel \
217 pause_nocancel read_nocancel waitpid_nocancel \
218 write_nocancel statx_cp
220 sysdep_headers
+= bits
/fcntl-linux.h
222 tests
+= tst-fallocate tst-fallocate64
226 sysdep-rtld-routines
+= dl-brk dl-sbrk dl-getcwd dl-openat64 dl-opendir \
229 libof-lddlibc4
= lddlibc4
233 $(objpfx
)pldd
: $(objpfx
)xmalloc.o
237 CFLAGS-mq_send.c
+= -fexceptions
238 CFLAGS-mq_receive.c
+= -fexceptions
241 ifeq ($(subdir
),nscd
)
242 sysdep-CFLAGS
+= -DHAVE_EPOLL
-DHAVE_INOTIFY
-DHAVE_NETLINK
243 CFLAGS-gai.c
+= -DNEED_NETLINK
246 ifeq ($(subdir
),nptl
)
247 tests
+= tst-align-clone tst-getpid1 \
248 tst-thread-affinity-pthread tst-thread-affinity-pthread2 \
249 tst-thread-affinity-sched
250 tests-internal
+= tst-setgetname