From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24357 invoked by alias); 30 Oct 2002 15:56:38 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 24237 invoked from network); 30 Oct 2002 15:56:37 -0000 Received: from unknown (HELO sunsite.mff.cuni.cz) (195.113.19.66) by sources.redhat.com with SMTP; 30 Oct 2002 15:56:37 -0000 Received: (from jakub@localhost) by sunsite.mff.cuni.cz (8.11.6/8.11.6) id g9UFuXh17575; Wed, 30 Oct 2002 16:56:33 +0100 Date: Wed, 30 Oct 2002 08:08:00 -0000 From: Jakub Jelinek To: Roland McGrath , Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] Tiny bi-arch bits/syscall.h change Message-ID: <20021030165633.X3451@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i X-SW-Source: 2002-10/txt/msg00110.txt.bz2 Hi! I noticed bits/syscall.h on x86-64 has all defines in __WORDSIZE == 64, ie. defines no 32-bit syscall. Fixed thusly. 32bit-predefine is not needed on other arches, since asm stubs use #if defined basearch && defined 64bitarch resp. #if defined basearch && !defined 64bitarch. 2002-10-30 Jakub Jelinek * sysdeps/unix/sysv/linux/Makefile (syscall-%.h): Add -D for each 32bit-predefine when creating .new32 list and -U for each 32bit-predefine when creating .new64 list. --- libc/sysdeps/unix/sysv/linux/x86_64/Makefile.jj 2002-10-16 23:22:16.000000000 +0200 +++ libc/sysdeps/unix/sysv/linux/x86_64/Makefile 2002-10-30 16:42:02.000000000 +0100 @@ -1,3 +1,4 @@ +32bit-predefine = __i386__ 64bit-predefine = __x86_64__ ifeq ($(subdir),misc) --- libc/sysdeps/unix/sysv/linux/Makefile.jj 2002-10-16 09:12:53.000000000 +0200 +++ libc/sysdeps/unix/sysv/linux/Makefile 2002-10-30 16:42:27.000000000 +0100 @@ -25,7 +25,7 @@ sysdep_headers += sys/mount.h sys/acct.h install-others += $(inst_includedir)/bits/syscall.h # Generate the list of SYS_* macros for the system calls (__NR_* macros). -# For bi-arch platforms, the CPU/Makefile defines 64bit-predefine and +# For bi-arch platforms, the CPU/Makefile defines {32,64}bit-predefine and # we generate a file that uses . $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/sys/syscall.h rm -f $(@:.h=.d)-t @@ -37,11 +37,13 @@ $(objpfx)syscall-%.h $(objpfx)syscall-%. echo '#endif'; \ echo ''; \ SUNPRO_DEPENDENCIES='$(@:.h=.d)-t $@' \ - $(CC) -E -x c $(sysincludes) $< $(addprefix -U,$(64bit-predefine)) -D_LIBC -dM | \ + $(CC) -E -x c $(sysincludes) $< $(addprefix -U,$(64bit-predefine)) \ + $(addprefix -D,$(32bit-predefine)) -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) $< $(addprefix -D,$(64bit-predefine)) -D_LIBC -dM | \ + $(CC) -E -x c $(sysincludes) $< $(addprefix -U,$(64bit-predefine)) \ + $(addprefix -D,$(64bit-predefine)) -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 \ Jakub