(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
[glibc.git] / sysdeps / unix / sysv / linux / mips / Makefile
blobd5e4f6b72dfd9c5bfac8970ff71580ed9e9f6d83
1 ifeq ($(subdir),signal)
2 #sysdep_routines += sigsuspend
3 endif
5 ifeq ($(subdir),misc)
6 sysdep_routines += cachectl cacheflush sysmips _test_and_set
8 sysdep_headers += sys/cachectl.h sys/sysmips.h sys/tas.h
10 no_syscall_list_h = 1
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)
17 { \
18 echo '/* Generated at libc build time from kernel syscall list. */';\
19 echo ''; \
20 echo '#ifndef _SYSCALL_H'; \
21 echo '# error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."'; \
22 echo '#endif'; \
23 echo ''; \
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' \
29 > $(@:.d=.h).newt; \
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 | \
33 LC_ALL=C sort; \
34 echo '#elif _MIPS_SIM == _ABI64'; \
35 sed -n 's/^\(#define SYS_\)N64_/\1/p' < $(@:.d=.h).newt | \
36 LC_ALL=C sort; \
37 echo '#else'; \
38 sed -n 's/^\(#define SYS_\)O32_/\1/p' < $(@:.d=.h).newt | \
39 LC_ALL=C sort; \
40 echo '#endif'; \
41 sed -n '/^#define SYS_\([ON]32\|N64\)_/p' < $(@:.d=.h).newt | \
42 LC_ALL=C sort +1.8; \
43 else \
44 cat $(@:.d=.h).newt; \
45 fi; \
46 rm $(@:.d=.h).newt; \
47 } > $(@:.d=.h).new
48 mv -f $(@:.d=.h).new $(@:.d=.h)
49 ifneq (,$(objpfx))
50 sed $(sed-remove-objpfx) $(@:.h=.d)-t > $(@:.h=.d)-t2
51 rm -f $(@:.h=.d)-t
52 mv -f $(@:.h=.d)-t2 $(@:.h=.d)
53 else
54 mv -f $(@:.h=.d)-t $(@:.h=.d)
55 endif
56 endif