This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[crosstool-ng] patches for glibc-ports-2.6.1


Hello,

I'm testing crosstool-ng to generate gcc for powerpc 405 softfloat.

Current svn 1104 <http://ymorin.is-a-geek.org/websvn/listing.php?repname=crosstool-NG&path=%2F&rev=1104&sc=1>, glibc-port-2.6.1 patches are broken.
Here is a working version of 120-lll_lock_t.patch (problem of path)
I added also a patch for glibc and powerpc nofpu: 300-powerpc-softfloat.patch
This patch (ref: http://sources.redhat.com/ml/libc-ports/2007-06/msg00000.html) is working on glibc 2.5 and 2.6.1, but is useless for 2.7.


With this patch it compiles fine.

Regards,

Julien


Propagate the patch from base glibc that changes lll_lock_t into a plain int,
without using a typedef, as glibc-2.7 now does.

diff -durN glibc-2.6.1.orig/glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.6.1/glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
--- glibc-2.6.1.orig/glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h	2006-08-04 20:56:15.000000000 +0200
+++ glibc-2.6.1/glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h	2008-07-28 23:49:29.000000000 +0200
@@ -260,9 +260,6 @@
 /* Our internal lock implementation is identical to the binary-compatible
    mutex implementation. */
 
-/* Type for lock object.  */
-typedef int lll_lock_t;
-
 /* Initializers for lock.  */
 #define LLL_LOCK_INITIALIZER		(0)
 #define LLL_LOCK_INITIALIZER_LOCKED	(1)
diff -durN glibc-2.6.1.orig/glibc-ports-2.6.1/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c glibc-2.6.1/glibc-ports-2.6.1/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c
--- glibc-2.6.1.orig/glibc-ports-2.6.1/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c	2006-07-14 15:51:24.000000000 +0200
+++ glibc-2.6.1/glibc-ports-2.6.1/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c	2008-07-28 23:49:56.000000000 +0200
@@ -25,7 +25,7 @@
 
 
 void
-__lll_lock_wait (lll_lock_t *futex)
+__lll_lock_wait (int *futex)
 {
   do
     {
@@ -38,7 +38,7 @@
 
 
 int
-__lll_timedlock_wait (lll_lock_t *futex, const struct timespec *abstime)
+__lll_timedlock_wait (int *futex, const struct timespec *abstime)
 {
   /* Reject invalid timeouts.  */
   if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
@@ -78,7 +78,7 @@
 /* These don't get included in libc.so  */
 #ifdef IS_IN_libpthread
 int
-lll_unlock_wake_cb (lll_lock_t *futex)
+lll_unlock_wake_cb (int *futex)
 {
   int val = atomic_exchange_rel (futex, 0);
 
diff -durN glibc-2.6.1.orig/glibc-ports-2.6.1/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h glibc-2.6.1/glibc-ports-2.6.1/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
--- glibc-2.6.1.orig/glibc-ports-2.6.1/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h	2006-09-07 18:34:43.000000000 +0200
+++ glibc-2.6.1/glibc-ports-2.6.1/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h	2008-07-28 23:50:54.000000000 +0200
@@ -43,11 +43,6 @@
 /* Initialize locks to zero.  */
 #define LLL_MUTEX_LOCK_INITIALIZER (0)
 
-
-/* Type for lock object.  */
-typedef int lll_lock_t;
-
-
 #define lll_futex_wait(futexp, val) \
   ({									      \
     INTERNAL_SYSCALL_DECL (__err);					      \
@@ -108,7 +103,7 @@
   })
 
 static inline int __attribute__((always_inline))
-__lll_mutex_trylock(lll_lock_t *futex)
+__lll_mutex_trylock(int *futex)
 {
   return atomic_compare_and_exchange_val_acq (futex, 1, 0) != 0;
 }
@@ -124,17 +119,17 @@
 
 
 static inline int __attribute__((always_inline))
-__lll_mutex_cond_trylock(lll_lock_t *futex)
+__lll_mutex_cond_trylock(int *futex)
 {
   return atomic_compare_and_exchange_val_acq (futex, 2, 0) != 0;
 }
 #define lll_mutex_cond_trylock(lock)	__lll_mutex_cond_trylock (&(lock))
 
 
-extern void __lll_lock_wait (lll_lock_t *futex) attribute_hidden;
+extern void __lll_lock_wait (int *futex) attribute_hidden;
 
 static inline void __attribute__((always_inline))
-__lll_mutex_lock(lll_lock_t *futex)
+__lll_mutex_lock(int *futex)
 {
   if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0)
     __lll_lock_wait (futex);
@@ -155,7 +150,7 @@
   __lll_robust_mutex_lock (&(futex), id)
 
 static inline void __attribute__ ((always_inline))
-__lll_mutex_cond_lock (lll_lock_t *futex)
+__lll_mutex_cond_lock (int *futex)
 {
   if (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0)
     __lll_lock_wait (futex);
@@ -167,13 +162,13 @@
   __lll_robust_mutex_lock (&(futex), (id) | FUTEX_WAITERS)
 
 
-extern int __lll_timedlock_wait (lll_lock_t *futex, const struct timespec *)
+extern int __lll_timedlock_wait (int *futex, const struct timespec *)
 	attribute_hidden;
 extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *)
 	attribute_hidden;
 
 static inline int __attribute__ ((always_inline))
-__lll_mutex_timedlock (lll_lock_t *futex, const struct timespec *abstime)
+__lll_mutex_timedlock (int *futex, const struct timespec *abstime)
 {
   int result = 0;
   if (atomic_compare_and_exchange_bool_acq (futex, 1, 0) != 0)
@@ -197,7 +192,7 @@
 
 
 static inline void __attribute__ ((always_inline))
-__lll_mutex_unlock (lll_lock_t *futex)
+__lll_mutex_unlock (int *futex)
 {
   int val = atomic_exchange_rel (futex, 0);
   if (__builtin_expect (val > 1, 0))
@@ -218,7 +213,7 @@
 
 
 static inline void __attribute__ ((always_inline))
-__lll_mutex_unlock_force (lll_lock_t *futex)
+__lll_mutex_unlock_force (int *futex)
 {
   (void) atomic_exchange_rel (futex, 0);
   lll_futex_wake (futex, 1);
@@ -239,7 +234,7 @@
 #define THREAD_INIT_LOCK(PD, LOCK) \
   (PD)->LOCK = LLL_LOCK_INITIALIZER
 
-extern int lll_unlock_wake_cb (lll_lock_t *__futex) attribute_hidden;
+extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
 
 /* The states of a lock are:
     0  -  untaken
diff -durN glibc-2.6.1.orig/glibc-ports-2.6.1/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h glibc-2.6.1/glibc-ports-2.6.1/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
--- glibc-2.6.1.orig/glibc-ports-2.6.1/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h	2006-08-04 20:54:56.000000000 +0200
+++ glibc-2.6.1/glibc-ports-2.6.1/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h	2008-07-28 23:51:14.000000000 +0200
@@ -227,9 +227,6 @@
 /* Our internal lock implementation is identical to the binary-compatible
    mutex implementation. */
 
-/* Type for lock object.  */
-typedef int lll_lock_t;
-
 /* Initializers for lock.  */
 #define LLL_LOCK_INITIALIZER		(0)
 #define LLL_LOCK_INITIALIZER_LOCKED	(1)
2007-06-01  Steven Munroe  <sjmunroe@us.ibm.com>

	* sysdeps/powerpc/nofpu/fe_mask.c: New File.
	* sysdeps/powerpc/nofpu/fe_nomask.c: New File.


diff -urN glibc-2.6.1.orig/glibc-ports-2.6.1/sysdeps/powerpc/nofpu/fe_mask.c glibc-2.6.1/glibc-ports-2.6.1/sysdeps/powerpc/nofpu/fe_mask.c
--- glibc-2.6.1.orig/glibc-ports-2.6.1/sysdeps/powerpc/nofpu/fe_mask.c	Wed Dec 31 18:00:00 1969
+++ glibc-2.6.1/glibc-ports-2.6.1/sysdeps/powerpc/nofpu/fe_mask.c	Thu May 24 14:18:13 2007
@@ -0,0 +1,2 @@
+/* empty implementation for soft-fp */
+
diff -urN glibc-2.6.1.orig/glibc-ports-2.6.1/sysdeps/powerpc/nofpu/fe_nomask.c glibc-2.6.1/glibc-ports-2.6.1/sysdeps/powerpc/nofpu/fe_nomask.c
--- glibc-2.6.1.orig/glibc-ports-2.6.1/sysdeps/powerpc/nofpu/fe_nomask.c	Wed Dec 31 18:00:00 1969
+++ glibc-2.6.1/glibc-ports-2.6.1/sysdeps/powerpc/nofpu/fe_nomask.c	Thu May 24 14:18:30 2007
@@ -0,0 +1,2 @@
+/* empty implementation for soft-fp */
+


--
For unsubscribe information see http://sourceware.org/lists.html#faq

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]