From: Jakub Jelinek <jakub@redhat.com>
To: Roland McGrath <roland@redhat.com>, Ulrich Drepper <drepper@redhat.com>
Cc: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: [PATCH] Tiny bi-arch bits/syscall.h change
Date: Wed, 30 Oct 2002 08:08:00 -0000 [thread overview]
Message-ID: <20021030165633.X3451@sunsite.ms.mff.cuni.cz> (raw)
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
next reply other threads:[~2002-10-30 15:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-30 8:08 Jakub Jelinek [this message]
2002-10-31 11:50 ` Andreas Jaeger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20021030165633.X3451@sunsite.ms.mff.cuni.cz \
--to=jakub@redhat.com \
--cc=drepper@redhat.com \
--cc=libc-hacker@sources.redhat.com \
--cc=roland@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).