From: Jan-Benedict G. <jb...@us...> - 2005-12-14 20:34:56
|
Update of /cvsroot/linux-vax/toolchain/patches In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15492 Modified Files: glibc-000000-experimental.patch Log Message: - Current patch. Index: glibc-000000-experimental.patch =================================================================== RCS file: /cvsroot/linux-vax/toolchain/patches/glibc-000000-experimental.patch,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- glibc-000000-experimental.patch 14 Dec 2005 18:06:53 -0000 1.2 +++ glibc-000000-experimental.patch 14 Dec 2005 20:34:45 -0000 1.3 @@ -1,3 +1,145 @@ +diff -Nurp glibc-clean/include/libc-symbols.h glibc/include/libc-symbols.h +--- glibc-clean/include/libc-symbols.h 2005-11-08 13:22:13.000000000 +0100 ++++ glibc/include/libc-symbols.h 2005-12-14 20:30:22.000000000 +0100 +@@ -236,7 +236,9 @@ + # ifdef HAVE_SECTION_QUOTES + # define __sec_comment "\"\n\t#\"" + # else +-# define __sec_comment "\n\t#" ++/*# define __sec_comment "\n\t#" */ ++# warning "__sec_comment commented out..." ++# define __sec_comment "" + # endif + # define link_warning(symbol, msg) \ + __make_section_unallocated (".gnu.warning." #symbol) \ +diff -Nurp glibc-clean/linuxthreads/sysdeps/vax/pspinlock.c glibc/linuxthreads/sysdeps/vax/pspinlock.c +--- glibc-clean/linuxthreads/sysdeps/vax/pspinlock.c 1970-01-01 01:00:00.000000000 +0100 ++++ glibc/linuxthreads/sysdeps/vax/pspinlock.c 2005-12-14 19:42:22.000000000 +0100 +@@ -0,0 +1,70 @@ ++/* POSIX spinlock implementation. VAX version. ++ Copyright (C) 2000, 2001 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 Library General Public License as ++ published by the Free Software Foundation; either version 2 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 ++ Library General Public License for more details. ++ ++ You should have received a copy of the GNU Library General Public ++ License along with the GNU C Library; see the file COPYING.LIB. If not, ++ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ Boston, MA 02111-1307, USA. */ ++ ++#include <errno.h> ++#include <pthread.h> ++#include "internals.h" ++ ++/* FIXME: These are just dummies. I don't know why or if they're needed; ++ configury should default to these definitions. We just follow the ++ crowd here. */ ++ ++int ++__pthread_spin_lock (pthread_spinlock_t *lock) ++{ ++ while (testandset (lock) != 0) ++ /* wait */; ++ ++ return 0; ++} ++weak_alias (__pthread_spin_lock, pthread_spin_lock) ++ ++int ++__pthread_spin_trylock (pthread_spinlock_t *lock) ++{ ++ return testandset (lock) != 0? EBUSY: 0; ++} ++weak_alias (__pthread_spin_trylock, pthread_spin_trylock) ++ ++int ++__pthread_spin_unlock (pthread_spinlock_t *lock) ++{ ++ return *lock = 0; ++} ++weak_alias (__pthread_spin_unlock, pthread_spin_unlock) ++ ++int ++__pthread_spin_init (pthread_spinlock_t *lock, int pshared) ++{ ++ /* We can ignore the `pshared' parameter. Since we are busy-waiting ++ all processes which can access the memory location `lock' points ++ to can use the spinlock. */ ++ return *lock = 0; ++} ++weak_alias (__pthread_spin_init, pthread_spin_init) ++ ++ ++int ++__pthread_spin_destroy (pthread_spinlock_t *lock) ++{ ++ /* Nothing to do. */ ++ return 0; ++} ++weak_alias (__pthread_spin_destroy, pthread_spin_destroy) ++ +diff -Nurp glibc-clean/linuxthreads/sysdeps/vax/pt-machine.h glibc/linuxthreads/sysdeps/vax/pt-machine.h +--- glibc-clean/linuxthreads/sysdeps/vax/pt-machine.h 1970-01-01 01:00:00.000000000 +0100 ++++ glibc/linuxthreads/sysdeps/vax/pt-machine.h 2005-12-14 19:43:54.000000000 +0100 +@@ -0,0 +1,50 @@ ++/* Machine-dependent pthreads configuration and inline functions. ++ VAX version. ++ Copyright (C) 1996, 1998 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ Contributed by David Airlie (airlied at linux.ie) ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Library General Public License as ++ published by the Free Software Foundation; either version 2 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 ++ Library General Public License for more details. ++ ++ You should have received a copy of the GNU Library General Public ++ License along with the GNU C Library; see the file COPYING.LIB. If ++ not, write to the Free Software Foundation, Inc., ++ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ++ ++#ifndef PT_EI ++# define PT_EI extern inline ++#endif ++ ++ ++/* Spinlock implementation; required. */ ++PT_EI long int ++testandset (int *spinlock) ++{ ++ char ret; ++ ++ __asm__ __volatile__ ( ++ " movl $1, %%r0 \n" ++ " bbssi $0, (%1), 1f \n" ++ " clrl %%r0 \n" ++ "1: movl %%r0, %0 \n" ++ : "=r"(ret) ++ : "r"(spinlock) ++ : "r0"); ++ ++ return ret; ++} ++ ++ ++/* Get some notion of the current stack. Need not be exactly the top ++ of the stack, just something somewhere in the current frame. */ ++#define CURRENT_STACK_FRAME stack_pointer ++register char *stack_pointer __asm__ ("sp"); ++ diff -Nurp glibc-clean/sysdeps/generic/ldsodefs.h glibc/sysdeps/generic/ldsodefs.h --- glibc-clean/sysdeps/generic/ldsodefs.h 2005-11-22 22:30:14.000000000 +0100 +++ glibc/sysdeps/generic/ldsodefs.h 2005-12-12 21:01:54.000000000 +0100 @@ -179,6 +321,93 @@ +# define FNONBLOCK O_NONBLOCK +# define FNDELAY O_NDELAY +#endif /* Use BSD. */ +diff -Nurp glibc-clean/sysdeps/unix/sysv/linux/vax/sys/ucontext.h glibc/sysdeps/unix/sysv/linux/vax/sys/ucontext.h +--- glibc-clean/sysdeps/unix/sysv/linux/vax/sys/ucontext.h 1970-01-01 01:00:00.000000000 +0100 ++++ glibc/sysdeps/unix/sysv/linux/vax/sys/ucontext.h 2005-12-14 19:51:00.000000000 +0100 +@@ -0,0 +1,83 @@ ++/* Copyright (C) 1997, 1998, 2000 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 Library General Public License as ++ published by the Free Software Foundation; either version 2 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 ++ Library General Public License for more details. ++ ++ You should have received a copy of the GNU Library General Public ++ License along with the GNU C Library; see the file COPYING.LIB. If not, ++ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ Boston, MA 02111-1307, USA. */ ++ ++/* Don't rely on this, the interface is currently messed up and may need to ++ be broken to be fixed. */ ++#ifndef _SYS_UCONTEXT_H ++#define _SYS_UCONTEXT_H 1 ++ ++#include <features.h> ++#include <signal.h> ++ ++/* We need the signal context definitions even if they are not used ++ included in <signal.h>. */ ++#include <bits/sigcontext.h> ++ ++ ++/* Type for general register. */ ++typedef unsigned long int greg_t; ++ ++/* Number of general registers. */ ++#define NGREG 16 ++/* This was 16, but there are no specific FP regs on a VAX... */ ++#define NFPREG 0 ++ ++/* Container for all general registers. */ ++/* gregset_t must be an array. The below declared array corresponds to: ++typedef struct gregset { ++ greg_t g_regs[32]; ++ greg_t g_hi; ++ greg_t g_lo; ++ greg_t g_pad[3]; ++} gregset_t; */ ++typedef greg_t gregset_t[NGREG]; ++ ++/* Container for all FPU registers. */ ++typedef struct fpregset { ++#if 0 ++ union { ++ double fp_dregs[16]; ++ struct { ++ float _fp_fregs; ++ unsigned int _fp_pad; ++ } fp_fregs[16]; ++ } fp_r; ++ unsigned int fp_csr; ++ unsigned int fp_pad; ++#endif ++} fpregset_t; ++ ++ ++/* Context to describe whole processor state. */ ++typedef struct ++ { ++ gregset_t gregs; ++ fpregset_t fpregs; ++ } mcontext_t; ++ ++/* Userlevel context. */ ++typedef struct ucontext ++ { ++ unsigned long int uc_flags; ++ struct ucontext *uc_link; ++ stack_t uc_stack; ++ mcontext_t uc_mcontext; ++ __sigset_t uc_sigmask; ++ } ucontext_t; ++ ++#endif /* sys/ucontext.h */ diff -Nurp glibc-clean/sysdeps/unix/sysv/linux/vax/sysdep.h glibc/sysdeps/unix/sysv/linux/vax/sysdep.h --- glibc-clean/sysdeps/unix/sysv/linux/vax/sysdep.h 1970-01-01 01:00:00.000000000 +0100 +++ glibc/sysdeps/unix/sysv/linux/vax/sysdep.h 2005-12-14 18:26:24.000000000 +0100 @@ -447,6 +676,41 @@ + const char *symname); +__END_DECLS + +diff -Nurp glibc-clean/sysdeps/vax/bits/setjmp.h glibc/sysdeps/vax/bits/setjmp.h +--- glibc-clean/sysdeps/vax/bits/setjmp.h 1997-11-26 05:14:44.000000000 +0100 ++++ glibc/sysdeps/vax/bits/setjmp.h 2005-12-14 19:38:28.000000000 +0100 +@@ -1,11 +1,27 @@ +-/* Define the machine-dependent type `jmp_buf'. Vax version. */ ++/* Define the machine-dependent type `jmp_buf'. VAX version. */ + +-#ifndef _SETJMP_H ++#if !defined _SETJMP_H && !defined _PTHREAD_H + # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead." + #endif + + typedef struct + { +- PTR __fp; +- PTR __pc; ++ /* VAX CPUs have 16 registers. R0..R11 are used as general purpose ++ registers (R0/R1 are used to return values, though), the rest is ++ AP/FP/SP/PC. We don't save R0 since it'll be set by longjmp(). */ ++ unsigned long _r1; ++ unsigned long _r2; ++ unsigned long _r3; ++ unsigned long _r4; ++ unsigned long _r5; ++ unsigned long _r6; ++ unsigned long _r7; ++ unsigned long _r8; ++ unsigned long _r9; ++ unsigned long _r10; ++ unsigned long _r11; ++ unsigned long _ap; ++ unsigned long _fp; ++ unsigned long _sp; ++ unsigned long _pc; + } __jmp_buf[1]; diff -Nurp glibc-clean/sysdeps/vax/dl-machine.h glibc/sysdeps/vax/dl-machine.h --- glibc-clean/sysdeps/vax/dl-machine.h 1970-01-01 01:00:00.000000000 +0100 +++ glibc/sysdeps/vax/dl-machine.h 2005-12-13 20:05:26.000000000 +0100 @@ -809,6 +1073,34 @@ +} + +#endif /* RESOLVE */ +diff -Nurp glibc-clean/sysdeps/vax/fpu/Makefile glibc/sysdeps/vax/fpu/Makefile +--- glibc-clean/sysdeps/vax/fpu/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ glibc/sysdeps/vax/fpu/Makefile 2005-12-14 20:52:27.000000000 +0100 +@@ -0,0 +1,8 @@ ++ifeq ($(subdir),math) ++ifndef math-twiddled ++ ++# Avoid twiddling in generic/Makefile. ++math-twiddled := t ++ ++endif ++endif +diff -Nurp glibc-clean/sysdeps/vax/fpu/s_isinf.c glibc/sysdeps/vax/fpu/s_isinf.c +--- glibc-clean/sysdeps/vax/fpu/s_isinf.c 1970-01-01 01:00:00.000000000 +0100 ++++ glibc/sysdeps/vax/fpu/s_isinf.c 2005-12-14 20:47:10.000000000 +0100 +@@ -0,0 +1,12 @@ ++#include "math.h" ++#include "math_private.h" ++ ++int ++__isinf (double x) ++{ ++ /* There's no \inf on VAX. */ ++ return 0; ++} ++hidden_def (__isinf) ++weak_alias (__isinf, isinf) ++ diff -Nurp glibc-clean/sysdeps/vax/Implies glibc/sysdeps/vax/Implies --- glibc-clean/sysdeps/vax/Implies 1970-01-01 01:00:00.000000000 +0100 +++ glibc/sysdeps/vax/Implies 2005-12-12 19:49:25.000000000 +0100 |