public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix sparc64 build
@ 2006-03-01 21:19 Jakub Jelinek
  0 siblings, 0 replies; 9+ messages in thread
From: Jakub Jelinek @ 2006-03-01 21:19 UTC (permalink / raw)
  To: Roland McGrath, Ulrich Drepper; +Cc: Glibc hackers

Hi!

And this is needed for sparc64.
The reason why libc_hidden_def (__fxstatat64) can't be used
is that there is
/* Ho hum, if fxstatat == fxstatat64 we must get rid of the prototype or gcc
   will complain since they don't strictly match.  */
#define __fxstatat64 __fxstatat64_disable
at the beginning of the file.  That means there is no
libc_hidden_proto (__fxstatat64) in headers
and therefore we need to use libc_hidden_ver.

2006-03-01  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/sparc/sparc64/fpu/libm-test-ulps: Update.

	* sysdeps/unix/sysv/linux/i386/fxstatat.c (__fxstatat64): Use
	libc_hidden_ver rather than libc_hidden_def.

--- libc/sysdeps/unix/sysv/linux/i386/fxstatat.c.jj	2006-02-12 16:32:59.000000000 -0500
+++ libc/sysdeps/unix/sysv/linux/i386/fxstatat.c	2006-03-01 13:57:58.000000000 -0500
@@ -172,5 +172,5 @@ libc_hidden_def (__fxstatat)
 #ifdef XSTAT_IS_XSTAT64
 # undef __fxstatat64
 strong_alias (__fxstatat, __fxstatat64);
-libc_hidden_def (__fxstatat64)
+libc_hidden_ver (__fxstatat, __fxstatat64)
 #endif
--- libc/sysdeps/sparc/sparc64/fpu/libm-test-ulps.jj	2006-01-15 12:59:38.000000000 -0500
+++ libc/sysdeps/sparc/sparc64/fpu/libm-test-ulps	2006-03-01 16:28:05.000000000 -0500
@@ -465,6 +465,11 @@ ifloat: 2
 ildouble: 1
 ldouble: 1
 
+# exp2
+Test "exp2 (10) == 1024":
+ildouble: 2
+ldouble: 2
+
 # expm1
 Test "expm1 (0.75) == 1.11700001661267466854536981983709561":
 double: 1
@@ -1192,6 +1197,10 @@ ifloat: 2
 ildouble: 1
 ldouble: 1
 
+Function: "exp2":
+ildouble: 2
+ldouble: 2
+
 Function: "expm1":
 double: 1
 float: 1

	Jakub

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

* Re: [PATCH] Fix sparc64 build
  2006-08-10 20:56 ` Roland McGrath
@ 2006-08-15  5:28   ` Ulrich Drepper
  0 siblings, 0 replies; 9+ messages in thread
From: Ulrich Drepper @ 2006-08-15  5:28 UTC (permalink / raw)
  To: Roland McGrath; +Cc: Jakub Jelinek, Glibc hackers

[-- Attachment #1: Type: text/plain, Size: 194 bytes --]

Roland McGrath wrote:
> Is there a reason sparc isn't using the sysdeps/posix/pause.c code?

Done.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 251 bytes --]

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

* Re: [PATCH] Fix sparc64 build
  2006-08-10  6:53 Jakub Jelinek
@ 2006-08-10 20:56 ` Roland McGrath
  2006-08-15  5:28   ` Ulrich Drepper
  0 siblings, 1 reply; 9+ messages in thread
From: Roland McGrath @ 2006-08-10 20:56 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Ulrich Drepper, Glibc hackers

Is there a reason sparc isn't using the sysdeps/posix/pause.c code?

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

