mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/Makefile ($(objpfx)syscall-%.h $(objpfx)syscall-%.d): Take code from sparc/Makefile to produce a bi-arch file as needed. That's now parameterized by the variable $(64bit-predefine). Use LC_ALL=C for `comm' commands in that rule. No longer conditional on [$(no_syscall_list_h)]. * sysdeps/unix/sysv/linux/sparc/Makefile: Remove replacement rules. (64bit-predefine): New variable. * sysdeps/unix/sysv/linux/x86_64/Makefile: Likewise. * sysdeps/unix/sysv/linux/s390/Makefile: New file. * sysdeps/unix/sysv/linux/powerpc/Makefile (64bit-predefine): New variable. 2002-10-15 Roland McGrath <roland@redhat.com> * sysdeps/unix/sysv/linux/Makefile ($(objpfx)syscall-%.h $(objpfx)syscall-%.d) * login/utmp-private.h: Declare __libc_utmp_lock. * sysdeps/unix/getlogin_r.c (getlogin_r): Take __libc_utmp_lock once call __libc_utmp_jump_table functions directly, instead of using __setutent et al. * sysdeps/unix/sysv/linux/configure.in: Use case instead of if. * sysdeps/unix/sysv/linux/configure: Regenerated.
This commit is contained in:
@ -1,44 +1 @@
|
||||
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__sparc_v9__ -U__arch64__ -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__sparc_v9__ -D__arch64__ -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 ''; \
|
||||
comm -12 $(@:.d=.h).new32 $(@:.d=.h).new64; \
|
||||
echo '#if __WORDSIZE == 64'; \
|
||||
comm -13 $(@:.d=.h).new32 $(@:.d=.h).new64; \
|
||||
echo '#else'; \
|
||||
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
|
||||
64bit-predefine = __sparc_v9__ __arch64__
|
||||
|
Reference in New Issue
Block a user