* [PATCH] Fix Alpha build
@ 2002-08-04 14:53 Jakub Jelinek
2002-08-04 15:28 ` [PATCH] Fix IA-64 build Jakub Jelinek
2002-08-04 17:38 ` [PATCH] Fix Alpha build Ulrich Drepper
0 siblings, 2 replies; 11+ messages in thread
From: Jakub Jelinek @ 2002-08-04 14:53 UTC (permalink / raw)
To: Ulrich Drepper; +Cc: Glibc hackers
Hi!
The following patch makes alpha glibc build (and not end
up with:
/usr/src/redhat/BUILD/glibc-2.2.90/build-alpha-linux/libc.so.6.1: undefined reference to `__GI___wcstoull_internal'
/usr/src/redhat/BUILD/glibc-2.2.90/build-alpha-linux/libc.so.6.1: undefined reference to `__GI_globfree'
/usr/src/redhat/BUILD/glibc-2.2.90/build-alpha-linux/libc.so.6.1: undefined reference to `__GI_____strtoull_l_internal'
/usr/src/redhat/BUILD/glibc-2.2.90/build-alpha-linux/libc.so.6.1: undefined reference to `__GI___strtoull_internal'
/usr/src/redhat/BUILD/glibc-2.2.90/build-alpha-linux/libc.so.6.1: undefined reference to `__GI___strtoll_internal'
/usr/src/redhat/BUILD/glibc-2.2.90/build-alpha-linux/libc.so.6.1: undefined reference to `__GI_glob'
).
The important thing is that when playing games like
various sysdeps/wordsize-64/*.c routines do, ie. #define foo bar
#include <something.c>
#undef foo
*_alias(baz, foo)
libc_hidden_{def,weak} (foo) cannot be used, because there is no
libc_hidden_proto (foo) in this case. Instead, libc_hidden_ver should be
used, or alternatively all this ugly magic could go away if
asm_weak_alias and asm_strong_alias macros are introduced and used in this
case (macros which would do th same as non-asm_ variants, but in
pure assembly, so it wouldn't matter that the 2 functions have different
prototypes).
IA-64 doesn't build either (even with this patch), will look into it tomorrow morning.
2002-08-04 Jakub Jelinek <jakub@redhat.com>
* sysdeps/generic/glob.c (glob, globfree): Only use libc_hidden_def
if glob resp. globfree are not macros.
* sysdeps/gnu/glob64.c (globfree64): Add libc_hidden_def.
* sysdeps/unix/sysv/linux/alpha/glob.c (glob, globfree, globfree64):
Add libc_hidden_ver.
* sysdeps/unix/sysv/linux/i386/glob64.c (globfree64): Add
libc_hidden_def.
* sysdeps/wordsize-64/glob.c (globfree64): Use libc_hidden_ver
instead of libc_hidden_weak.
* sysdeps/wordsize-64/strtol.c (__strtoll_internal): Use
libc_hidden_ver instead of libc_hidden_def.
* sysdeps/wordsize-64/wcstol.c (__wcstoll_internal): Use
libc_hidden_ver instead of libc_hidden_def.
(wcstoll, wcstoq): Remove libc_hidden_weak.
* sysdeps/wordsize-64/strtol_l.c (____strtoll_l_internal): Add
libc_hidden_ver.
* sysdeps/wordsize-64/strtoul.c (__strtoull_internal): Add
libc_hidden_ver.
* sysdeps/wordsize-64/strtoul_l.c (____strtoull_l_internal): Add
libc_hidden_ver.
* sysdeps/wordsize-64/wcstoul.c (__wcstoull_internal): Add
libc_hidden_ver.
--- libc/sysdeps/generic/glob.c.jj 2002-08-04 20:23:24.000000000 +0200
+++ libc/sysdeps/generic/glob.c 2002-08-04 20:57:22.000000000 +0200
@@ -1064,7 +1064,7 @@ glob (pattern, flags, errfunc, pglob)
return 0;
}
-#ifdef _LIBC
+#if defined _LIBC && !defined glob
libc_hidden_def (glob)
#endif
@@ -1085,7 +1085,7 @@ globfree (pglob)
free ((__ptr_t) pglob->gl_pathv);
}
}
-#ifdef _LIBC
+#if defined _LIBC && !defined globfree
libc_hidden_def (globfree)
#endif
--- libc/sysdeps/gnu/glob64.c.jj 2001-02-16 11:46:40.000000000 +0100
+++ libc/sysdeps/gnu/glob64.c 2002-08-04 21:07:22.000000000 +0200
@@ -20,3 +20,5 @@
#define COMPILE_GLOB64 1
#include <sysdeps/generic/glob.c>
+
+libc_hidden_def (globfree64)
--- libc/sysdeps/unix/sysv/linux/alpha/glob.c.jj 2001-08-23 18:50:48.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/alpha/glob.c 2002-08-04 21:45:03.000000000 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -44,6 +44,9 @@ extern void __new_globfree (glob_t *__pg
versioned_symbol (libc, __new_glob, glob, GLIBC_2_1);
versioned_symbol (libc, __new_globfree, globfree, GLIBC_2_1);
+libc_hidden_ver (__new_glob, glob)
+libc_hidden_ver (__new_globfree, globfree)
weak_alias (__new_glob, glob64)
weak_alias (__new_globfree, globfree64)
+libc_hidden_ver (__new_globfree, globfree64)
--- libc/sysdeps/unix/sysv/linux/i386/glob64.c.jj 2001-02-16 11:46:40.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/i386/glob64.c 2002-08-04 21:14:35.000000000 +0200
@@ -23,6 +23,8 @@
#include "shlib-compat.h"
+libc_hidden_def (globfree64)
+
versioned_symbol (libc, __glob64, glob64, GLIBC_2_2);
#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
--- libc/sysdeps/wordsize-64/glob.c.jj 2002-08-04 20:23:29.000000000 +0200
+++ libc/sysdeps/wordsize-64/glob.c 2002-08-04 21:44:23.000000000 +0200
@@ -5,4 +5,4 @@
#undef globfree64
weak_alias (glob, glob64)
weak_alias (globfree, globfree64)
-libc_hidden_weak (globfree64)
+libc_hidden_ver (globfree, globfree64)
--- libc/sysdeps/wordsize-64/strtol.c.jj 2002-08-04 20:23:29.000000000 +0200
+++ libc/sysdeps/wordsize-64/strtol.c 2002-08-04 21:45:55.000000000 +0200
@@ -9,6 +9,6 @@
#undef strtoll
#undef strtoq
strong_alias (__strtol_internal, __strtoll_internal)
-libc_hidden_def (__strtoll_internal)
+libc_hidden_ver (__strtol_internal, __strtoll_internal)
weak_alias (strtol, strtoll)
weak_alias (strtol, strtoq)
--- libc/sysdeps/wordsize-64/wcstol.c.jj 2002-08-04 20:23:29.000000000 +0200
+++ libc/sysdeps/wordsize-64/wcstol.c 2002-08-04 21:46:24.000000000 +0200
@@ -9,8 +9,6 @@
#undef wcstoll
#undef wcstoq
strong_alias (__wcstol_internal, __wcstoll_internal)
-libc_hidden_def (__wcstoll_internal)
+libc_hidden_ver (__wcstol_internal, __wcstoll_internal)
weak_alias (wcstol, wcstoll)
-libc_hidden_weak (wcstoll)
weak_alias (wcstol, wcstoq)
-libc_hidden_weak (wcstoq)
--- libc/sysdeps/wordsize-64/strtol_l.c.jj 2001-01-05 22:58:22.000000000 +0100
+++ libc/sysdeps/wordsize-64/strtol_l.c 2002-08-04 21:48:34.000000000 +0200
@@ -7,4 +7,5 @@
#undef ____strtoll_l_internal
#undef __strtoll_l
strong_alias (____strtol_l_internal, ____strtoll_l_internal)
+libc_hidden_ver (____strtol_l_internal, ____strtoll_l_internal)
weak_alias (__strtol_l, __strtoll_l)
--- libc/sysdeps/wordsize-64/strtoul.c.jj 2001-01-05 22:58:22.000000000 +0100
+++ libc/sysdeps/wordsize-64/strtoul.c 2002-08-04 22:22:26.000000000 +0200
@@ -9,5 +9,6 @@
#undef strtoull
#undef strtouq
strong_alias (__strtoul_internal, __strtoull_internal)
+libc_hidden_ver (__strtoul_internal, __strtoull_internal)
weak_alias (strtoul, strtoull)
weak_alias (strtoul, strtouq)
--- libc/sysdeps/wordsize-64/strtoul_l.c.jj 2001-01-05 22:58:22.000000000 +0100
+++ libc/sysdeps/wordsize-64/strtoul_l.c 2002-08-04 21:49:44.000000000 +0200
@@ -7,4 +7,5 @@
#undef ____strtoull_l_internal
#undef __strtoull_l
strong_alias (____strtoul_l_internal, ____strtoull_l_internal)
+libc_hidden_ver (____strtoul_l_internal, ____strtoull_l_internal)
weak_alias (__strtoul_l, __strtoull_l)
--- libc/sysdeps/wordsize-64/wcstoul.c.jj 2001-01-05 22:58:22.000000000 +0100
+++ libc/sysdeps/wordsize-64/wcstoul.c 2002-08-04 21:50:41.000000000 +0200
@@ -9,5 +9,6 @@
#undef wcstoull
#undef wcstouq
strong_alias (__wcstoul_internal, __wcstoull_internal)
+libc_hidden_ver (__wcstoul_internal, __wcstoull_internal)
weak_alias (wcstoul, wcstoull)
weak_alias (wcstoul, wcstouq)
Jakub
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] Fix IA-64 build
2002-08-04 14:53 [PATCH] Fix Alpha build Jakub Jelinek
@ 2002-08-04 15:28 ` Jakub Jelinek
2002-08-04 17:07 ` Roland McGrath
2002-08-04 17:38 ` [PATCH] Fix Alpha build Ulrich Drepper
1 sibling, 1 reply; 11+ messages in thread
From: Jakub Jelinek @ 2002-08-04 15:28 UTC (permalink / raw)
To: Ulrich Drepper; +Cc: Glibc hackers
On Sun, Aug 04, 2002 at 11:53:04PM +0200, Jakub Jelinek wrote:
> IA-64 doesn't build either (even with this patch), will look into it tomorrow morning.
I believe this should fix it (bootstrap pending).
__lseek was defined in both lseek.os and llseek.os (and __llseek nowhere).
2002-08-05 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/ia64/syscalls.list (llseek): Provide
__llseek alias, not __lseek.
* sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list (llseek):
Likewise.
* manual/debug.texi (%MENU%): Remove trailing dot.
Reported by <hayastan132@hotmail.com>.
--- libc/manual/debug.texi.jj 2002-08-04 21:57:15.000000000 +0200
+++ libc/manual/debug.texi 2002-08-05 00:41:19.000000000 +0200
@@ -1,6 +1,6 @@
@node Debugging Support
@c @node Debugging Support, , Cryptographic Functions, Top
-@c %MENU% Functions to help debugging applications.
+@c %MENU% Functions to help debugging applications
@chapter Debugging support
Applications are usually debugged using dedicated debugger programs.
--- libc/sysdeps/unix/sysv/linux/ia64/syscalls.list.jj 2002-08-04 20:23:28.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/ia64/syscalls.list 2002-08-05 00:40:02.000000000 +0200
@@ -3,7 +3,7 @@
umount2 - umount 2 __umount2 umount2
# Whee! 64-bit systems naturally implement llseek.
-llseek EXTRA lseek 3 __libc_lseek64 __lseek llseek __lseek64 lseek64
+llseek EXTRA lseek 3 __libc_lseek64 __llseek llseek __lseek64 lseek64
pread - pread 4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
pwrite - pwrite 4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
fstatfs - fstatfs i:ip __fstatfs fstatfs fstatfs64 __fstatfs64
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list.jj 2002-08-04 20:23:28.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list 2002-08-05 00:40:37.000000000 +0200
@@ -1,6 +1,6 @@
# File name Caller Syscall name # args Strong name Weak names
-llseek EXTRA lseek 3 __libc_lseek64 __lseek llseek __lseek64 lseek64
+llseek EXTRA lseek 3 __libc_lseek64 __llseek llseek __lseek64 lseek64
pread - pread 4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
pwrite - pwrite 4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
fstatfs - fstatfs i:ip __fstatfs fstatfs fstatfs64 __fstatfs64
Jakub
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Fix IA-64 build
2002-08-04 15:28 ` [PATCH] Fix IA-64 build Jakub Jelinek
@ 2002-08-04 17:07 ` Roland McGrath
2002-08-04 23:25 ` Jakub Jelinek
0 siblings, 1 reply; 11+ messages in thread
From: Roland McGrath @ 2002-08-04 17:07 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Ulrich Drepper, Glibc hackers
I think the better solution is for those platforms not to have both modules
at all, or have one empty. Why have two idential syscall entry points
generated? I think you would get the right result by having an empty
lseek.[cS] in sysdeps/.../ia64 to override the unix/syscalls.list definition.
It might be handy to let syscalls.list indicate an empty module with a line
instead of adding the files. i.e.:
llseek EXTRA lseek 3 __libc_lseek64 __lseek llseek __lseek64 lseek64 lseek
lseek llseek -
so if llseek.o is built according to the first line, then lseek.o will be
made a dummy object by the second line.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Fix IA-64 build
2002-08-04 17:07 ` Roland McGrath
@ 2002-08-04 23:25 ` Jakub Jelinek
2002-08-04 23:59 ` Roland McGrath
0 siblings, 1 reply; 11+ messages in thread
From: Jakub Jelinek @ 2002-08-04 23:25 UTC (permalink / raw)
To: Roland McGrath; +Cc: Ulrich Drepper, Glibc hackers
On Sun, Aug 04, 2002 at 08:07:33PM -0400, Roland McGrath wrote:
> I think the better solution is for those platforms not to have both modules
> at all, or have one empty. Why have two idential syscall entry points
> generated? I think you would get the right result by having an empty
> lseek.[cS] in sysdeps/.../ia64 to override the unix/syscalls.list definition.
> It might be handy to let syscalls.list indicate an empty module with a line
> instead of adding the files. i.e.:
>
> llseek EXTRA lseek 3 __libc_lseek64 __lseek llseek __lseek64 lseek64 lseek
> lseek llseek -
>
> so if llseek.o is built according to the first line, then lseek.o will be
> made a dummy object by the second line.
If it listed __libc_lseek, __llseek among aliases, it would work, yes.
Jakub
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Fix IA-64 build
2002-08-04 23:25 ` Jakub Jelinek
@ 2002-08-04 23:59 ` Roland McGrath
0 siblings, 0 replies; 11+ messages in thread
From: Roland McGrath @ 2002-08-04 23:59 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Ulrich Drepper, Glibc hackers
> If it listed __libc_lseek, __llseek among aliases, it would work, yes.
I put in the make-syscalls.sh change. Can you now send a syscalls.list
change that's verified to work on ia64 using the new syntax?
Just replace the syscall name with - for a dummy module and skip the
following fields. The second field (caller) behaves the same so
syscalls.list can say e.g. make lseek a dummy iff llseek came from that
list and was not overridden by a different sysdeps dir.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Fix Alpha build
2002-08-04 14:53 [PATCH] Fix Alpha build Jakub Jelinek
2002-08-04 15:28 ` [PATCH] Fix IA-64 build Jakub Jelinek
@ 2002-08-04 17:38 ` Ulrich Drepper
1 sibling, 0 replies; 11+ messages in thread
From: Ulrich Drepper @ 2002-08-04 17:38 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Glibc hackers
Jakub Jelinek wrote:
> The following patch makes alpha glibc build (and not end
> up with:
Thanks, I've applied it.
--
---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] Fix alpha build
@ 2002-09-29 5:29 Jakub Jelinek
2002-09-29 5:35 ` Roland McGrath
2002-10-03 12:53 ` Richard Henderson
0 siblings, 2 replies; 11+ messages in thread
From: Jakub Jelinek @ 2002-09-29 5:29 UTC (permalink / raw)
To: Roland McGrath, Ulrich Drepper; +Cc: Glibc hackers
Hi!
PARAMS(args) is not defined on Alpha. In fact, IMHO GCC doesn't need
it either, since longlong.h is only used in libgcc.a which is compiled
already by gcc, not host compiler, and without -Wtraditional.
2002-09-29 Jakub Jelinek <jakub@redhat.com>
* stdlib/longlong.h (__udiv_qrnnd): Remove PARAMS from prototype.
--- libc/stdlib/longlong.h.jj Sat Sep 28 16:40:59 2002
+++ libc/stdlib/longlong.h Sun Sep 29 08:19:21 2002
@@ -126,7 +126,7 @@
(q) = __udiv_qrnnd (&__r, (n1), (n0), (d)); \
(r) = __r; \
} while (0)
-extern UDItype __udiv_qrnnd PARAMS ((UDItype *, UDItype, UDItype, UDItype));
+extern UDItype __udiv_qrnnd (UDItype *, UDItype, UDItype, UDItype);
#define UDIV_TIME 220
#endif /* LONGLONG_STANDALONE */
#ifdef __alpha_cix__
Jakub
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Fix alpha build
2002-09-29 5:29 [PATCH] Fix alpha build Jakub Jelinek
@ 2002-09-29 5:35 ` Roland McGrath
2002-10-03 12:53 ` Richard Henderson
1 sibling, 0 replies; 11+ messages in thread
From: Roland McGrath @ 2002-09-29 5:35 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Ulrich Drepper, Glibc hackers
> PARAMS(args) is not defined on Alpha. In fact, IMHO GCC doesn't need
> it either, since longlong.h is only used in libgcc.a which is compiled
> already by gcc, not host compiler, and without -Wtraditional.
Ok. I put the change in. Please see if you can get the gcc file changed.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Fix alpha build
2002-09-29 5:29 [PATCH] Fix alpha build Jakub Jelinek
2002-09-29 5:35 ` Roland McGrath
@ 2002-10-03 12:53 ` Richard Henderson
1 sibling, 0 replies; 11+ messages in thread
From: Richard Henderson @ 2002-10-03 12:53 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Roland McGrath, Ulrich Drepper, Glibc hackers
On Sun, Sep 29, 2002 at 02:29:35PM +0200, Jakub Jelinek wrote:
> PARAMS(args) is not defined on Alpha. In fact, IMHO GCC doesn't need
> it either, since longlong.h is only used in libgcc.a which is compiled
> already by gcc, not host compiler, and without -Wtraditional.
I agree. Patch pre-approved.
r~
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] Fix Alpha build
@ 2002-11-28 10:13 Jakub Jelinek
2002-11-28 14:48 ` Ulrich Drepper
0 siblings, 1 reply; 11+ messages in thread
From: Jakub Jelinek @ 2002-11-28 10:13 UTC (permalink / raw)
To: Roland McGrath, Ulrich Drepper, Richard Henderson; +Cc: Glibc hackers
Hi!
USE___THREAD is always defined, to 0 or 1, so even --without-__thread
it would try to use TLS sequence.
Also, I thought the minimum required compiler is gcc 3.2, not 3.3, and 3.2
doesn't have 'v' constraint (I can backport it to gcc-3_2-rhl8-branch,
but we'd have to claim that minimal required compiler on alpha
is gcc-3_2-rhl8-branch or 3.3). BTW: There was a stale _sc_0
in inline_syscall5 macro even if 'v' constraint works
2002-11-28 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/alpha/sysdep.S: Change defined(USE___THREAD) to
USE___THREAD.
* sysdeps/unix/sysv/linux/alpha/sysdep.h (inline_syscall*): Avoid
"=v" constraints.
--- libc/sysdeps/unix/alpha/sysdep.S.jj 2002-11-08 11:39:38.000000000 +0100
+++ libc/sysdeps/unix/alpha/sysdep.S 2002-11-28 18:51:17.000000000 +0100
@@ -45,7 +45,7 @@
.ent __syscall_error
__syscall_error:
-#if defined(_LIBC_REENTRANT) && defined(USE___THREAD)
+#if defined(_LIBC_REENTRANT) && USE___THREAD
LOADGP
PROLOGUE
--- libc/sysdeps/unix/sysv/linux/alpha/sysdep.h.jj 2002-11-08 11:39:46.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/alpha/sysdep.h 2002-11-28 18:19:55.000000000 +0100
@@ -93,105 +93,117 @@
#define inline_syscall0(name) \
{ \
+ register long _sc_0 __asm__("$0"); \
register long _sc_19 __asm__("$19"); \
\
+ _sc_0 = __NR_##name; \
__asm__("callsys # %0 %1 <= %2" \
- : "=v"(_sc_ret), "=r"(_sc_19) \
- : "0"(__NR_##name) \
+ : "=r"(_sc_0), "=r"(_sc_19) \
+ : "0"(_sc_0) \
: inline_syscall_clobbers, \
"$16", "$17", "$18", "$20", "$21"); \
- _sc_err = _sc_19; \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
}
#define inline_syscall1(name,arg1) \
{ \
+ register long _sc_0 __asm__("$0"); \
register long _sc_16 __asm__("$16"); \
register long _sc_19 __asm__("$19"); \
\
+ _sc_0 = __NR_##name; \
_sc_16 = (long) (arg1); \
__asm__("callsys # %0 %1 <= %2 %3" \
- : "=v"(_sc_ret), "=r"(_sc_19), \
+ : "=r"(_sc_0), "=r"(_sc_19), \
"=r"(_sc_16) \
- : "0"(__NR_##name), "2"(_sc_16) \
+ : "0"(_sc_0), "2"(_sc_16) \
: inline_syscall_clobbers, \
"$17", "$18", "$20", "$21"); \
- _sc_err = _sc_19; \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
}
#define inline_syscall2(name,arg1,arg2) \
{ \
+ register long _sc_0 __asm__("$0"); \
register long _sc_16 __asm__("$16"); \
register long _sc_17 __asm__("$17"); \
register long _sc_19 __asm__("$19"); \
\
+ _sc_0 = __NR_##name; \
_sc_16 = (long) (arg1); \
_sc_17 = (long) (arg2); \
__asm__("callsys # %0 %1 <= %2 %3 %4" \
- : "=v"(_sc_ret), "=r"(_sc_19), \
+ : "=r"(_sc_0), "=r"(_sc_19), \
"=r"(_sc_16), "=r"(_sc_17) \
- : "0"(__NR_##name), "2"(_sc_16), "3"(_sc_17) \
+ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17) \
: inline_syscall_clobbers, \
"$18", "$20", "$21"); \
- _sc_err = _sc_19; \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
}
#define inline_syscall3(name,arg1,arg2,arg3) \
{ \
+ register long _sc_0 __asm__("$0"); \
register long _sc_16 __asm__("$16"); \
register long _sc_17 __asm__("$17"); \
register long _sc_18 __asm__("$18"); \
register long _sc_19 __asm__("$19"); \
\
+ _sc_0 = __NR_##name; \
_sc_16 = (long) (arg1); \
_sc_17 = (long) (arg2); \
_sc_18 = (long) (arg3); \
__asm__("callsys # %0 %1 <= %2 %3 %4 %5" \
- : "=v"(_sc_ret), "=r"(_sc_19), \
+ : "=r"(_sc_0), "=r"(_sc_19), \
"=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18) \
- : "0"(__NR_##name), "2"(_sc_16), "3"(_sc_17), \
+ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
"4"(_sc_18) \
: inline_syscall_clobbers, "$20", "$21"); \
- _sc_err = _sc_19; \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
}
#define inline_syscall4(name,arg1,arg2,arg3,arg4) \
{ \
+ register long _sc_0 __asm__("$0"); \
register long _sc_16 __asm__("$16"); \
register long _sc_17 __asm__("$17"); \
register long _sc_18 __asm__("$18"); \
register long _sc_19 __asm__("$19"); \
\
+ _sc_0 = __NR_##name; \
_sc_16 = (long) (arg1); \
_sc_17 = (long) (arg2); \
_sc_18 = (long) (arg3); \
_sc_19 = (long) (arg4); \
__asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6" \
- : "=v"(_sc_ret), "=r"(_sc_19), \
+ : "=r"(_sc_0), "=r"(_sc_19), \
"=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18) \
- : "0"(__NR_##name), "2"(_sc_16), "3"(_sc_17), \
+ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
"4"(_sc_18), "1"(_sc_19) \
: inline_syscall_clobbers, "$20", "$21"); \
- _sc_err = _sc_19; \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
}
#define inline_syscall5(name,arg1,arg2,arg3,arg4,arg5) \
{ \
+ register long _sc_0 __asm__("$0"); \
register long _sc_16 __asm__("$16"); \
register long _sc_17 __asm__("$17"); \
register long _sc_18 __asm__("$18"); \
register long _sc_19 __asm__("$19"); \
register long _sc_20 __asm__("$20"); \
\
+ _sc_0 = __NR_##name; \
_sc_16 = (long) (arg1); \
_sc_17 = (long) (arg2); \
_sc_18 = (long) (arg3); \
_sc_19 = (long) (arg4); \
_sc_20 = (long) (arg5); \
__asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7" \
- : "=v"(_sc_ret), "=r"(_sc_19), \
+ : "=r"(_sc_0), "=r"(_sc_19), \
"=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18), \
"=r"(_sc_20) \
- : "0"(__NR_##name), "2"(_sc_16), "3"(_sc_17), \
+ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
"4"(_sc_18), "1"(_sc_19), "5"(_sc_20) \
: inline_syscall_clobbers, "$21"); \
_sc_ret = _sc_0, _sc_err = _sc_19; \
@@ -199,6 +211,7 @@
#define inline_syscall6(name,arg1,arg2,arg3,arg4,arg5,arg6) \
{ \
+ register long _sc_0 __asm__("$0"); \
register long _sc_16 __asm__("$16"); \
register long _sc_17 __asm__("$17"); \
register long _sc_18 __asm__("$18"); \
@@ -206,6 +219,7 @@
register long _sc_20 __asm__("$20"); \
register long _sc_21 __asm__("$21"); \
\
+ _sc_0 = __NR_##name; \
_sc_16 = (long) (arg1); \
_sc_17 = (long) (arg2); \
_sc_18 = (long) (arg3); \
@@ -213,14 +227,14 @@
_sc_20 = (long) (arg5); \
_sc_21 = (long) (arg6); \
__asm__("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8" \
- : "=v"(_sc_ret), "=r"(_sc_19) \
+ : "=r"(_sc_0), "=r"(_sc_19) \
"=r"(_sc_16), "=r"(_sc_17), "=r"(_sc_18), \
"=r"(_sc_20), "=r"(_sc_21) \
- : "0"(__NR_##name), "2"(_sc_16), "3"(_sc_17), \
+ : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \
"4"(_sc_18), "1"(_sc_19), "5"(_sc_20), \
"6"(_sc_21) \
: inline_syscall_clobbers); \
- _sc_err = _sc_19; \
+ _sc_ret = _sc_0, _sc_err = _sc_19; \
}
#endif /* _LINUX_ALPHA_SYSDEP_H */
Jakub
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Fix Alpha build
2002-11-28 10:13 [PATCH] Fix Alpha build Jakub Jelinek
@ 2002-11-28 14:48 ` Ulrich Drepper
0 siblings, 0 replies; 11+ messages in thread
From: Ulrich Drepper @ 2002-11-28 14:48 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Roland McGrath, Richard Henderson, Glibc hackers
Jakub Jelinek wrote:
> 2002-11-28 Jakub Jelinek <jakub@redhat.com>
>
> * sysdeps/unix/alpha/sysdep.S: Change defined(USE___THREAD) to
> USE___THREAD.
> * sysdeps/unix/sysv/linux/alpha/sysdep.h (inline_syscall*): Avoid
> "=v" constraints.
I've applied this patch now in the hope that it'll fix the problems
people were having with recent CVS versions on Alpha. Thanks,
--
--------------. ,-. 444 Castro Street
Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA
Red Hat `--' drepper at redhat.com `---------------------------
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2002-11-28 22:48 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-04 14:53 [PATCH] Fix Alpha build Jakub Jelinek
2002-08-04 15:28 ` [PATCH] Fix IA-64 build Jakub Jelinek
2002-08-04 17:07 ` Roland McGrath
2002-08-04 23:25 ` Jakub Jelinek
2002-08-04 23:59 ` Roland McGrath
2002-08-04 17:38 ` [PATCH] Fix Alpha build Ulrich Drepper
2002-09-29 5:29 [PATCH] Fix alpha build Jakub Jelinek
2002-09-29 5:35 ` Roland McGrath
2002-10-03 12:53 ` Richard Henderson
2002-11-28 10:13 [PATCH] Fix Alpha build Jakub Jelinek
2002-11-28 14:48 ` Ulrich Drepper
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).