1 ifeq ($(subdir
),signal
)
2 #sysdep_routines += sigsuspend
6 sysdep_routines
+= cachectl cacheflush sysmips _test_and_set
8 sysdep_headers
+= sys
/cachectl.h sys
/sysmips.h sys
/tas.h
12 # Generate the list of SYS_* macros for the system calls (__NR_* macros).
13 # We generate not only SYS_<syscall>, pointing at SYS_<abi>_<syscall> if
14 # it exists, but also define SYS_<abi>_<syscall> for all ABIs.
15 $(objpfx
)syscall-
%.h
$(objpfx
)syscall-
%.d
: ..
/sysdeps
/unix
/sysv
/linux
/mips
/sys
/syscall.h
16 $(make-target-directory
)
18 echo
'/* Generated at libc build time from kernel syscall list. */';\
20 echo
'#ifndef _SYSCALL_H'; \
21 echo
'# error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."'; \
24 echo
'#include <sgidefs.h>'; \
25 rm -f
$(@
:.d
=.h
).newt
; \
26 $(CC
) -E
-MD
-MP
-MF
$(@
:.h
=.d
)-t
-MT
'$(@:.d=.h) $(@:.h=.d)' \
27 -x c
$(+includes
) $(sysincludes
) $< -D_LIBC
-dM | \
28 sed
-n
's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' \
30 if grep SYS_O32_
$(@
:.d
=.h
).newt
> /dev
/null
; then \
31 echo
'#if _MIPS_SIM == _ABIN32'; \
32 sed
-n
's/^\(#define SYS_\)N32_/\1/p' < $(@
:.d
=.h
).newt | \
34 echo
'#elif _MIPS_SIM == _ABI64'; \
35 sed
-n
's/^\(#define SYS_\)N64_/\1/p' < $(@
:.d
=.h
).newt | \
38 sed
-n
's/^\(#define SYS_\)O32_/\1/p' < $(@
:.d
=.h
).newt | \
41 sed
-n
'/^#define SYS_\([ON]32\|N64\)_/p' < $(@
:.d
=.h
).newt | \
44 cat
$(@
:.d
=.h
).newt
; \
48 mv
-f
$(@
:.d
=.h
).new
$(@
:.d
=.h
)
50 sed
$(sed-remove-objpfx
) $(@
:.h
=.d
)-t
> $(@
:.h
=.d
)-t2
52 mv
-f
$(@
:.h
=.d
)-t2
$(@
:.h
=.d
)
54 mv
-f
$(@
:.h
=.d
)-t
$(@
:.h
=.d
)