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]

[PATCH] Tiny bi-arch bits/syscall.h change


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  <jakub@redhat.com>

	* 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 <bits/wordsize.h>.
 $(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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]