diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/mips/Makefile')
-rw-r--r-- | sysdeps/unix/sysv/linux/mips/Makefile | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile index d65175f..db06a48 100644 --- a/sysdeps/unix/sysv/linux/mips/Makefile +++ b/sysdeps/unix/sysv/linux/mips/Makefile @@ -21,20 +21,25 @@ $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/s echo '# error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."'; \ echo '#endif'; \ echo ''; \ + echo '#include <sgidefs.h>'; \ rm -f $(@:.d=.h).newt; \ $(CC) -E -MD -MP -MF $(@:.h=.d)-t -MT '$(@:.d=.h) $(@:.h=.d)' \ - -x c -I $(common-objdir) $(sysincludes) $< -D_LIBC -dM | \ + -x c $(+includes) $(sysincludes) $< -D_LIBC -dM | \ sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' \ > $(@:.d=.h).newt; \ if grep SYS_O32_ $(@:.d=.h).newt > /dev/null; then \ - echo '#if defined _ABI64 && _MIPS_SIM == _ABI64'; \ - sed -n 's/^\(#define SYS_\)N64_/\1/p' < $(@:.d=.h).newt; \ - echo '#elif defined _ABIN32 && _MIPS_SIM == _ABIN32'; \ - sed -n 's/^\(#define SYS_\)N32_/\1/p' < $(@:.d=.h).newt; \ + echo '#if _MIPS_SIM == _MIPS_SIM_NABI32'; \ + sed -n 's/^\(#define SYS_\)N32_/\1/p' < $(@:.d=.h).newt | \ + LC_ALL=C sort; \ + echo '#elif _MIPS_SIM == _MIPS_SIM_ABI64'; \ + sed -n 's/^\(#define SYS_\)N64_/\1/p' < $(@:.d=.h).newt | \ + LC_ALL=C sort; \ echo '#else'; \ - sed -n 's/^\(#define SYS_\)O32_/\1/p' < $(@:.d=.h).newt; \ + sed -n 's/^\(#define SYS_\)O32_/\1/p' < $(@:.d=.h).newt | \ + LC_ALL=C sort; \ echo '#endif'; \ - sed -n '/^#define SYS_\([ON]32\|N64\)_/p' < $(@:.d=.h).newt; \ + sed -n '/^#define SYS_\([ON]32\|N64\)_/p' < $(@:.d=.h).newt | \ + LC_ALL=C sort +1.8; \ else \ cat $(@:.d=.h).newt; \ fi; \ |