This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi! I noticed s390 and ppc don't generate bi-arch bits/syscall.h like x86-64 and sparc already do. 2002-10-10 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/powerpc/Makefile: Generate bits/syscall.h with biarch support. * sysdeps/unix/sysv/linux/s390/Makefile: New file. * sysdeps/unix/sysv/linux/sparc/Makefile (syscall-%.h): Run comm in C locale. * sysdeps/unix/sysv/linux/x86_64/Makefile (syscall-%.h): Likewise. --- libc/sysdeps/unix/sysv/linux/s390/Makefile.jj 2002-10-10 12:34:57.000000000 +0200 +++ libc/sysdeps/unix/sysv/linux/s390/Makefile 2002-10-10 12:40:00.000000000 +0200 @@ -0,0 +1,43 @@ +ifeq ($(subdir),misc) +no_syscall_list_h = 1 + +# Generate the list of SYS_* macros for the system calls (__NR_* macros). +$(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/sys/syscall.h + rm -f $(@:.h=.d)-t + { \ + echo '/* Generated at libc build time from kernel syscall list. */';\ + echo ''; \ + echo '#ifndef _SYSCALL_H'; \ + echo '# error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."'; \ + echo '#endif'; \ + echo ''; \ + SUNPRO_DEPENDENCIES='$(@:.h=.d)-t $@' \ + $(CC) -E -x c $(sysincludes) $< -U__s390x__ -D_LIBC -dM | \ + sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' | \ + LC_ALL=C sort > $(@:.d=.h).new32; \ + SUNPRO_DEPENDENCIES='$(@:.h=.d)-t $@' \ + $(CC) -E -x c $(sysincludes) $< -D__s390x__ -D_LIBC -dM | \ + sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' | \ + LC_ALL=C sort > $(@:.d=.h).new64; \ + if cmp -s $(@:.d=.h).new32 $(@:.d=.h).new64; then \ + cat $(@:.d=.h).new32; \ + else \ + echo '#include <bits/wordsize.h>'; \ + echo ''; \ + LC_ALL=C comm -12 $(@:.d=.h).new32 $(@:.d=.h).new64; \ + echo '#if __WORDSIZE == 64'; \ + LC_ALL=C comm -13 $(@:.d=.h).new32 $(@:.d=.h).new64; \ + echo '#else'; \ + LC_ALL=C comm -23 $(@:.d=.h).new32 $(@:.d=.h).new64; \ + echo '#endif'; \ + fi; \ + rm -f $(@:.d=.h).new32 $(@:.d=.h).new64; \ + } > $(@:.d=.h).new + mv -f $(@:.d=.h).new $(@:.d=.h) + sed < $(@:.h=.d)-t > $(@:.h=.d)-t2 \ + -e 's,$(subst .,\.,$@),$(patsubst $(objpfx)%,$$(objpfx)%,\ + $(@:.d=.h) $(@:.h=.d)),' + rm -f $(@:.h=.d)-t + mv -f $(@:.h=.d)-t2 $(@:.h=.d) + +endif --- libc/sysdeps/unix/sysv/linux/powerpc/Makefile.jj 2002-09-05 12:29:54.000000000 +0200 +++ libc/sysdeps/unix/sysv/linux/powerpc/Makefile 2002-10-10 12:41:28.000000000 +0200 @@ -2,3 +2,47 @@ ifeq ($(subdir),signal) sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \ rt_sigqueueinfo rt_sigaction rt_sigpending endif + +ifeq ($(subdir),misc) +no_syscall_list_h = 1 + +# Generate the list of SYS_* macros for the system calls (__NR_* macros). +$(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/sys/syscall.h + rm -f $(@:.h=.d)-t + { \ + echo '/* Generated at libc build time from kernel syscall list. */';\ + echo ''; \ + echo '#ifndef _SYSCALL_H'; \ + echo '# error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."'; \ + echo '#endif'; \ + echo ''; \ + SUNPRO_DEPENDENCIES='$(@:.h=.d)-t $@' \ + $(CC) -E -x c $(sysincludes) $< -U__powerpc64__ -D_LIBC -dM | \ + sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' | \ + LC_ALL=C sort > $(@:.d=.h).new32; \ + SUNPRO_DEPENDENCIES='$(@:.h=.d)-t $@' \ + $(CC) -E -x c $(sysincludes) $< -D__powerpc64__ -D_LIBC -dM | \ + sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' | \ + LC_ALL=C sort > $(@:.d=.h).new64; \ + if cmp -s $(@:.d=.h).new32 $(@:.d=.h).new64; then \ + cat $(@:.d=.h).new32; \ + else \ + echo '#include <bits/wordsize.h>'; \ + echo ''; \ + LC_ALL=C comm -12 $(@:.d=.h).new32 $(@:.d=.h).new64; \ + echo '#if __WORDSIZE == 64'; \ + LC_ALL=C comm -13 $(@:.d=.h).new32 $(@:.d=.h).new64; \ + echo '#else'; \ + LC_ALL=C comm -23 $(@:.d=.h).new32 $(@:.d=.h).new64; \ + echo '#endif'; \ + fi; \ + rm -f $(@:.d=.h).new32 $(@:.d=.h).new64; \ + } > $(@:.d=.h).new + mv -f $(@:.d=.h).new $(@:.d=.h) + sed < $(@:.h=.d)-t > $(@:.h=.d)-t2 \ + -e 's,$(subst .,\.,$@),$(patsubst $(objpfx)%,$$(objpfx)%,\ + $(@:.d=.h) $(@:.h=.d)),' + rm -f $(@:.h=.d)-t + mv -f $(@:.h=.d)-t2 $(@:.h=.d) + +endif --- libc/sysdeps/unix/sysv/linux/sparc/Makefile.jj 2002-04-07 17:46:25.000000000 +0200 +++ libc/sysdeps/unix/sysv/linux/sparc/Makefile 2002-10-10 13:10:53.000000000 +0200 @@ -25,11 +25,11 @@ $(objpfx)syscall-%.h $(objpfx)syscall-%. else \ echo '#include <bits/wordsize.h>'; \ echo ''; \ - comm -12 $(@:.d=.h).new32 $(@:.d=.h).new64; \ + LC_ALL=C comm -12 $(@:.d=.h).new32 $(@:.d=.h).new64; \ echo '#if __WORDSIZE == 64'; \ - comm -13 $(@:.d=.h).new32 $(@:.d=.h).new64; \ + LC_ALL=C comm -13 $(@:.d=.h).new32 $(@:.d=.h).new64; \ echo '#else'; \ - comm -23 $(@:.d=.h).new32 $(@:.d=.h).new64; \ + LC_ALL=C comm -23 $(@:.d=.h).new32 $(@:.d=.h).new64; \ echo '#endif'; \ fi; \ rm -f $(@:.d=.h).new32 $(@:.d=.h).new64; \ --- libc/sysdeps/unix/sysv/linux/x86_64/Makefile.jj 2002-09-01 09:34:48.000000000 +0200 +++ libc/sysdeps/unix/sysv/linux/x86_64/Makefile 2002-10-10 13:10:31.000000000 +0200 @@ -27,11 +27,11 @@ $(objpfx)syscall-%.h $(objpfx)syscall-%. else \ echo '#include <bits/wordsize.h>'; \ echo ''; \ - comm -12 $(@:.d=.h).new32 $(@:.d=.h).new64; \ + LC_ALL=C comm -12 $(@:.d=.h).new32 $(@:.d=.h).new64; \ echo '#if __WORDSIZE == 64'; \ - comm -13 $(@:.d=.h).new32 $(@:.d=.h).new64; \ + LC_ALL=C comm -13 $(@:.d=.h).new32 $(@:.d=.h).new64; \ echo '#else'; \ - comm -23 $(@:.d=.h).new32 $(@:.d=.h).new64; \ + LC_ALL=C comm -23 $(@:.d=.h).new32 $(@:.d=.h).new64; \ echo '#endif'; \ fi; \ rm -f $(@:.d=.h).new32 $(@:.d=.h).new64; \ Jakub
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |