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
14 ifeq ($(subdir
),socket
)
15 sysdep_routines
+= internal_accept4 recvmmsg internal_recvmmsg sendmmsg \
20 sysdep_routines
+= sysctl clone llseek umount umount2 readahead \
21 setfsuid setfsgid makedev epoll_pwait signalfd \
22 eventfd eventfd_read eventfd_write prlimit
24 CFLAGS-gethostid.c
= -fexceptions
25 CFLAGS-tst-writev.c
+= "-DARTIFICIAL_LIMIT=0x80000000-__getpagesize()"
27 sysdep_headers
+= sys
/mount.h sys
/acct.h sys
/sysctl.h \
28 sys
/klog.h sys
/kdaemon.h \
29 sys
/user.h sys
/procfs.h sys
/prctl.h \
30 sys
/kd.h sys
/soundcard.h sys
/vt.h \
31 sys
/quota.h sys
/fsuid.h \
32 scsi
/sg.h scsi
/scsi.h scsi
/scsi_ioctl.h sys
/pci.h \
33 sys
/ultrasound.h sys
/raw.h sys
/personality.h sys
/epoll.h \
34 bits
/a.out.h sys
/inotify.h sys
/signalfd.h sys
/eventfd.h \
35 sys
/timerfd.h sys
/fanotify.h bits
/eventfd.h bits
/inotify.h \
38 install-others
+= $(inst_includedir
)/bits
/syscall.h
42 # Generate the list of SYS_* macros for the system calls (__NR_* macros).
44 # If there is more than one syscall list for different architecture
45 # variants, the CPU/Makefile defines syscall-list-variants to be a
46 # list of names for those variants (e.g. 32bit 64bit), and, for each
47 # variant, defines syscall-list-$(variant)-options to be compiler
48 # options to cause <asm/unistd.h> to define the desired list of
49 # syscalls and syscall-list-$(variant)-condition to be the condition
50 # for those options to use in a C #if condition.
51 # syscall-list-includes may be defined to a list of headers to include
52 # in the generated header, if the default does not suffice.
54 ifndef syscall-list-variants
55 syscall-list-variants
:= default
56 syscall-list-default-options
:=
57 syscall-list-default-condition
:=
60 ifndef syscall-list-includes
61 syscall-list-includes
:= bits
/wordsize.h
64 $(objpfx
)syscall-
%.h
$(objpfx
)syscall-
%.d
: ..
/sysdeps
/unix
/sysv
/linux
/sys
/syscall.h
65 $(make-target-directory
)
67 echo
'/* Generated at libc build time from kernel syscall list. */';\
69 echo
'#ifndef _SYSCALL_H'; \
70 echo
'# error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."'; \
73 $(foreach h
,$(syscall-list-includes
), echo
'#include <$(h)>';) \
75 $(foreach v
,$(syscall-list-variants
),\
76 $(CC
) -E
-MD
-MP
-MF
$(@
:.h
=.d
)-t
$(v
) -MT
'$(@:.d=.h) $(@:.h=.d)' \
77 -x c
$(sysincludes
) $< $(syscall-list-
$(v
)-options
) \
79 sed
-n
's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' | \
80 LC_ALL
=C
sort > $(@
:.d
=.h
).new
$(v
); \
81 $(if
$(syscall-list-
$(v
)-condition
),\
82 echo
'#if $(syscall-list-$(v)-condition)';) \
83 cat
$(@
:.d
=.h
).new
$(v
); \
84 $(if
$(syscall-list-
$(v
)-condition
),echo
'#endif';) \
85 rm -f
$(@
:.d
=.h
).new
$(v
); \
88 mv
-f
$(@
:.d
=.h
).new
$(@
:.d
=.h
)
90 sed
$(sed-remove-objpfx
) \
91 $(foreach v
,$(syscall-list-variants
),$(@
:.h
=.d
)-t
$(v
)) > $(@
:.h
=.d
)-t3
93 cat
$(foreach v
,$(syscall-list-variants
),$(@
:.h
=.d
)-t
$(v
)) \
96 rm -f
$(foreach v
,$(syscall-list-variants
),$(@
:.h
=.d
)-t
$(v
))
97 mv
-f
$(@
:.h
=.d
)-t3
$(@
:.h
=.d
)
99 $(inst_includedir
)/bits
/syscall.h
: $(objpfx
)syscall-list.h
$(+force)
100 $(make-target-directory
)
101 if
test -r
$@
&& cmp
-s
$< $@
; \
102 then echo
'bits/syscall.h unchanged'; \
103 else $(INSTALL_DATA
) $< $@
; fi
106 # Get the generated list of dependencies (probably /usr/include/asm/unistd.h).
107 -include $(objpfx
)syscall-list.d
109 generated
+= syscall-list.h syscall-list.d
112 ifeq ($(subdir
),time
)
113 sysdep_headers
+= sys
/timex.h bits
/timex.h
115 sysdep_routines
+= ntp_gettime ntp_gettimex
118 ifeq ($(subdir
),socket
)
119 sysdep_headers
+= net
/if_ppp.h net
/ppp-comp.h \
120 net
/ppp_defs.h net
/if_arp.h net
/route.h net
/ethernet.h \
121 net
/if_slip.h net
/if_packet.h net
/if_shaper.h
122 sysdep_routines
+= cmsg_nxthdr sa_len
125 ifeq ($(subdir
),sunrpc
)
126 sysdep_headers
+= nfs
/nfs.h
129 ifeq ($(subdir
),termios
)
130 sysdep_headers
+= termio.h
133 ifeq ($(subdir
),posix
)
134 sysdep_headers
+= bits
/initspin.h
136 sysdep_routines
+= exit-thread sched_getcpu
141 ifeq ($(subdir
),inet
)
142 sysdep_headers
+= netinet
/if_fddi.h netinet
/if_tr.h \
143 netipx
/ipx.h netash
/ash.h netax25
/ax25.h netatalk
/at.h \
144 netrom
/netrom.h netpacket
/packet.h netrose
/rose.h \
145 neteconet
/ec.h netiucv
/iucv.h
148 # Don't compile the ctype glue code, since there is no old non-GNU C library.
151 ifeq ($(subdir
),dirent
)
152 sysdep_routines
+= getdirentries getdirentries64
156 CFLAGS-ypclnt.c
= -DUSE_BINDINGDIR
=1
160 sysdep_routines
+= xstatconv internal_statvfs internal_statvfs64 \
161 sync_file_range open_2 open64_2 fallocate fallocate64
165 sysdep-rtld-routines
+= dl-brk dl-sbrk dl-getcwd dl-openat64 dl-opendir \
168 CPPFLAGS-lddlibc4
+= -DNOT_IN_libc
172 CFLAGS-mq_send.c
+= -fexceptions
173 CFLAGS-mq_receive.c
+= -fexceptions
176 ifeq ($(subdir
),nscd
)
177 sysdep-CFLAGS
+= -DHAVE_EPOLL
-DHAVE_SENDFILE
-DHAVE_INOTIFY
-DHAVE_NETLINK
178 CFLAGS-gai.c
+= -DNEED_NETLINK