public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Ulrich Drepper <drepper@redhat.com>, rth@redhat.com
Cc: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: [PATCH] Assorted alpha glibc fixes
Date: Mon, 28 Jun 2004 20:24:00 -0000	[thread overview]
Message-ID: <20040628180910.GR5191@sunsite.ms.mff.cuni.cz> (raw)

Hi!

This is what I had to apply to make glibc build on alpha.
There are still many testsuite failures, but they all seem to be unrelated to
this (lots of regex tests failed (which work on all other arches and there
is nothing arch specific about that, maybe b0rken compiler), some math
test failures, backtrace failures, 2 aio failures).
Richard, I hope doing jsr ra, __errno_location is the right thing to do
for librt.so (__errno_location symbol is defined only in libc.so and
libpthread.so, not in librt.so, so it can't be !samegp).
I was testing this on a kernel without POSIX mq support, so this
hunk probably did not get as much testing as it ought to.

2004-06-28  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/alpha/sysdep.h (inline_syscall6): Fix a typo.

	[BZ #231]
	* sysdeps/unix/alpha/sysdep.S (__syscall_error): Avoid !samegp
	relocation in librt.so.

	[BZ #230]
	* sysdeps/alpha/dl-machine.h (_dl_start_user): Use ldah/ldl to load
	_dl_skip_args.  Patch by Jakub Bogusz <qboosh@pld-linux.org>.
nptl/
	* sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
	unconditionally.

--- libc/sysdeps/unix/alpha/sysdep.S.jj	2003-01-17 11:19:55.000000000 -0800
+++ libc/sysdeps/unix/alpha/sysdep.S	2004-06-28 12:33:47.000000000 -0700
@@ -1,4 +1,5 @@
-/* Copyright (C) 1993, 1996, 1998, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996, 1998, 2002, 2003, 2004
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Brendan Kehoe (brendan@zen.org).
 
@@ -95,7 +96,7 @@ __syscall_error:
 	PROLOGUE
 
 	/* Find our per-thread errno address  */
-#ifdef PIC
+#if defined PIC && !defined IS_IN_librt
 	bsr	ra, __errno_location	!samegp
 #else
 	jsr	ra, __errno_location
--- libc/sysdeps/unix/alpha/sysdep.h.jj	2004-01-15 22:04:53.000000000 -0800
+++ libc/sysdeps/unix/alpha/sysdep.h	2004-06-28 08:51:09.000000000 -0700
@@ -1,4 +1,5 @@
-/* Copyright (C) 1992, 1995, 1996, 2000, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996, 2000, 2003, 2004
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Brendan Kehoe (brendan@zen.org).
 
@@ -364,7 +365,7 @@ __LABEL(name)						\
 	__asm__ __volatile__					\
 	  ("callsys # %0 %1 <= %2 %3 %4 %5 %6 %7 %8"		\
 	   : inline_syscall_r0_out_constraint (_sc_0),		\
-	     "=r"(_sc_19) "=r"(_sc_16), "=r"(_sc_17),		\
+	     "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17),		\
 	     "=r"(_sc_18), "=r"(_sc_20), "=r"(_sc_21)		\
 	   : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), "4"(_sc_18),	\
 	     "1"(_sc_19), "5"(_sc_20), "6"(_sc_21)		\
--- libc/sysdeps/alpha/dl-machine.h.jj	2004-03-05 02:20:29.000000000 -0800
+++ libc/sysdeps/alpha/dl-machine.h	2004-06-28 08:59:52.000000000 -0700
@@ -321,7 +321,8 @@ _dl_start_user:							\n\
 	mov	$0, $9						\n\
 	/* See if we were run as a command with the executable	\n\
 	   file name as an extra leading argument.  */		\n\
-	ldl	$1, _dl_skip_args($gp)	!gprel			\n\
+	ldah	$1, _dl_skip_args($gp)	!gprelhigh		\n\
+	ldl	$1, _dl_skip_args($1)	!gprellow		\n\
 	bne	$1, $fixup_stack				\n\
 $fixup_stack_ret:						\n\
 	/* The special initializer gets called with the stack	\n\
--- libc/nptl/sysdeps/alpha/tcb-offsets.sym.jj	2004-03-11 13:34:25.000000000 -0800
+++ libc/nptl/sysdeps/alpha/tcb-offsets.sym	2004-06-28 12:22:33.000000000 -0700
@@ -7,7 +7,5 @@
 # define __builtin_thread_pointer()  ((void *) 0)
 # define thread_offsetof(mem)	     ((void *) &THREAD_SELF->mem - (void *) 0)
 
-#if TLS_MULTIPLE_THREADS_IN_TCB
 MULTIPLE_THREADS_OFFSET		thread_offsetof (header.multiple_threads)
-#endif
 PID_OFFSET			thread_offsetof (pid)

	Jakub

             reply	other threads:[~2004-06-28 20:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-28 20:24 Jakub Jelinek [this message]
2004-06-28 21:04 ` Ulrich Drepper

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=20040628180910.GR5191@sunsite.ms.mff.cuni.cz \
    --to=jakub@redhat.com \
    --cc=drepper@redhat.com \
    --cc=libc-hacker@sources.redhat.com \
    --cc=rth@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).