* [PATCH] Fix sparc64 build
@ 2006-08-10  6:53 Jakub Jelinek
  2006-08-10 20:56 ` Roland McGrath
  0 siblings, 1 reply; 9+ messages in thread
From: Jakub Jelinek @ 2006-08-10  6:53 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: Glibc hackers

Hi!

sparc64 doesn't provide the pause syscall, so it is emulated
using sigsuspend.
The following adds __pause_nocancel, which is now required by
pthread_mutex_lock.c.

2006-08-09  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/sparc/sparc64/pause.c
	(__pause_nocancel): New function.

--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c	14 Apr 2005 21:44:25 -0000	1.3
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/pause.c	9 Aug 2006 19:32:11 -0000
@@ -1,5 +1,5 @@
 /* pause -- suspend the process until a signal arrives.  POSIX.1 version.
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006 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,4 +44,15 @@ __libc_pause (void)
 }
 weak_alias (__libc_pause, pause)
 
+int
+__pause_nocancel (void)
+{
+  sigset_t set;
+
+  __sigemptyset (&set);
+  INLINE_SYSCALL (rt_sigprocmask, 4, SIG_BLOCK, CHECK_SIGSET (NULL),
+		  CHECK_SIGSET_NULL_OK (&set), _NSIG / 8);
+  return INLINE_SYSCALL (rt_sigsuspend, 2, CHECK_SIGSET (&set), _NSIG / 8);
+}
+
 LIBC_CANCEL_HANDLED ();		/* sigsuspend handles our cancellation.  */

	Jakub

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

* [PATCH] Fix sparc64 build
@ 2006-01-31 21:59 Jakub Jelinek
  0 siblings, 0 replies; 9+ messages in thread
From: Jakub Jelinek @ 2006-01-31 21:59 UTC (permalink / raw)
  To: Ulrich Drepper, Roland McGrath; +Cc: Glibc hackers

Hi!

sparc64 doesn't have jmpbuf-offsets.h (and doesn't need them, uses
a struct instead).
The i386/fxstatat.c fixes
/usr/src/redhat/BUILD/libc2/obj2/libc_pic.os: In function `fstatat64':
../io/sys/stat.h:507: undefined reference to `__GI___fxstatat64'
and the linux/fxstatat.c change is the same thing.  __fxstatat64
that has libc_hidden_proto on it is redefined throughout the file
to a different name, so libc_hidden_ver rather than libc_hidden_def
is needed.

2006-01-31  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/i386/fxstatat.c [XSTAT_IS_STAT64]
	(__fxstatat64): Add libc_hidden_ver.
	* sysdeps/unix/sysv/linux/fxstatat.c [XSTAT_IS_STAT64] (__fxstatat64):
	Likewise.
	* sysdeps/sparc/sparc64/jmpbuf-unwind.h: Remove jmpbuf-offsets.h
	include.

--- libc/sysdeps/unix/sysv/linux/i386/fxstatat.c.jj	2006-01-11 10:55:32.000000000 -0500
+++ libc/sysdeps/unix/sysv/linux/i386/fxstatat.c	2006-01-31 16:56:54.000000000 -0500
@@ -149,4 +149,5 @@ __fxstatat (int vers, int fd, const char
 #ifdef XSTAT_IS_XSTAT64
 # undef __fxstatat64
 strong_alias (__fxstatat, __fxstatat64);
+libc_hidden_ver (__fxstatat, __fxstatat64)
 #endif
--- libc/sysdeps/unix/sysv/linux/fxstatat.c.jj	2006-01-19 02:58:06.000000000 -0500
+++ libc/sysdeps/unix/sysv/linux/fxstatat.c	2006-01-31 17:03:57.000000000 -0500
@@ -105,4 +105,5 @@ __fxstatat (int vers, int fd, const char
 #ifdef XSTAT_IS_XSTAT64
 # undef __fxstatat64
 strong_alias (__fxstatat, __fxstatat64);
+libc_hidden_ver (__fxstatat, __fxstatat64)
 #endif
--- libc/sysdeps/sparc/sparc64/jmpbuf-unwind.h.jj	2006-01-14 11:41:04.000000000 -0500
+++ libc/sysdeps/sparc/sparc64/jmpbuf-unwind.h	2006-01-31 16:26:25.000000000 -0500
@@ -18,7 +18,6 @@
    02111-1307 USA.  */
 
 #include <setjmp.h>
-#include <jmpbuf-offsets.h>
 #include <stdint.h>
 #include <unwind.h>
 

	Jakub

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

* Re: [PATCH] Fix sparc64 build
  2003-04-14 13:36 Jakub Jelinek
@ 2003-04-14 16:49 ` Ulrich Drepper
  0 siblings, 0 replies; 9+ messages in thread
From: Ulrich Drepper @ 2003-04-14 16:49 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Roland McGrath, Glibc hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jakub Jelinek wrote:

> ret_NOERRNO was not defined on sparc64...

Applied.

