[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r2442 - in glibc-package/trunk/debian: . patches/hurd-i386 sysdeps



Author: sthibaul-guest
Date: 2007-07-22 22:49:03 +0000 (Sun, 22 Jul 2007)
New Revision: 2442

Added:
   glibc-package/trunk/debian/patches/hurd-i386/local-gcc-4.1-init-first.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/hurd-i386/local-tls-support.diff
   glibc-package/trunk/debian/sysdeps/hurd.mk
Log:
  * hurd-i386/local-gcc-4.1-init-first.diff: New patch by Thomas
    Schwinge to fix building with gcc-4.1.
  * sysdeps/hurd.mk (CC, BUILD_CC): Removed.


Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog	2007-07-22 22:40:20 UTC (rev 2441)
+++ glibc-package/trunk/debian/changelog	2007-07-22 22:49:03 UTC (rev 2442)
@@ -47,6 +47,9 @@
     submitted-sigsuspend-nocancel.diff.
   * hurd-i386/submitted-ECANCELED.diff: new patch to fix ECANCELED value.
     Closes: #396135.
+  * hurd-i386/local-gcc-4.1-init-first.diff: New patch by Thomas
+    Schwinge to fix building with gcc-4.1.
+  * sysdeps/hurd.mk (CC, BUILD_CC): Removed.
 
  -- Aurelien Jarno <aurel32@debian.org>  Mon, 23 Jul 2007 00:36:13 +0200
 

Added: glibc-package/trunk/debian/patches/hurd-i386/local-gcc-4.1-init-first.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/local-gcc-4.1-init-first.diff	                        (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/local-gcc-4.1-init-first.diff	2007-07-22 22:49:03 UTC (rev 2442)
@@ -0,0 +1,84 @@
+Index: sysdeps/mach/hurd/i386/init-first.c
+===================================================================
+RCS file: /cvs/glibc/libc/sysdeps/mach/hurd/i386/init-first.c,v
+retrieving revision 1.43.4.1
+diff -u -p -r1.43.4.1 init-first.c
+--- sysdeps/mach/hurd/i386/init-first.c	23 Oct 2005 01:00:09 -0000	1.43.4.1
++++ sysdeps/mach/hurd/i386/init-first.c	20 Nov 2006 11:05:47 -0000
+@@ -320,11 +320,11 @@ first_init (void)
+    stack set up just as the user will see it, so it can switch stacks.  */
+ 
+ void
+-_dl_init_first (void)
++_dl_init_first (int argc, ...)
+ {
+   first_init ();
+ 
+-  init ((int *) __builtin_frame_address (0) + 2);
++  init (&argc);
+ }
+ #endif
+ 
+@@ -351,23 +351,21 @@ strong_alias (posixland_init, __libc_ini
+    This poorly-named function is called by static-start.S,
+    which should not exist at all.  */
+ void
+-_hurd_stack_setup (void)
++_hurd_stack_setup (volatile int argc, ...)
+ {
+-  intptr_t caller = (intptr_t) __builtin_return_address (0);
+-
+   void doinit (intptr_t *data)
+     {
+       /* This function gets called with the argument data at TOS.  */
+-      void doinit1 (void)
++      void doinit1 (volatile int argc, ...)
+ 	{
+-	  init ((int *) __builtin_frame_address (0) + 2);
++	  init ((int *) &argc);
+ 	}
+ 
+       /* Push the user return address after the argument data, and then
+          jump to `doinit1' (above), so it is as if __libc_init_first's
+          caller had called `doinit1' with the argument data already on the
+          stack.  */
+-      *--data = caller;
++      *--data = (&argc)[-1];
+       asm volatile ("movl %0, %%esp\n" /* Switch to new outermost stack.  */
+ 		    "movl $0, %%ebp\n" /* Clear outermost frame pointer.  */
+ 		    "jmp *%1" : : "r" (data), "r" (&doinit1) : "sp");
+@@ -376,7 +374,7 @@ _hurd_stack_setup (void)
+ 
+   first_init ();
+ 
+-  _hurd_startup ((void **) __builtin_frame_address (0) + 2, &doinit);
++  _hurd_startup ((void **) &argc, &doinit);
+ }
+ #endif
+
+Index: sysdeps/mach/hurd/i386/init-first.c
+===================================================================
+RCS file: /cvs/glibc/libc/sysdeps/mach/hurd/i386/init-first.c,v
+retrieving revision 1.43.4.1
+diff -u -p -r1.43.4.1 init-first.c
+--- sysdeps/mach/hurd/i386/init-first.c	23 Oct 2005 01:00:09 -0000	1.43.4.1
++++ sysdeps/mach/hurd/i386/init-first.c	20 Nov 2006 11:05:47 -0000
+@@ -353,6 +355,8 @@
+ void
+ _hurd_stack_setup (volatile int argc, ...)
+ {
++  intptr_t caller = (&argc)[-1];
++
+   void doinit (intptr_t *data)
+     {
+       /* This function gets called with the argument data at TOS.  */
+@@ -365,7 +369,7 @@
+          jump to `doinit1' (above), so it is as if __libc_init_first's
+          caller had called `doinit1' with the argument data already on the
+          stack.  */
+-      *--data = (&argc)[-1];
++      *--data = caller;
+       asm volatile ("movl %0, %%esp\n" /* Switch to new outermost stack.  */
+ 		    "movl $0, %%ebp\n" /* Clear outermost frame pointer.  */
+ 		    "jmp *%1" : : "r" (data), "r" (&doinit1) : "sp");
+

Modified: glibc-package/trunk/debian/patches/hurd-i386/local-tls-support.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/local-tls-support.diff	2007-07-22 22:40:20 UTC (rev 2441)
+++ glibc-package/trunk/debian/patches/hurd-i386/local-tls-support.diff	2007-07-22 22:49:03 UTC (rev 2442)
@@ -385,3 +385,40 @@
  #define MACHINE_THREAD_STATE_FLAVOR	PPC_THREAD_STATE
  #define MACHINE_THREAD_STATE_COUNT	PPC_THREAD_STATE_COUNT
  
+--- sysdeps/mach/hurd/bits/libc-tsd.h	2002-09-02 07:08:51.000000000 +0000
++++ /dev/null	2005-07-17 23:39:37.000000000 +0000
+@@ -1,34 +0,0 @@
+-/* libc-internal interface for thread-specific data.  Hurd version.
+-   Copyright (C) 1998,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
+-   modify it under the terms of the GNU Lesser General Public
+-   License as published by the Free Software Foundation; either
+-   version 2.1 of the License, or (at your option) any later version.
+-
+-   The GNU C Library is distributed in the hope that it will be useful,
+-   but WITHOUT ANY WARRANTY; without even the implied warranty of
+-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+-   Lesser General Public License for more details.
+-
+-   You should have received a copy of the GNU Lesser General Public
+-   License along with the GNU C Library; if not, write to the Free
+-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+-   02111-1307 USA.  */
+-
+-#ifndef _BITS_LIBC_TSD_H
+-#define _BITS_LIBC_TSD_H 1
+-
+-#include <hurd/threadvar.h>
+-
+-#define __libc_tsd_define(CLASS, KEY) /* nothing, always have threadvars */
+-
+-#define __libc_tsd_address(KEY) \
+-  ((void **) __hurd_threadvar_location (_HURD_THREADVAR_##KEY))
+-
+-#define __libc_tsd_get(KEY)		(*__libc_tsd_address (KEY))
+-#define __libc_tsd_set(KEY, VALUE)	(*__libc_tsd_address (KEY) = (VALUE))
+-
+-
+-#endif	/* bits/libc-tsd.h */

Modified: glibc-package/trunk/debian/sysdeps/hurd.mk
===================================================================
--- glibc-package/trunk/debian/sysdeps/hurd.mk	2007-07-22 22:40:20 UTC (rev 2441)
+++ glibc-package/trunk/debian/sysdeps/hurd.mk	2007-07-22 22:49:03 UTC (rev 2442)
@@ -19,11 +19,6 @@
 
 libc_extra_config_options := $(extra_config_options)
 
-# Build with gcc-4.1 is not yet supported.
-CC = gcc-4.0
-CXX = g++-4.0
-BUILD_CC = gcc-4.0
-
 # Only use libidn as add-on.
 standard-add-ons = libidn
 



Reply to: