public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Tiny bi-arch bits/syscall.h change
@ 2002-10-30  8:08 Jakub Jelinek
  2002-10-31 11:50 ` Andreas Jaeger
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2002-10-30  8:08 UTC (permalink / raw)
  To: Roland McGrath, Ulrich Drepper; +Cc: Glibc hackers

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Tiny bi-arch bits/syscall.h change
  2002-10-30  8:08 [PATCH] Tiny bi-arch bits/syscall.h change Jakub Jelinek
@ 2002-10-31 11:50 ` Andreas Jaeger
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Jaeger @ 2002-10-31 11:50 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Roland McGrath, Ulrich Drepper, Glibc hackers

Jakub Jelinek <jakub@redhat.com> writes:

> 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__

Thanks, committed with ChangeLog mentioning the above change,

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-10-30 18:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-30  8:08 [PATCH] Tiny bi-arch bits/syscall.h change Jakub Jelinek
2002-10-31 11:50 ` Andreas Jaeger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).