- -- 
- --------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+muaG2ijCOnn/RHQRAlGDAJ0aMTtOuPcU6Bo2MwN1n7chf04D9ACgnMoQ
S9gxtFjF/wlw7YRJC+NBbWc=
=Pyil
-----END PGP SIGNATURE-----

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

* [PATCH] Fix sparc64 build
@ 2003-04-14 13:36 Jakub Jelinek
  2003-04-14 16:49 ` Ulrich Drepper
  0 siblings, 1 reply; 9+ messages in thread
From: Jakub Jelinek @ 2003-04-14 13:36 UTC (permalink / raw)
  To: Ulrich Drepper, Roland McGrath; +Cc: Glibc hackers

Hi!

ret_NOERRNO was not defined on sparc64...

2003-04-14  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h (ret_NOERRNO):
	Define.

--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h.jj	2003-04-01 04:21:01.000000000 -0500
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h	2003-04-13 18:51:30.000000000 -0400
@@ -122,6 +122,7 @@ SYSCALL_ERROR_HANDLER_ENTRY(__syscall_er
 
 /* Careful here!  This "ret" define can interfere; use jmpl if unsure.  */
 #define ret             retl; nop
+#define ret_NOERRNO	retl; nop
 #define r0              %o0
 #define r1              %o1
 #define MOVE(x,y)       mov x, y

	Jakub

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

* Re: [PATCH] Fix sparc64 build
  2002-09-29 13:28 Jakub Jelinek
@ 2002-09-29 13:42 ` Ulrich Drepper
  0 siblings, 0 replies; 9+ messages in thread
From: Ulrich Drepper @ 2002-09-29 13:42 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Roland McGrath, Glibc hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jakub Jelinek wrote:

> 	* sysdeps/unix/sysv/linux/kernel-features.h
> 	(__ASSUME_SETRESUID_SYSCALL): On the sparc, define to 1, not empty.

I've applied the patch.  Thanks,

- -- 
- --------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE9l2Wr2ijCOnn/RHQRAst8AKCiKWHgUj6fM4JwgOERw7OiUVRLowCeNRzR
g5h0ZgQ6YrlYFJnnjGkRYrI=
=1ePG
-----END PGP SIGNATURE-----

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

* [PATCH] Fix sparc64 build
@ 2002-09-29 13:28 Jakub Jelinek
  2002-09-29 13:42 ` Ulrich Drepper
  0 siblings, 1 reply; 9+ messages in thread
From: Jakub Jelinek @ 2002-09-29 13:28 UTC (permalink / raw)
  To: Roland McGrath, Ulrich Drepper; +Cc: Glibc hackers

Hi!

Without this I got
../sysdeps/unix/sysv/linux/seteuid.c:26:58: operator '>' has no left operand
error in sparc64 build.
Verified no other broken defines like this are in kernel-features.h.
sparc32 make check is still ongoing, so far only bug-regex12 failed.
Also, one note to all the builds - they were done with the __ctype_b etc.
exporting patch as @@GLIBC*, not @GLIBC*, so although it works for me on
ia64, it probably doesn't work for others there due to ld issues.

2002-09-29  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/kernel-features.h
	(__ASSUME_SETRESUID_SYSCALL): On the sparc, define to 1, not empty.

--- libc/sysdeps/unix/sysv/linux/kernel-features.h.jj	2002-09-18 00:31:46.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/kernel-features.h	2002-09-29 22:28:04.000000000 +0200
@@ -124,7 +124,7 @@
 
 /* Linux 2.3.39 sparc added setresuid.  */
 #if __LINUX_KERNEL_VERSION >= 131879 && defined __sparc__
-# define __ASSUME_SETRESUID_SYSCALL
+# define __ASSUME_SETRESUID_SYSCALL	1
 #endif
 
 /* Linux 2.3.39 introduced IPC64.  Except for powerpc.  */

	Jakub

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

end of thread, other threads:[~2006-08-15  5:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-01 21:19 [PATCH] Fix sparc64 build Jakub Jelinek
  -- strict thread matches above, loose matches on Subject: below --
2006-08-10  6:53 Jakub Jelinek
2006-08-10 20:56 ` Roland McGrath
2006-08-15  5:28   ` Ulrich Drepper
2006-01-31 21:59 Jakub Jelinek
2003-04-14 13:36 Jakub Jelinek
2003-04-14 16:49 ` Ulrich Drepper
2002-09-29 13:28 Jakub Jelinek
2002-09-29 13:42 ` 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).