uclibc: Upgrade 0.9.29 -> 0.9.30.1 (from OE.dev) and massively cleanup the recipes, using install step for staging

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
Richard Purdie 2009-11-17 16:00:20 +00:00
parent 2ce975dba2
commit 0d816ac986
43 changed files with 1733 additions and 650 deletions

View File

@ -1,19 +0,0 @@
ARMV5 can use STRD and LDRD access instructions but these accesses need to be
8 byte aligned. The dynamic linker's malloc needs to match this so structures
become 8 byte aligned to void unaligned accesses.
RP - 14/02/2008
Index: uClibc-0.9.29/ldso/ldso/arm/dl-sysdep.h
===================================================================
--- uClibc-0.9.29.orig/ldso/ldso/arm/dl-sysdep.h 2008-02-14 00:58:12.000000000 +0000
+++ uClibc-0.9.29/ldso/ldso/arm/dl-sysdep.h 2008-02-14 00:59:19.000000000 +0000
@@ -15,6 +15,8 @@
GOT_BASE[1] = (unsigned long) MODULE; \
}
+#define DL_MALLOC_ALIGN 8 /* EABI needs 8 byte alignment for STRD LDRD*/
+
static inline unsigned long arm_modulus(unsigned long m, unsigned long p)
{
unsigned long i,t,inc;

View File

@ -1,70 +0,0 @@
#
# Automatically generated make config: don't edit
# Sun May 13 11:16:02 2007
#
# TARGET_alpha is not set
TARGET_arm=y
# TARGET_bfin is not set
# TARGET_cris is not set
# TARGET_e1 is not set
# TARGET_frv is not set
# TARGET_h8300 is not set
# TARGET_hppa is not set
# TARGET_i386 is not set
# TARGET_i960 is not set
# TARGET_ia64 is not set
# TARGET_m68k is not set
# TARGET_microblaze is not set
# TARGET_mips is not set
# TARGET_nios is not set
# TARGET_nios2 is not set
# TARGET_powerpc is not set
# TARGET_sh is not set
# TARGET_sh64 is not set
# TARGET_sparc is not set
# TARGET_v850 is not set
# TARGET_vax is not set
# TARGET_x86_64 is not set
#
# Target Architecture Features and Options
#
TARGET_ARCH="arm"
FORCE_OPTIONS_FOR_ARCH=y
# CONFIG_ARM_OABI is not set
CONFIG_ARM_EABI=y
USE_BX=y
# CONFIG_GENERIC_ARM is not set
# CONFIG_ARM610 is not set
# CONFIG_ARM710 is not set
# CONFIG_ARM7TDMI is not set
# CONFIG_ARM720T is not set
# CONFIG_ARM920T is not set
# CONFIG_ARM922T is not set
# CONFIG_ARM926T is not set
# CONFIG_ARM10T is not set
# CONFIG_ARM1136JF_S is not set
# CONFIG_ARM1176JZ_S is not set
# CONFIG_ARM1176JZF_S is not set
# CONFIG_ARM_SA110 is not set
# CONFIG_ARM_SA1100 is not set
CONFIG_ARM_XSCALE=y
# CONFIG_ARM_IWMMXT is not set
TARGET_SUBARCH=""
#
# Using ELF file format
#
ARCH_ANY_ENDIAN=y
ARCH_LITTLE_ENDIAN=y
# ARCH_WANTS_BIG_ENDIAN is not set
ARCH_WANTS_LITTLE_ENDIAN=y
ARCH_HAS_MMU=y
ARCH_USE_MMU=y
UCLIBC_HAS_FLOATS=y
# UCLIBC_HAS_FPU is not set
UCLIBC_HAS_SOFT_FLOAT=y
DO_C99_MATH=y
KERNEL_HEADERS="/data/build/koen/OE/build/tmp/angstrom/cross/arm-angstrom-linux-uclibcgnueabi/include"
HAVE_DOT_CONFIG=y

View File

@ -1,70 +0,0 @@
#
# Automatically generated make config: don't edit
# Sun May 13 11:16:02 2007
#
# TARGET_alpha is not set
TARGET_arm=y
# TARGET_bfin is not set
# TARGET_cris is not set
# TARGET_e1 is not set
# TARGET_frv is not set
# TARGET_h8300 is not set
# TARGET_hppa is not set
# TARGET_i386 is not set
# TARGET_i960 is not set
# TARGET_ia64 is not set
# TARGET_m68k is not set
# TARGET_microblaze is not set
# TARGET_mips is not set
# TARGET_nios is not set
# TARGET_nios2 is not set
# TARGET_powerpc is not set
# TARGET_sh is not set
# TARGET_sh64 is not set
# TARGET_sparc is not set
# TARGET_v850 is not set
# TARGET_vax is not set
# TARGET_x86_64 is not set
#
# Target Architecture Features and Options
#
TARGET_ARCH="arm"
FORCE_OPTIONS_FOR_ARCH=y
# CONFIG_ARM_OABI is not set
CONFIG_ARM_EABI=y
USE_BX=y
# CONFIG_GENERIC_ARM is not set
# CONFIG_ARM610 is not set
# CONFIG_ARM710 is not set
# CONFIG_ARM7TDMI is not set
# CONFIG_ARM720T is not set
# CONFIG_ARM920T is not set
# CONFIG_ARM922T is not set
# CONFIG_ARM926T is not set
# CONFIG_ARM10T is not set
# CONFIG_ARM1136JF_S is not set
# CONFIG_ARM1176JZ_S is not set
# CONFIG_ARM1176JZF_S is not set
# CONFIG_ARM_SA110 is not set
# CONFIG_ARM_SA1100 is not set
CONFIG_ARM_XSCALE=y
# CONFIG_ARM_IWMMXT is not set
TARGET_SUBARCH=""
#
# Using ELF file format
#
ARCH_ANY_ENDIAN=y
ARCH_LITTLE_ENDIAN=y
# ARCH_WANTS_BIG_ENDIAN is not set
ARCH_WANTS_LITTLE_ENDIAN=y
ARCH_HAS_MMU=y
ARCH_USE_MMU=y
UCLIBC_HAS_FLOATS=y
# UCLIBC_HAS_FPU is not set
UCLIBC_HAS_SOFT_FLOAT=y
DO_C99_MATH=y
KERNEL_HEADERS="/data/build/koen/OE/build/tmp/angstrom/cross/arm-angstrom-linux-uclibcgnueabi/include"
HAVE_DOT_CONFIG=y

View File

@ -1,91 +0,0 @@
--- uClibc-0.9.29.oorig/test/mmap/mmap2.c (revision 0)
+++ uClibc-0.9.29/test/mmap/mmap2.c (revision 18616)
@@ -0,0 +1,41 @@
+/* When trying to map /dev/mem with offset 0xFFFFF000 on the ARM platform, mmap
+ * returns -EOVERFLOW.
+ *
+ * Since off_t is defined as a long int and the sign bit is set in the address,
+ * the shift operation shifts in ones instead of zeroes
+ * from the left. This results the offset sent to the kernel function becomes
+ * 0xFFFFFFFF instead of 0x000FFFFF with MMAP2_PAGE_SHIFT set to 12.
+ */
+
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+#define FATAL do { fprintf(stderr, "Error at line %d, file %s (%d) [%s]\n", \
+ __LINE__, __FILE__, errno, strerror(errno)); exit(1); } while(0)
+
+#define MAP_SIZE 4096UL
+#define MAP_MASK (MAP_SIZE - 1)
+
+int main(int argc, char **argv) {
+ void* map_base = 0;
+ int fd;
+ off_t target = 0xfffff000;
+ if((fd = open("/dev/mem", O_RDWR | O_SYNC)) == -1) FATAL;
+ printf("/dev/mem opened.\n");
+ fflush(stdout);
+
+ /* Map one page */
+ map_base = mmap(0, MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED,
+ fd, target & ~MAP_MASK);
+ if(map_base == (void *) -1) FATAL;
+ printf("Memory mapped at address %p.\n", map_base);
+ fflush(stdout);
+ if(munmap(map_base, MAP_SIZE) == -1) FATAL;
+ close(fd);
+ return 0;
+}
--- uClibc-0.9.29.oorig/libc/sysdeps/linux/arm/mmap.c (revision 18615)
+++ uClibc-0.9.29/libc/sysdeps/linux/arm/mmap.c (revision 18616)
@@ -27,7 +27,6 @@ __ptr_t mmap(__ptr_t addr, size_t len, i
#elif defined (__NR_mmap2)
#define __NR__mmap __NR_mmap2
-
#ifndef MMAP2_PAGE_SHIFT
# define MMAP2_PAGE_SHIFT 12
#endif
@@ -39,9 +38,17 @@ __ptr_t mmap(__ptr_t addr, size_t len, i
{
/* check if offset is page aligned */
if (offset & ((1 << MMAP2_PAGE_SHIFT) - 1))
+ {
+ __set_errno(EINVAL);
return MAP_FAILED;
+ }
+#ifdef __USE_FILE_OFFSET64
+ return (__ptr_t) _mmap (addr, len, prot, flags,
+ fd,((__u_quad_t) offset >> MMAP2_PAGE_SHIFT));
+#else
return (__ptr_t) _mmap (addr, len, prot, flags,
- fd,(off_t) (offset >> MMAP2_PAGE_SHIFT));
+ fd,((__u_long) offset >> MMAP2_PAGE_SHIFT));
+#endif
}
#elif defined (__NR_mmap)
# define __NR__mmap __NR_mmap
--- uClibc-0.9.29.oorig/libc/sysdeps/linux/common/mmap64.c (revision 18615)
+++ uClibc-0.9.29/libc/sysdeps/linux/common/mmap64.c (revision 18616)
@@ -58,8 +58,13 @@ __ptr_t mmap64(__ptr_t addr, size_t len,
__set_errno(EINVAL);
return MAP_FAILED;
}
-
- return __syscall_mmap2(addr, len, prot, flags, fd, (off_t) (offset >> MMAP2_PAGE_SHIFT));
+#ifdef __USE_FILE_OFFSET64
+ return __syscall_mmap2(addr, len, prot, flags,
+ fd,((__u_quad_t)offset >> MMAP2_PAGE_SHIFT));
+#else
+ return __syscall_mmap2(addr, len, prot, flags,
+ fd,((__u_long)offset >> MMAP2_PAGE_SHIFT));
+#endif
}
# endif

View File

@ -1,53 +0,0 @@
diff -ur uClibc-0.9.29/libc/sysdeps/linux/common/sched_getaffinity.c uClibc-0.9.29-patched/libc/sysdeps/linux/common/sched_getaffinity.c
--- uClibc-0.9.29/libc/sysdeps/linux/common/sched_getaffinity.c 2007-02-12 16:52:32.000000000 -0600
+++ uClibc-0.9.29-patched/libc/sysdeps/linux/common/sched_getaffinity.c 2007-05-09 18:05:09.397411811 -0500
@@ -29,6 +29,7 @@
#include <sys/param.h>
#include <sys/types.h>
+#ifdef __NR_sched_getaffinity
libc_hidden_proto(memset)
#define __NR___syscall_sched_getaffinity __NR_sched_getaffinity
@@ -48,5 +49,15 @@
}
return res;
}
+#else
+/*
+int sched_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *cpuset)
+{
+ __set_errno(ENOSYS);
+ return -1;
+}
+*/
#endif
#endif
+
+#endif
diff -ur uClibc-0.9.29/libc/sysdeps/linux/common/sched_setaffinity.c uClibc-0.9.29-patched/libc/sysdeps/linux/common/sched_setaffinity.c
--- uClibc-0.9.29/libc/sysdeps/linux/common/sched_setaffinity.c 2007-02-12 16:52:32.000000000 -0600
+++ uClibc-0.9.29-patched/libc/sysdeps/linux/common/sched_setaffinity.c 2007-05-09 18:05:09.397411811 -0500
@@ -31,6 +31,7 @@
#include <sys/types.h>
#include <alloca.h>
+#ifdef __NR_sched_setaffinity
libc_hidden_proto(getpid)
#define __NR___syscall_sched_setaffinity __NR_sched_setaffinity
@@ -74,5 +75,14 @@
return INLINE_SYSCALL (sched_setaffinity, 3, pid, cpusetsize, cpuset);
}
+#else
+/*
+int sched_setaffinity(pid_t pid, size_t cpusetsize, const cpu_set_t *cpuset)
+{
+ __set_errno(ENOSYS);
+ return -1;
+}
+*/
+#endif
#endif
#endif

View File

@ -1,12 +0,0 @@
diff -ur uClibc-0.9.29/libc/inet/resolv.c uClibc-0.9.29-patched/libc/inet/resolv.c
--- uClibc-0.9.29/libc/inet/resolv.c 2007-04-23 12:01:05.000000000 -0500
+++ uClibc-0.9.29-patched/libc/inet/resolv.c 2007-05-09 18:05:33.563404419 -0500
@@ -1700,7 +1700,7 @@
int gethostent_r(struct hostent *result_buf, char *buf, size_t buflen,
struct hostent **result, int *h_errnop)
{
- int ret;
+ int ret = HOST_NOT_FOUND;
__UCLIBC_MUTEX_LOCK(mylock);
if (__gethostent_fp == NULL) {

View File

@ -1,51 +0,0 @@
Index: uClibc/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h
===================================================================
--- uClibc/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h (revision 18898)
+++ uClibc/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h (working copy)
@@ -42,6 +42,8 @@
/* define if target supports IEEE signed zero floats */
#define __UCLIBC_HAVE_SIGNED_ZERO__
+#if defined _LIBC
#define internal_function __attribute__ ((regparm (3), stdcall))
+#endif
#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
Index: uClibc/include/libc-symbols.h
===================================================================
--- uClibc/include/libc-symbols.h (revision 18898)
+++ uClibc/include/libc-symbols.h (working copy)
@@ -22,6 +22,16 @@
#ifndef _LIBC_SYMBOLS_H
#define _LIBC_SYMBOLS_H 1
+/* This is defined for the compilation of all C library code. features.h
+ tests this to avoid inclusion of stubs.h while compiling the library,
+ before stubs.h has been generated. Some library code that is shared
+ with other packages also tests this symbol to see if it is being
+ compiled as part of the C library. We must define this before including
+ config.h, because it makes some definitions conditional on whether libc
+ itself is being compiled, or just some generator program. */
+#define _LIBC 1
+
+
/* This file's macros are included implicitly in the compilation of every
file in the C library by -imacros.
@@ -40,16 +50,6 @@
#include <bits/uClibc_arch_features.h>
-
-/* This is defined for the compilation of all C library code. features.h
- tests this to avoid inclusion of stubs.h while compiling the library,
- before stubs.h has been generated. Some library code that is shared
- with other packages also tests this symbol to see if it is being
- compiled as part of the C library. We must define this before including
- config.h, because it makes some definitions conditional on whether libc
- itself is being compiled, or just some generator program. */
-#define _LIBC 1
-
/* Enable declarations of GNU extensions, since we are compiling them. */
#define _GNU_SOURCE 1

View File

@ -1,86 +0,0 @@
diff -urN uClibc-0.9.29-0rig/include/assert.h uClibc-0.9.29/include/assert.h
--- uClibc-0.9.29-0rig/include/assert.h 2005-11-03 23:42:46.000000000 +0100
+++ uClibc-0.9.29/include/assert.h 2007-08-13 19:10:57.000000000 +0200
@@ -31,7 +31,7 @@
#define _ASSERT_H 1
#include <features.h>
-#if defined __cplusplus && __GNUC_PREREQ (2,95)
+#if defined __cplusplus && __GNUC_PREREQ(2,95)
# define __ASSERT_VOID_CAST static_cast<void>
#else
# define __ASSERT_VOID_CAST (void)
@@ -59,13 +59,17 @@
(__ASSERT_VOID_CAST ((expr) ? 0 : \
(__assert (__STRING(expr), __FILE__, __LINE__, \
__ASSERT_FUNCTION), 0)))
-
+
+/* Define some temporaries to workaround tinyx makedepend bug */
+#define __GNUC_PREREQ_2_6 __GNUC_PREREQ(2, 6)
+#define __GNUC_PREREQ_2_4 __GNUC_PREREQ(2, 4)
/* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__'
which contains the name of the function currently being defined.
This is broken in G++ before version 2.6.
C9x has a similar variable called __func__, but prefer the GCC one since
it demangles C++ function names. */
-# if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2, 4)
+
+# if defined __cplusplus ? __GNUC_PREREQ_2_6 : __GNUC_PREREQ_2_4
# define __ASSERT_FUNCTION __PRETTY_FUNCTION__
# else
# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
diff -urN uClibc-0.9.29-0rig/include/complex.h uClibc-0.9.29/include/complex.h
--- uClibc-0.9.29-0rig/include/complex.h 2002-05-09 10:15:21.000000000 +0200
+++ uClibc-0.9.29/include/complex.h 2007-08-13 17:55:29.000000000 +0200
@@ -33,7 +33,7 @@
/* We might need to add support for more compilers here. But since ISO
C99 is out hopefully all maintained compilers will soon provide the data
types `float complex' and `double complex'. */
-#if __GNUC_PREREQ (2, 7) && !__GNUC_PREREQ (2, 97)
+#if __GNUC_PREREQ(2, 7) && !__GNUC_PREREQ(2, 97)
# define _Complex __complex__
#endif
diff -urN uClibc-0.9.29-0rig/include/features.h uClibc-0.9.29/include/features.h
--- uClibc-0.9.29-0rig/include/features.h 2006-11-29 22:10:04.000000000 +0100
+++ uClibc-0.9.29/include/features.h 2007-08-13 17:55:51.000000000 +0200
@@ -143,7 +143,7 @@
/* Convenience macros to test the versions of glibc and gcc.
Use them like this:
- #if __GNUC_PREREQ (2,8)
+ #if __GNUC_PREREQ(2,8)
... code requiring gcc 2.8 or later ...
#endif
Note - they won't work for gcc1 or glibc1, since the _MINOR macros
@@ -297,7 +297,7 @@
/* uClibc does not support _FORTIFY_SOURCE */
#undef _FORTIFY_SOURCE
#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \
- && __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
+ && __GNUC_PREREQ(4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
# if _FORTIFY_SOURCE > 1
# define __USE_FORTIFY_LEVEL 2
# else
@@ -366,7 +366,7 @@
#endif /* !ASSEMBLER */
/* Decide whether we can define 'extern inline' functions in headers. */
-#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \
+#if __GNUC_PREREQ(2, 7) && defined __OPTIMIZE__ \
&& !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__
# define __USE_EXTERN_INLINES 1
#endif
diff -urN uClibc-0.9.29-0rig/include/tgmath.h uClibc-0.9.29/include/tgmath.h
--- uClibc-0.9.29-0rig/include/tgmath.h 2002-05-09 10:15:21.000000000 +0200
+++ uClibc-0.9.29/include/tgmath.h 2007-08-13 17:56:17.000000000 +0200
@@ -34,7 +34,7 @@
do not try this for now and instead concentrate only on GNU CC. Once
we have more information support for other compilers might follow. */
-#if __GNUC_PREREQ (2, 7)
+#if __GNUC_PREREQ(2, 7)
# ifdef __NO_LONG_DOUBLE_MATH
# define __tgml(fct) fct

View File

@ -0,0 +1,393 @@
From c190f738e1b0e87658ea5f86c057fb147dc19428 Mon Sep 17 00:00:00 2001
From: Carmelo Amoroso <carmelo.amoroso@st.com>
Date: Thu, 5 Mar 2009 13:28:55 +0000
Subject: [PATCH] Use __always_inline instead of __inline__
---
ldso/ldso/arm/dl-sysdep.h | 8 ++++----
ldso/ldso/bfin/dl-sysdep.h | 2 +-
ldso/ldso/cris/dl-sysdep.h | 6 +++---
ldso/ldso/i386/dl-sysdep.h | 10 +++++-----
ldso/ldso/m68k/dl-sysdep.h | 6 +++---
ldso/ldso/mips/dl-sysdep.h | 8 ++++----
ldso/ldso/powerpc/dl-sysdep.h | 8 ++++----
ldso/ldso/sh/dl-sysdep.h | 8 ++++----
ldso/ldso/sh64/dl-sysdep.h | 6 +++---
ldso/ldso/sparc/dl-sysdep.h | 8 ++++----
ldso/ldso/xtensa/dl-sysdep.h | 6 +++---
11 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/ldso/ldso/arm/dl-sysdep.h b/ldso/ldso/arm/dl-sysdep.h
index eea3b98..5191dd7 100644
--- a/ldso/ldso/arm/dl-sysdep.h
+++ b/ldso/ldso/arm/dl-sysdep.h
@@ -15,7 +15,7 @@
GOT_BASE[1] = (unsigned long) MODULE; \
}
-static __inline__ unsigned long arm_modulus(unsigned long m, unsigned long p)
+static __always_inline unsigned long arm_modulus(unsigned long m, unsigned long p)
{
unsigned long i,t,inc;
i=p; t=0;
@@ -67,7 +67,7 @@ unsigned long _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_entry);
first element of the GOT. We used to use the PIC register to do this
without a constant pool reference, but GCC 4.2 will use a pseudo-register
for the PIC base, so it may not be in r10. */
-static __inline__ Elf32_Addr __attribute__ ((unused))
+static __always_inline Elf32_Addr __attribute__ ((unused))
elf_machine_dynamic (void)
{
Elf32_Addr dynamic;
@@ -99,7 +99,7 @@ elf_machine_dynamic (void)
}
/* Return the run-time load address of the shared object. */
-static __inline__ Elf32_Addr __attribute__ ((unused))
+static __always_inline Elf32_Addr __attribute__ ((unused))
elf_machine_load_address (void)
{
extern void __dl_start __asm__ ("_dl_start");
@@ -123,7 +123,7 @@ elf_machine_load_address (void)
return pcrel_addr - got_addr;
}
-static __inline__ void
+static __always_inline void
elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
Elf32_Word relative_count)
{
diff --git a/ldso/ldso/bfin/dl-sysdep.h b/ldso/ldso/bfin/dl-sysdep.h
index 3c88da4..f0c5129 100644
--- a/ldso/ldso/bfin/dl-sysdep.h
+++ b/ldso/ldso/bfin/dl-sysdep.h
@@ -210,7 +210,7 @@ while (0)
#endif
#include <elf.h>
-static __inline__ void
+static __always_inline void
elf_machine_relative (DL_LOADADDR_TYPE load_off, const Elf32_Addr rel_addr,
Elf32_Word relative_count)
{
diff --git a/ldso/ldso/cris/dl-sysdep.h b/ldso/ldso/cris/dl-sysdep.h
index ffb763a..e454c10 100644
--- a/ldso/ldso/cris/dl-sysdep.h
+++ b/ldso/ldso/cris/dl-sysdep.h
@@ -37,7 +37,7 @@ extern unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entr
|| ((type) == R_CRIS_GLOB_DAT)) * ELF_RTYPE_CLASS_PLT) \
| (((type) == R_CRIS_COPY) * ELF_RTYPE_CLASS_COPY))
-static __inline__ Elf32_Addr
+static __always_inline Elf32_Addr
elf_machine_dynamic(void)
{
/* Don't just set this to an asm variable "r0" since that's not logical
@@ -59,7 +59,7 @@ elf_machine_dynamic(void)
there's some other symbol we could use, that we don't *have* to force a
GOT entry for. */
-static __inline__ Elf32_Addr
+static __always_inline Elf32_Addr
elf_machine_load_address(void)
{
Elf32_Addr gotaddr_diff;
@@ -93,7 +93,7 @@ elf_machine_load_address(void)
return gotaddr_diff;
}
-static __inline__ void
+static __always_inline void
elf_machine_relative(Elf32_Addr load_off, const Elf32_Addr rel_addr,
Elf32_Word relative_count)
{
diff --git a/ldso/ldso/i386/dl-sysdep.h b/ldso/ldso/i386/dl-sysdep.h
index 77fa372..6e84861 100644
--- a/ldso/ldso/i386/dl-sysdep.h
+++ b/ldso/ldso/i386/dl-sysdep.h
@@ -37,8 +37,8 @@ extern unsigned long _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_ent
/* Return the link-time address of _DYNAMIC. Conveniently, this is the
first element of the GOT. This must be inlined in a function which
uses global data. */
-static __inline__ Elf32_Addr elf_machine_dynamic (void) attribute_unused;
-static __inline__ Elf32_Addr
+static __always_inline Elf32_Addr elf_machine_dynamic (void) attribute_unused;
+static __always_inline Elf32_Addr
elf_machine_dynamic (void)
{
register Elf32_Addr *got __asm__ ("%ebx");
@@ -47,8 +47,8 @@ elf_machine_dynamic (void)
/* Return the run-time load address of the shared object. */
-static __inline__ Elf32_Addr elf_machine_load_address (void) attribute_unused;
-static __inline__ Elf32_Addr
+static __always_inline Elf32_Addr elf_machine_load_address (void) attribute_unused;
+static __always_inline Elf32_Addr
elf_machine_load_address (void)
{
/* It doesn't matter what variable this is, the reference never makes
@@ -61,7 +61,7 @@ elf_machine_load_address (void)
return addr;
}
-static __inline__ void
+static __always_inline void
elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
Elf32_Word relative_count)
{
diff --git a/ldso/ldso/m68k/dl-sysdep.h b/ldso/ldso/m68k/dl-sysdep.h
index 8e26e20..259cb84 100644
--- a/ldso/ldso/m68k/dl-sysdep.h
+++ b/ldso/ldso/m68k/dl-sysdep.h
@@ -39,7 +39,7 @@ extern unsigned long _dl_linux_resolver (struct elf_resolve *, int);
/* Return the link-time address of _DYNAMIC. Conveniently, this is the
first element of the GOT. This must be inlined in a function which
uses global data. */
-static __inline__ Elf32_Addr
+static __always_inline Elf32_Addr
elf_machine_dynamic (void)
{
register Elf32_Addr *got __asm__ ("%a5");
@@ -48,7 +48,7 @@ elf_machine_dynamic (void)
/* Return the run-time load address of the shared object. */
-static __inline__ Elf32_Addr
+static __always_inline Elf32_Addr
elf_machine_load_address (void)
{
Elf32_Addr addr;
@@ -58,7 +58,7 @@ elf_machine_load_address (void)
return addr;
}
-static __inline__ void
+static __always_inline void
elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
Elf32_Word relative_count)
{
diff --git a/ldso/ldso/mips/dl-sysdep.h b/ldso/ldso/mips/dl-sysdep.h
index cf6b28b..30d84fb 100644
--- a/ldso/ldso/mips/dl-sysdep.h
+++ b/ldso/ldso/mips/dl-sysdep.h
@@ -169,7 +169,7 @@ void _dl_perform_mips_global_got_relocations(struct elf_resolve *tpnt, int lazy)
#define OFFSET_GP_GOT 0x7ff0
-static __inline__ ElfW(Addr) *
+static __always_inline ElfW(Addr) *
elf_mips_got_from_gpreg (ElfW(Addr) gpreg)
{
/* FIXME: the offset of gp from GOT may be system-dependent. */
@@ -179,7 +179,7 @@ elf_mips_got_from_gpreg (ElfW(Addr) gpreg)
/* Return the link-time address of _DYNAMIC. Conveniently, this is the
first element of the GOT. This must be inlined in a function which
uses global data. We assume its $gp points to the primary GOT. */
-static __inline__ ElfW(Addr)
+static __always_inline ElfW(Addr)
elf_machine_dynamic (void)
{
register ElfW(Addr) gp __asm__ ("$28");
@@ -198,7 +198,7 @@ elf_machine_dynamic (void)
#endif
/* Return the run-time load address of the shared object. */
-static __inline__ ElfW(Addr)
+static __always_inline ElfW(Addr)
elf_machine_load_address (void)
{
ElfW(Addr) addr;
@@ -214,7 +214,7 @@ elf_machine_load_address (void)
return addr;
}
-static __inline__ void
+static __always_inline void
elf_machine_relative (ElfW(Addr) load_off, const ElfW(Addr) rel_addr,
ElfW(Word) relative_count)
{
diff --git a/ldso/ldso/powerpc/dl-sysdep.h b/ldso/ldso/powerpc/dl-sysdep.h
index fdbf564..f33214c 100644
--- a/ldso/ldso/powerpc/dl-sysdep.h
+++ b/ldso/ldso/powerpc/dl-sysdep.h
@@ -85,7 +85,7 @@ void _dl_init_got(unsigned long *lpnt,struct elf_resolve *tpnt);
#define ELF_MACHINE_PLTREL_OVERLAP 1
/* Return the value of the GOT pointer. */
-static __inline__ Elf32_Addr * __attribute__ ((const))
+static __always_inline Elf32_Addr * __attribute__ ((const))
ppc_got (void)
{
Elf32_Addr *got;
@@ -104,14 +104,14 @@ ppc_got (void)
/* Return the link-time address of _DYNAMIC, stored as
the first value in the GOT. */
-static __inline__ Elf32_Addr __attribute__ ((const))
+static __always_inline Elf32_Addr __attribute__ ((const))
elf_machine_dynamic (void)
{
return *ppc_got();
}
/* Return the run-time load address of the shared object. */
-static __inline__ Elf32_Addr __attribute__ ((const))
+static __always_inline Elf32_Addr __attribute__ ((const))
elf_machine_load_address (void)
{
Elf32_Addr *branchaddr;
@@ -159,7 +159,7 @@ elf_machine_load_address (void)
return runtime_dynamic - elf_machine_dynamic ();
}
-static __inline__ void
+static __always_inline void
elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
Elf32_Word relative_count)
{
diff --git a/ldso/ldso/sh/dl-sysdep.h b/ldso/ldso/sh/dl-sysdep.h
index daedda5..d4fc784 100644
--- a/ldso/ldso/sh/dl-sysdep.h
+++ b/ldso/ldso/sh/dl-sysdep.h
@@ -25,7 +25,7 @@
struct elf_resolve;
extern unsigned long _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_entry);
-static __inline__ unsigned int
+static __always_inline unsigned int
_dl_urem(unsigned int n, unsigned int base)
{
int res;
@@ -95,7 +95,7 @@ _dl_urem(unsigned int n, unsigned int base)
/* Return the link-time address of _DYNAMIC. Conveniently, this is the
first element of the GOT. This must be inlined in a function which
uses global data. */
-static __inline__ Elf32_Addr __attribute__ ((unused))
+static __always_inline Elf32_Addr __attribute__ ((unused))
elf_machine_dynamic (void)
{
register Elf32_Addr *got;
@@ -104,7 +104,7 @@ elf_machine_dynamic (void)
}
/* Return the run-time load address of the shared object. */
-static __inline__ Elf32_Addr __attribute__ ((unused))
+static __always_inline Elf32_Addr __attribute__ ((unused))
elf_machine_load_address (void)
{
Elf32_Addr addr;
@@ -146,7 +146,7 @@ elf_machine_load_address (void)
} \
}
-static __inline__ void
+static __always_inline void
elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
Elf32_Word relative_count)
{
diff --git a/ldso/ldso/sh64/dl-sysdep.h b/ldso/ldso/sh64/dl-sysdep.h
index fc67b12..15d9b5e 100644
--- a/ldso/ldso/sh64/dl-sysdep.h
+++ b/ldso/ldso/sh64/dl-sysdep.h
@@ -41,7 +41,7 @@ extern unsigned long _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_ent
/* Return the link-time address of _DYNAMIC. Conveniently, this is the
first element of the GOT. This must be inlined in a function which
uses global data. */
-static __inline__ Elf32_Addr elf_machine_dynamic(void)
+static __always_inline Elf32_Addr elf_machine_dynamic(void)
{
register Elf32_Addr *got;
@@ -69,7 +69,7 @@ static __inline__ Elf32_Addr elf_machine_dynamic(void)
}
/* Return the run-time load address of the shared object. */
-static __inline__ Elf32_Addr elf_machine_load_address(void)
+static __always_inline Elf32_Addr elf_machine_load_address(void)
{
Elf32_Addr addr;
@@ -122,7 +122,7 @@ static __inline__ Elf32_Addr elf_machine_load_address(void)
} \
}
-static __inline__ void
+static __always_inline void
elf_machine_relative(Elf32_Addr load_off, const Elf32_Addr rel_addr,
Elf32_Word relative_count)
{
diff --git a/ldso/ldso/sparc/dl-sysdep.h b/ldso/ldso/sparc/dl-sysdep.h
index 7936517..ebfa268 100644
--- a/ldso/ldso/sparc/dl-sysdep.h
+++ b/ldso/ldso/sparc/dl-sysdep.h
@@ -52,7 +52,7 @@ unsigned long _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_entry);
#ifndef COMPILE_ASM
/* Cheap modulo implementation, taken from arm/ld_sysdep.h. */
-static __inline__ unsigned long
+static __always_inline unsigned long
sparc_mod(unsigned long m, unsigned long p)
{
unsigned long i, t, inc;
@@ -118,7 +118,7 @@ do { register Elf32_Addr pc __asm__("o7"); \
/* Return the link-time address of _DYNAMIC. Conveniently, this is the
first element of the GOT. This must be inlined in a function which
uses global data. */
-static __inline__ Elf32_Addr
+static __always_inline Elf32_Addr
elf_machine_dynamic (void)
{
register Elf32_Addr *got __asm__ ("%l7");
@@ -129,7 +129,7 @@ elf_machine_dynamic (void)
}
/* Return the run-time load address of the shared object. */
-static __inline__ Elf32_Addr
+static __always_inline Elf32_Addr
elf_machine_load_address (void)
{
register Elf32_Addr *pc __asm__ ("%o7"), *got __asm__ ("%l7");
@@ -148,7 +148,7 @@ elf_machine_load_address (void)
return (Elf32_Addr) got - *got + (pc[2] - pc[3]) * 4 - 4;
}
-static __inline__ void
+static __always_inline void
elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
Elf32_Word relative_count)
{
diff --git a/ldso/ldso/xtensa/dl-sysdep.h b/ldso/ldso/xtensa/dl-sysdep.h
index daae428..07b9b79 100644
--- a/ldso/ldso/xtensa/dl-sysdep.h
+++ b/ldso/ldso/xtensa/dl-sysdep.h
@@ -85,7 +85,7 @@ extern unsigned long _dl_linux_resolver (struct elf_resolve *, int);
(((type) == R_XTENSA_JMP_SLOT) * ELF_RTYPE_CLASS_PLT)
/* Return the link-time address of _DYNAMIC. */
-static __inline__ Elf32_Addr
+static __always_inline Elf32_Addr
elf_machine_dynamic (void)
{
/* This function is only used while bootstrapping the runtime linker.
@@ -95,7 +95,7 @@ elf_machine_dynamic (void)
}
/* Return the run-time load address of the shared object. */
-static __inline__ Elf32_Addr
+static __always_inline Elf32_Addr
elf_machine_load_address (void)
{
Elf32_Addr addr, tmp;
@@ -116,7 +116,7 @@ elf_machine_load_address (void)
return addr - 3;
}
-static __inline__ void
+static __always_inline void
elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
Elf32_Word relative_count)
{
--
1.6.3.3.444.g4ecbc

View File

@ -0,0 +1,218 @@
Index: uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/arm/vfork.S
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/arm/vfork.S 2008-08-28 00:22:06.278340855 +0200
@@ -0,0 +1,78 @@
+/* Copyright (C) 1999, 2002, 2003, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Philip Blundell <philb@gnu.org>.
+
+ 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. */
+
+#include <sysdep-cancel.h>
+#define _ERRNO_H 1
+#include <bits/errno.h>
+#include <kernel-features.h>
+
+/* Clone the calling process, but without copying the whole address space.
+ The calling process is suspended until the new process exits or is
+ replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
+ and the process ID of the new process to the old process. */
+
+ENTRY (__vfork)
+
+#ifdef __NR_vfork
+
+#ifdef SHARED
+ ldr ip, 1f
+ ldr r0, 2f
+3: add ip, pc, ip
+ ldr r0, [ip, r0]
+#else
+ ldr r0, 1f
+#endif
+ movs r0, r0
+ bne HIDDEN_JUMPTARGET (__fork)
+
+ DO_CALL (vfork, 0)
+ cmn a1, #4096
+ RETINSTR(cc, lr)
+
+#ifndef __ASSUME_VFORK_SYSCALL
+ /* Check if vfork syscall is known at all. */
+ cmn a1, #ENOSYS
+ bne PLTJMP(C_SYMBOL_NAME(__syscall_error))
+#endif
+
+#endif
+
+#ifndef __ASSUME_VFORK_SYSCALL
+ /* If we don't have vfork, fork is close enough. */
+ DO_CALL (fork, 0)
+ cmn a1, #4096
+ RETINSTR(cc, lr)
+#elif !defined __NR_vfork
+# error "__NR_vfork not available and __ASSUME_VFORK_SYSCALL defined"
+#endif
+ b PLTJMP(C_SYMBOL_NAME(__syscall_error))
+
+#ifdef SHARED
+1: .word _GLOBAL_OFFSET_TABLE_ - 3b - 8
+2: .word __libc_pthread_functions(GOTOFF)
+#else
+ .weak pthread_create
+1: .word pthread_create
+#endif
+
+PSEUDO_END (__vfork)
+libc_hidden_def (__vfork)
+
+weak_alias (__vfork, vfork)
Index: uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ uClibc/libpthread/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h 2008-08-28 00:28:04.301636993 +0200
@@ -0,0 +1,130 @@
+/* Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Phil Blundell <pb@nexus.co.uk>, 2003.
+
+ 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. */
+
+#include <tls.h>
+#include <pt-machine.h>
+#ifndef __ASSEMBLER__
+# include <linuxthreads/internals.h>
+#endif
+
+#if !defined NOT_IN_libc || defined IS_IN_libpthread
+
+/* We push lr onto the stack, so we have to use ldmib instead of ldmia
+ to find the saved arguments. */
+# ifdef PIC
+# undef DOARGS_5
+# undef DOARGS_6
+# undef DOARGS_7
+# define DOARGS_5 str r4, [sp, $-4]!; ldr r4, [sp, $8];
+# define DOARGS_6 mov ip, sp; stmfd sp!, {r4, r5}; ldmib ip, {r4, r5};
+# define DOARGS_7 mov ip, sp; stmfd sp!, {r4, r5, r6}; ldmib ip, {r4, r5, r6};
+# endif
+
+# undef PSEUDO_RET
+# define PSEUDO_RET \
+ ldrcc pc, [sp], $4; \
+ ldr lr, [sp], $4; \
+ b PLTJMP(SYSCALL_ERROR)
+
+# undef PSEUDO
+# define PSEUDO(name, syscall_name, args) \
+ .section ".text"; \
+ PSEUDO_PROLOGUE; \
+ ENTRY (name); \
+ SINGLE_THREAD_P; \
+ bne .Lpseudo_cancel; \
+ DO_CALL (syscall_name, args); \
+ cmn r0, $4096; \
+ RETINSTR(cc, lr); \
+ b PLTJMP(SYSCALL_ERROR); \
+ .Lpseudo_cancel: \
+ str lr, [sp, $-4]!; \
+ DOCARGS_##args; /* save syscall args around CENABLE. */ \
+ CENABLE; \
+ mov ip, r0; /* put mask in safe place. */ \
+ UNDOCARGS_##args; /* restore syscall args. */ \
+ swi SYS_ify (syscall_name); /* do the call. */ \
+ str r0, [sp, $-4]!; /* save syscall return value. */ \
+ mov r0, ip; /* get mask back. */ \
+ CDISABLE; \
+ ldr r0, [sp], $4; /* retrieve return value. */ \
+ UNDOC2ARGS_##args; /* fix register damage. */ \
+ cmn r0, $4096;
+
+# define DOCARGS_0
+# define UNDOCARGS_0
+# define UNDOC2ARGS_0
+
+# define DOCARGS_1 str r0, [sp, #-4]!;
+# define UNDOCARGS_1 ldr r0, [sp], #4;
+# define UNDOC2ARGS_1
+
+# define DOCARGS_2 str r1, [sp, #-4]!; str r0, [sp, #-4]!;
+# define UNDOCARGS_2 ldr r0, [sp], #4; ldr r1, [sp], #4;
+# define UNDOC2ARGS_2
+
+# define DOCARGS_3 str r2, [sp, #-4]!; str r1, [sp, #-4]!; str r0, [sp, #-4]!;
+# define UNDOCARGS_3 ldr r0, [sp], #4; ldr r1, [sp], #4; ldr r2, [sp], #4
+# define UNDOC2ARGS_3
+
+# define DOCARGS_4 stmfd sp!, {r0-r3}
+# define UNDOCARGS_4 ldmfd sp!, {r0-r3}
+# define UNDOC2ARGS_4
+
+# define DOCARGS_5 stmfd sp!, {r0-r3}
+# define UNDOCARGS_5 ldmfd sp, {r0-r3}; str r4, [sp, #-4]!; ldr r4, [sp, #24]
+# define UNDOC2ARGS_5 ldr r4, [sp], #20
+
+# ifdef IS_IN_libpthread
+# define CENABLE bl PLTJMP(__pthread_enable_asynccancel)
+# define CDISABLE bl PLTJMP(__pthread_disable_asynccancel)
+# define __local_multiple_threads __pthread_multiple_threads
+# else
+# define CENABLE bl PLTJMP(__libc_enable_asynccancel)
+# define CDISABLE bl PLTJMP(__libc_disable_asynccancel)
+# define __local_multiple_threads __libc_multiple_threads
+# endif
+
+# ifndef __ASSEMBLER__
+extern int __local_multiple_threads attribute_hidden;
+# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
+# else
+# if !defined PIC
+# define SINGLE_THREAD_P \
+ ldr ip, =__local_multiple_threads; \
+ ldr ip, [ip]; \
+ teq ip, #0;
+# define PSEUDO_PROLOGUE
+# else
+# define SINGLE_THREAD_P \
+ ldr ip, 1b; \
+2: \
+ ldr ip, [pc, ip]; \
+ teq ip, #0;
+# define PSEUDO_PROLOGUE \
+ 1: .word __local_multiple_threads - 2f - 8;
+# endif
+# endif
+
+#elif !defined __ASSEMBLER__
+
+/* This code should never be used but we define it anyhow. */
+# define SINGLE_THREAD_P (1)
+
+#endif

View File

@ -62,8 +62,8 @@ ARCH_WANTS_LITTLE_ENDIAN=y
ARCH_HAS_MMU=y
ARCH_USE_MMU=y
UCLIBC_HAS_FLOATS=y
# UCLIBC_HAS_FPU is not set
UCLIBC_HAS_SOFT_FLOAT=y
UCLIBC_HAS_FPU=y
UCLIBC_HAS_SOFT_FLOAT=n
DO_C99_MATH=y
KERNEL_HEADERS="/data/build/koen/OE/build/tmp/angstrom/cross/arm-angstrom-linux-uclibcgnueabi/include"
HAVE_DOT_CONFIG=y

View File

@ -62,8 +62,8 @@ ARCH_WANTS_LITTLE_ENDIAN=y
ARCH_HAS_MMU=y
ARCH_USE_MMU=y
UCLIBC_HAS_FLOATS=y
# UCLIBC_HAS_FPU is not set
UCLIBC_HAS_SOFT_FLOAT=y
UCLIBC_HAS_FPU=y
UCLIBC_HAS_SOFT_FLOAT=n
DO_C99_MATH=y
KERNEL_HEADERS="/data/build/koen/OE/build/tmp/angstrom/cross/arm-angstrom-linux-uclibcgnueabi/include"
HAVE_DOT_CONFIG=y

View File

@ -0,0 +1,31 @@
Index: uClibc-0.9.30.1/extra/scripts/unifdef.c
===================================================================
--- uClibc-0.9.30.1.orig/extra/scripts/unifdef.c 2009-08-09 11:55:23.000000000 +0200
+++ uClibc-0.9.30.1/extra/scripts/unifdef.c 2009-08-09 11:55:46.000000000 +0200
@@ -206,7 +206,7 @@
static void error(const char *);
static int findsym(const char *);
static void flushline(bool);
-static Linetype getline(void);
+static Linetype _getline(void);
static Linetype ifeval(const char **);
static void ignoreoff(void);
static void ignoreon(void);
@@ -512,7 +512,7 @@
for (;;) {
linenum++;
- lineval = getline();
+ lineval = _getline();
trans_table[ifstate[depth]][lineval]();
debug("process %s -> %s depth %d",
linetype_name[lineval],
@@ -526,7 +526,7 @@
* help from skipcomment().
*/
static Linetype
-getline(void)
+_getline(void)
{
const char *cp;
int cursym;

View File

@ -0,0 +1,21 @@
Index: uClibc/ldso/ldso/arm/resolve.S
===================================================================
--- uClibc.orig/ldso/ldso/arm/resolve.S 2009-03-20 12:03:32.000000000 -0700
+++ uClibc/ldso/ldso/arm/resolve.S 2009-03-20 12:04:23.000000000 -0700
@@ -97,7 +97,6 @@
.text
.align 4 @ 16 byte boundary and there are 32 bytes below (arm case)
- #if !defined(__thumb__) || defined(__thumb2__)
.arm
.globl _dl_linux_resolve
.type _dl_linux_resolve,%function
@@ -129,7 +128,7 @@
#else
mov pc,ip
#endif
-#else
+#if 0
@ In the thumb case _dl_linux_resolver is thumb. If a bl is used
@ from arm code the linker will insert a stub call which, with
@ binutils 2.16, is not PIC. Since this code is accessed by an

View File

@ -0,0 +1,291 @@
Index: uClibc/libpthread/linuxthreads/descr.h
===================================================================
--- uClibc.orig/libpthread/linuxthreads/descr.h 2008-08-27 23:59:46.171809044 +0200
+++ uClibc/libpthread/linuxthreads/descr.h 2008-08-28 00:00:35.435134759 +0200
@@ -123,9 +123,9 @@
union dtv *dtvp;
pthread_descr self; /* Pointer to this structure */
int multiple_threads;
-# ifdef NEED_DL_SYSINFO
uintptr_t sysinfo;
-# endif
+ uintptr_t stack_guard;
+ uintptr_t pointer_guard;
} data;
void *__padding[16];
} p_header;
@@ -193,6 +193,13 @@
size_t p_alloca_cutoff; /* Maximum size which should be allocated
using alloca() instead of malloc(). */
/* New elements must be added at the end. */
+
+ /* This member must be last. */
+ char end_padding[];
+
+#define PTHREAD_STRUCT_END_PADDING \
+ (sizeof (struct _pthread_descr_struct) \
+ - offsetof (struct _pthread_descr_struct, end_padding))
} __attribute__ ((aligned(32))); /* We need to align the structure so that
doubles are aligned properly. This is 8
bytes on MIPS and 16 bytes on MIPS64.
Index: uClibc/libpthread/linuxthreads/manager.c
===================================================================
--- uClibc.orig/libpthread/linuxthreads/manager.c 2008-08-27 23:59:54.185140485 +0200
+++ uClibc/libpthread/linuxthreads/manager.c 2008-08-28 00:00:35.435134759 +0200
@@ -679,6 +679,17 @@
new_thread->p_inheritsched = attr ? attr->__inheritsched : 0;
new_thread->p_alloca_cutoff = stksize / 4 > __MAX_ALLOCA_CUTOFF
? __MAX_ALLOCA_CUTOFF : stksize / 4;
+
+ /* Copy the stack guard canary. */
+#ifdef THREAD_COPY_STACK_GUARD
+ THREAD_COPY_STACK_GUARD (new_thread);
+#endif
+
+ /* Copy the pointer guard value. */
+#ifdef THREAD_COPY_POINTER_GUARD
+ THREAD_COPY_POINTER_GUARD (new_thread);
+#endif
+
/* Initialize the thread handle */
__pthread_init_lock(&__pthread_handles[sseg].h_lock);
__pthread_handles[sseg].h_descr = new_thread;
@@ -742,15 +753,15 @@
pid = __clone2(pthread_start_thread_event,
(void **)new_thread_bottom,
(char *)stack_addr - new_thread_bottom,
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND |
+ CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM |
__pthread_sig_cancel, new_thread);
#elif _STACK_GROWS_UP
pid = __clone(pthread_start_thread_event, (void *) new_thread_bottom,
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND |
+ CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM |
__pthread_sig_cancel, new_thread);
#else
pid = __clone(pthread_start_thread_event, stack_addr,
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND |
+ CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM |
__pthread_sig_cancel, new_thread);
#endif
saved_errno = errno;
@@ -783,15 +794,15 @@
pid = __clone2(pthread_start_thread,
(void **)new_thread_bottom,
(char *)stack_addr - new_thread_bottom,
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND |
+ CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM |
__pthread_sig_cancel, new_thread);
#elif _STACK_GROWS_UP
pid = __clone(pthread_start_thread, (void *) new_thread_bottom,
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND |
+ CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM |
__pthread_sig_cancel, new_thread);
#else
pid = __clone(pthread_start_thread, stack_addr,
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND |
+ CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM |
__pthread_sig_cancel, new_thread);
#endif /* !NEED_SEPARATE_REGISTER_STACK */
saved_errno = errno;
@@ -892,10 +903,11 @@
#ifdef _STACK_GROWS_UP
# ifdef USE_TLS
size_t stacksize = guardaddr - th->p_stackaddr;
+ guardaddr = th->p_stackaddr;
# else
size_t stacksize = guardaddr - (char *)th;
-# endif
guardaddr = (char *)th;
+# endif
#else
/* Guardaddr is always set, even if guardsize is 0. This allows
us to compute everything else. */
Index: uClibc/libpthread/linuxthreads/pthread.c
===================================================================
--- uClibc.orig/libpthread/linuxthreads/pthread.c 2008-08-28 00:00:00.825141935 +0200
+++ uClibc/libpthread/linuxthreads/pthread.c 2008-08-28 00:00:35.438472147 +0200
@@ -698,6 +698,16 @@
mgr = &__pthread_manager_thread;
#endif
+ /* Copy the stack guard canary. */
+#ifdef THREAD_COPY_STACK_GUARD
+ THREAD_COPY_STACK_GUARD (mgr);
+#endif
+
+ /* Copy the pointer guard value. */
+#ifdef THREAD_COPY_POINTER_GUARD
+ THREAD_COPY_POINTER_GUARD (mgr);
+#endif
+
__pthread_manager_request = manager_pipe[1]; /* writing end */
__pthread_manager_reader = manager_pipe[0]; /* reading end */
@@ -738,17 +748,17 @@
pid = __clone2(__pthread_manager_event,
(void **) __pthread_manager_thread_bos,
THREAD_MANAGER_STACK_SIZE,
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND,
+ CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM,
mgr);
#elif _STACK_GROWS_UP
pid = __clone(__pthread_manager_event,
(void **) __pthread_manager_thread_bos,
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND,
+ CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM,
mgr);
#else
pid = __clone(__pthread_manager_event,
(void **) __pthread_manager_thread_tos,
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND,
+ CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM,
mgr);
#endif
@@ -778,13 +788,13 @@
#ifdef NEED_SEPARATE_REGISTER_STACK
pid = __clone2(__pthread_manager, (void **) __pthread_manager_thread_bos,
THREAD_MANAGER_STACK_SIZE,
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND, mgr);
+ CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM, mgr);
#elif _STACK_GROWS_UP
pid = __clone(__pthread_manager, (void **) __pthread_manager_thread_bos,
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND, mgr);
+ CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM, mgr);
#else
pid = __clone(__pthread_manager, (void **) __pthread_manager_thread_tos,
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND, mgr);
+ CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM, mgr);
#endif
}
if (__builtin_expect (pid, 0) == -1) {
@@ -971,6 +981,10 @@
struct pthread_request request;
pthread_descr self = thread_self();
+ /* Make sure we come back here after suspend(), in case we entered
+ from a signal handler. */
+ THREAD_SETMEM(self, p_signal_jmp, NULL);
+
request.req_thread = self;
request.req_kind = REQ_PROCESS_EXIT;
request.req_args.exit.code = retcode;
@@ -1198,13 +1212,13 @@
void __pthread_restart_old(pthread_descr th)
{
- if (atomic_increment(&th->p_resume_count) == -1)
+ if (pthread_atomic_increment(&th->p_resume_count) == -1)
kill(th->p_pid, __pthread_sig_restart);
}
void __pthread_suspend_old(pthread_descr self)
{
- if (atomic_decrement(&self->p_resume_count) <= 0)
+ if (pthread_atomic_decrement(&self->p_resume_count) <= 0)
__pthread_wait_for_restart_signal(self);
}
@@ -1215,7 +1229,7 @@
int was_signalled = 0;
sigjmp_buf jmpbuf;
- if (atomic_decrement(&self->p_resume_count) == 0) {
+ if (pthread_atomic_decrement(&self->p_resume_count) == 0) {
/* Set up a longjmp handler for the restart signal, unblock
the signal and sleep. */
@@ -1272,9 +1286,9 @@
being delivered. */
if (!was_signalled) {
- if (atomic_increment(&self->p_resume_count) != -1) {
+ if (pthread_atomic_increment(&self->p_resume_count) != -1) {
__pthread_wait_for_restart_signal(self);
- atomic_decrement(&self->p_resume_count); /* should be zero now! */
+ pthread_atomic_decrement(&self->p_resume_count); /* should be zero now! */
/* woke spontaneously and consumed restart signal */
return 1;
}
Index: uClibc/libpthread/linuxthreads/specific.c
===================================================================
--- uClibc.orig/libpthread/linuxthreads/specific.c 2008-08-28 00:00:07.595139286 +0200
+++ uClibc/libpthread/linuxthreads/specific.c 2008-08-28 00:00:35.438472147 +0200
@@ -104,13 +104,14 @@
that if the key is reallocated later by pthread_key_create, its
associated values will be NULL in all threads.
- If no threads have been created yet, clear it just in the
- current thread. */
+ If no threads have been created yet, or if we are exiting, clear
+ it just in the current thread. */
struct pthread_key_delete_helper_args args;
args.idx1st = key / PTHREAD_KEY_2NDLEVEL_SIZE;
args.idx2nd = key % PTHREAD_KEY_2NDLEVEL_SIZE;
- if (__pthread_manager_request != -1)
+ if (__pthread_manager_request != -1
+ && !(__builtin_expect (__pthread_exit_requested, 0)))
{
struct pthread_request request;
@@ -203,8 +204,9 @@
__pthread_lock(THREAD_GETMEM(self, p_lock), self);
for (i = 0; i < PTHREAD_KEY_1STLEVEL_SIZE; i++) {
if (THREAD_GETMEM_NC(self, p_specific[i]) != NULL) {
- free(THREAD_GETMEM_NC(self, p_specific[i]));
+ void *p = THREAD_GETMEM_NC(self, p_specific[i]);
THREAD_SETMEM_NC(self, p_specific[i], NULL);
+ free(p);
}
}
__pthread_unlock(THREAD_GETMEM(self, p_lock));
Index: uClibc/libpthread/linuxthreads/spinlock.c
===================================================================
--- uClibc.orig/libpthread/linuxthreads/spinlock.c 2008-08-28 00:00:17.805140454 +0200
+++ uClibc/libpthread/linuxthreads/spinlock.c 2008-08-28 00:00:35.438472147 +0200
@@ -637,8 +637,20 @@
#if defined HAS_COMPARE_AND_SWAP
wait_node_dequeue(pp_head, pp_max_prio, p_max_prio);
#endif
+
+ /* Release the spinlock before restarting. */
+#if defined TEST_FOR_COMPARE_AND_SWAP
+ if (!__pthread_has_cas)
+#endif
+#if !defined HAS_COMPARE_AND_SWAP || defined TEST_FOR_COMPARE_AND_SWAP
+ {
+ __pthread_release(&lock->__spinlock);
+ }
+#endif
+
restart(p_max_prio->thr);
- break;
+
+ return;
}
}
Index: uClibc/libpthread/linuxthreads/spinlock.h
===================================================================
--- uClibc.orig/libpthread/linuxthreads/spinlock.h 2008-08-28 00:00:24.768471655 +0200
+++ uClibc/libpthread/linuxthreads/spinlock.h 2008-08-28 00:02:42.971786951 +0200
@@ -172,7 +172,7 @@
/* Operations on pthread_atomic, which is defined in internals.h */
-static __inline__ long atomic_increment(struct pthread_atomic *pa)
+static __inline__ long pthread_atomic_increment(struct pthread_atomic *pa)
{
long oldval;
@@ -184,7 +184,7 @@
}
-static __inline__ long atomic_decrement(struct pthread_atomic *pa)
+static __inline__ long pthread_atomic_decrement(struct pthread_atomic *pa)
{
long oldval;

View File

@ -1,16 +1,16 @@
#
# Automatically generated make config: don't edit
# Sun May 13 11:29:51 2007
# Fri Nov 23 15:49:33 2007
#
# TARGET_alpha is not set
TARGET_arm=y
# TARGET_arm is not set
# TARGET_bfin is not set
# TARGET_cris is not set
# TARGET_e1 is not set
# TARGET_frv is not set
# TARGET_h8300 is not set
# TARGET_hppa is not set
# TARGET_i386 is not set
TARGET_i386=y
# TARGET_i960 is not set
# TARGET_ia64 is not set
# TARGET_m68k is not set
@ -29,42 +29,41 @@ TARGET_arm=y
#
# Target Architecture Features and Options
#
TARGET_ARCH="arm"
TARGET_ARCH="i386"
FORCE_OPTIONS_FOR_ARCH=y
CONFIG_ARM_OABI=y
# CONFIG_ARM_EABI is not set
# USE_BX is not set
# CONFIG_GENERIC_ARM is not set
# CONFIG_ARM610 is not set
# CONFIG_ARM710 is not set
# CONFIG_ARM7TDMI is not set
# CONFIG_ARM720T is not set
# CONFIG_ARM920T is not set
# CONFIG_ARM922T is not set
# CONFIG_ARM926T is not set
# CONFIG_ARM10T is not set
# CONFIG_ARM1136JF_S is not set
# CONFIG_ARM1176JZ_S is not set
# CONFIG_ARM1176JZF_S is not set
# CONFIG_ARM_SA110 is not set
CONFIG_ARM_SA1100=y
# CONFIG_ARM_XSCALE is not set
# CONFIG_ARM_IWMMXT is not set
CONFIG_GENERIC_386=y
# CONFIG_386 is not set
# CONFIG_486 is not set
# CONFIG_586 is not set
# CONFIG_586MMX is not set
# CONFIG_686 is not set
# CONFIG_PENTIUMII is not set
# CONFIG_PENTIUMIII is not set
# CONFIG_PENTIUM4 is not set
# CONFIG_K6 is not set
# CONFIG_K7 is not set
# CONFIG_ELAN is not set
# CONFIG_CRUSOE is not set
# CONFIG_WINCHIPC6 is not set
# CONFIG_WINCHIP2 is not set
# CONFIG_CYRIXIII is not set
# CONFIG_NEHEMIAH is not set
TARGET_SUBARCH=""
#
# Using ELF file format
#
ARCH_ANY_ENDIAN=y
ARCH_LITTLE_ENDIAN=y
# ARCH_WANTS_BIG_ENDIAN is not set
ARCH_WANTS_LITTLE_ENDIAN=y
#
# Using Little Endian
#
ARCH_HAS_MMU=y
ARCH_USE_MMU=y
UCLIBC_HAS_FLOATS=y
# UCLIBC_HAS_FPU is not set
UCLIBC_HAS_SOFT_FLOAT=y
UCLIBC_HAS_FPU=y
DO_C99_MATH=y
KERNEL_HEADERS="/usr/include"
HAVE_DOT_CONFIG=y
UCLIBC_HAS_FENV=y

View File

@ -0,0 +1,42 @@
Index: uClibc-0.9.30/libpthread/linuxthreads/Makefile.in
===================================================================
--- uClibc-0.9.30.orig/libpthread/linuxthreads/Makefile.in 2009-01-11 01:09:27.008515954 +0100
+++ uClibc-0.9.30/libpthread/linuxthreads/Makefile.in 2009-01-11 01:09:35.295181636 +0100
@@ -45,7 +45,7 @@
pthread_SRC := \
attr barrier cancel condvar errno events join pthread \
lockfile manager mutex pt-machine ptcleanup \
- ptclock_gettime ptclock_settime ptfork pthandles \
+ ptclock_gettime ptclock_settime ptfork pthandles pthread_atfork \
pthread_setegid pthread_seteuid pthread_setgid pthread_setregid \
pthread_setresgid pthread_setresuid pthread_setreuid pthread_setuid \
rwlock semaphore sighandler signals specific spinlock
Index: uClibc-0.9.30/libpthread/linuxthreads/pthread_atfork.c
===================================================================
--- uClibc-0.9.30.orig/libpthread/linuxthreads/pthread_atfork.c 2009-01-11 01:09:44.931848926 +0100
+++ uClibc-0.9.30/libpthread/linuxthreads/pthread_atfork.c 2009-01-11 01:12:49.926539743 +0100
@@ -43,12 +43,8 @@
/* Hide the symbol so that no definition but the one locally in the
executable or DSO is used. */
-int
-#ifndef __pthread_atfork
-/* Don't mark the compatibility function as hidden. */
-attribute_hidden
-#endif
-__pthread_atfork (prepare, parent, child)
+
+int attribute_hidden __pthread_atfork (prepare, parent, child)
void (*prepare) (void);
void (*parent) (void);
void (*child) (void);
@@ -56,8 +52,5 @@
return __register_atfork (prepare, parent, child,
&__dso_handle == NULL ? NULL : __dso_handle);
}
-#ifndef __pthread_atfork
-extern int pthread_atfork (void (*prepare) (void), void (*parent) (void),
- void (*child) (void)) attribute_hidden;
+
strong_alias (__pthread_atfork, pthread_atfork)
-#endif

View File

@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
# Wed May 16 12:03:09 2007
# Fri Nov 23 15:49:33 2007
#
# TARGET_alpha is not set
# TARGET_arm is not set
@ -10,7 +10,7 @@
# TARGET_frv is not set
# TARGET_h8300 is not set
# TARGET_hppa is not set
# TARGET_i386 is not set
TARGET_i386=y
# TARGET_i960 is not set
# TARGET_ia64 is not set
# TARGET_m68k is not set
@ -19,7 +19,7 @@
# TARGET_nios is not set
# TARGET_nios2 is not set
# TARGET_powerpc is not set
TARGET_sh=y
# TARGET_sh is not set
# TARGET_sh64 is not set
# TARGET_sparc is not set
# TARGET_v850 is not set
@ -29,24 +29,40 @@ TARGET_sh=y
#
# Target Architecture Features and Options
#
TARGET_ARCH="sh"
TARGET_ARCH="i386"
FORCE_OPTIONS_FOR_ARCH=y
# CONFIG_SH2A is not set
# CONFIG_SH2 is not set
# CONFIG_SH3 is not set
CONFIG_SH4=y
CONFIG_GENERIC_386=y
# CONFIG_386 is not set
# CONFIG_486 is not set
# CONFIG_586 is not set
# CONFIG_586MMX is not set
# CONFIG_686 is not set
# CONFIG_PENTIUMII is not set
# CONFIG_PENTIUMIII is not set
# CONFIG_PENTIUM4 is not set
# CONFIG_K6 is not set
# CONFIG_K7 is not set
# CONFIG_ELAN is not set
# CONFIG_CRUSOE is not set
# CONFIG_WINCHIPC6 is not set
# CONFIG_WINCHIP2 is not set
# CONFIG_CYRIXIII is not set
# CONFIG_NEHEMIAH is not set
TARGET_SUBARCH=""
#
# Using ELF file format
#
ARCH_ANY_ENDIAN=y
ARCH_LITTLE_ENDIAN=y
# ARCH_WANTS_BIG_ENDIAN is not set
ARCH_WANTS_LITTLE_ENDIAN=y
#
# Using Little Endian
#
ARCH_HAS_MMU=y
ARCH_USE_MMU=y
UCLIBC_HAS_FLOATS=y
UCLIBC_HAS_FPU=y
DO_C99_MATH=y
KERNEL_HEADERS="/usr/include"
HAVE_DOT_CONFIG=y

View File

@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
# Sun May 13 11:25:50 2007
# Fri Nov 23 15:49:33 2007
#
# TARGET_alpha is not set
# TARGET_arm is not set
@ -10,7 +10,7 @@
# TARGET_frv is not set
# TARGET_h8300 is not set
# TARGET_hppa is not set
# TARGET_i386 is not set
TARGET_i386=y
# TARGET_i960 is not set
# TARGET_ia64 is not set
# TARGET_m68k is not set
@ -18,7 +18,7 @@
# TARGET_mips is not set
# TARGET_nios is not set
# TARGET_nios2 is not set
TARGET_powerpc=y
# TARGET_powerpc is not set
# TARGET_sh is not set
# TARGET_sh64 is not set
# TARGET_sparc is not set
@ -29,25 +29,40 @@ TARGET_powerpc=y
#
# Target Architecture Features and Options
#
TARGET_ARCH="powerpc"
TARGET_ARCH="i386"
FORCE_OPTIONS_FOR_ARCH=y
CONFIG_CLASSIC=y
# CONFIG_E500 is not set
TARGET_SUBARCH="classic"
CONFIG_GENERIC_386=y
# CONFIG_386 is not set
# CONFIG_486 is not set
# CONFIG_586 is not set
# CONFIG_586MMX is not set
# CONFIG_686 is not set
# CONFIG_PENTIUMII is not set
# CONFIG_PENTIUMIII is not set
# CONFIG_PENTIUM4 is not set
# CONFIG_K6 is not set
# CONFIG_K7 is not set
# CONFIG_ELAN is not set
# CONFIG_CRUSOE is not set
# CONFIG_WINCHIPC6 is not set
# CONFIG_WINCHIP2 is not set
# CONFIG_CYRIXIII is not set
# CONFIG_NEHEMIAH is not set
TARGET_SUBARCH=""
#
# Using ELF file format
#
ARCH_BIG_ENDIAN=y
ARCH_LITTLE_ENDIAN=y
#
# Using Big Endian
# Using Little Endian
#
ARCH_HAS_MMU=y
ARCH_USE_MMU=y
UCLIBC_HAS_FLOATS=y
UCLIBC_HAS_FPU=y
DO_C99_MATH=y
KERNEL_HEADERS="/data/build/koen/OE/build/tmp/angstrom/cross/powerpc-angstrom-linux-uclibc/include"
KERNEL_HEADERS="/usr/include"
HAVE_DOT_CONFIG=y

View File

@ -14,6 +14,7 @@ LDSO_BASE_FILENAME="ld.so"
# UCLIBC_STATIC_LDCONFIG is not set
LDSO_RUNPATH=y
UCLIBC_CTOR_DTOR=y
LDSO_GNU_HASH_SUPPORT=y
# HAS_NO_THREADS is not set
UCLIBC_HAS_THREADS=y
PTHREADS_DEBUG_SUPPORT=y
@ -28,9 +29,10 @@ COMPAT_ATEXIT=y
UCLIBC_SUSV3_LEGACY=y
UCLIBC_SUSV3_LEGACY_MACROS=y
UCLIBC_HAS_SHADOW=y
# UCLIBC_HAS_PROGRAM_INVOCATION_NAME is not set
UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y
UCLIBC_HAS___PROGNAME=y
UNIX98PTY_ONLY=y
UCLIBC_HAS_GETPT=y
ASSUME_DEVPTS=y
UCLIBC_HAS_TM_EXTENSIONS=y
UCLIBC_HAS_TZ_CACHING=y
@ -81,8 +83,8 @@ UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y
# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set
# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set
# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set
UCLIBC_HAS_STDIO_GETC_MACRO=y
UCLIBC_HAS_STDIO_PUTC_MACRO=y
# UCLIBC_HAS_STDIO_GETC_MACRO is not set
# UCLIBC_HAS_STDIO_PUTC_MACRO is not set
UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y
# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set
UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y
@ -105,7 +107,7 @@ UCLIBC_HAS_FNMATCH=y
UCLIBC_HAS_WORDEXP=y
UCLIBC_HAS_FTW=y
UCLIBC_HAS_GLOB=y
# UCLIBC_HAS_GNU_GLOB is not set
UCLIBC_HAS_GNU_GLOB=y
#
# Library Installation Options
@ -132,7 +134,7 @@ CROSS_COMPILER_PREFIX=""
UCLIBC_EXTRA_CFLAGS=""
# DODEBUG is not set
# DODEBUG_PT is not set
# DOSTRIP is not set
DOSTRIP=n
# DOASSERTS is not set
# SUPPORT_LD_DEBUG is not set
# SUPPORT_LD_DEBUG_EARLY is not set

View File

@ -1,6 +1,6 @@
#
# Automatically generated make config: don't edit
# Sat May 12 23:18:41 2007
# Mon May 14 10:23:14 2007
#
# TARGET_alpha is not set
TARGET_arm=y
@ -39,7 +39,7 @@ USE_BX=y
# CONFIG_ARM710 is not set
# CONFIG_ARM7TDMI is not set
# CONFIG_ARM720T is not set
# CONFIG_ARM920T is not set
CONFIG_ARM920T=y
# CONFIG_ARM922T is not set
# CONFIG_ARM926T is not set
# CONFIG_ARM10T is not set
@ -49,7 +49,7 @@ USE_BX=y
# CONFIG_ARM_SA110 is not set
# CONFIG_ARM_SA1100 is not set
# CONFIG_ARM_XSCALE is not set
CONFIG_ARM_IWMMXT=y
# CONFIG_ARM_IWMMXT is not set
TARGET_SUBARCH=""
#
@ -64,7 +64,6 @@ ARCH_USE_MMU=y
UCLIBC_HAS_FLOATS=y
# UCLIBC_HAS_FPU is not set
UCLIBC_HAS_SOFT_FLOAT=y
DO_C99_MATH=y
KERNEL_HEADERS="/usr/include"
HAVE_DOT_CONFIG=y

View File

@ -0,0 +1,474 @@
Index: uClibc-0.9.30.1/libm/ldouble_wrappers.c
===================================================================
--- uClibc-0.9.30.1/libm/ldouble_wrappers.c (revision 25552)
+++ uClibc-0.9.30.1/libm/ldouble_wrappers.c (working copy)
@@ -13,6 +13,16 @@
#include "math.h"
#include <complex.h>
+#if defined __NO_LONG_DOUBLE_MATH
+# define int_WRAPPER_C99(func) /* not needed */
+# else
+# define int_WRAPPER_C99(func) \
+int func##l(long double x) \
+{ \
+ return func((double) x); \
+} \
+libm_hidden_def(func##l)
+#endif
/* Implement the following, as defined by SuSv3 */
#if 0
@@ -543,46 +553,28 @@ long double truncl (long double x)
#endif
-#ifdef __DO_C99_MATH__
+#if defined __DO_C99_MATH__
#ifdef L_fpclassifyl
-int __fpclassifyl (long double x)
-{
- return __fpclassify ( (double) x );
-}
-libm_hidden_def(__fpclassifyl)
+int_WRAPPER_C99(__fpclassify)
#endif
#ifdef L_finitel
-int __finitel (long double x)
-{
- return __finite ( (double)x );
-}
-libm_hidden_def(__finitel)
+int_WRAPPER_C99(__finite)
#endif
#ifdef L_signbitl
-int __signbitl (long double x)
-{
- return __signbitl ( (double)x );
-}
-libm_hidden_def(__signbitl)
+int_WRAPPER_C99(__signbit)
#endif
#ifdef L_isnanl
-int __isnanl (long double x)
-{
- return __isnan ( (double)x );
-}
-libm_hidden_def(__isnanl)
+int_WRAPPER_C99(__isnan)
#endif
#ifdef L_isinfl
-int __isinfl (long double x)
-{
- return __isinf ( (double)x );
-}
-libm_hidden_def(__isinfl)
+int_WRAPPER_C99(__isinf)
#endif
-#endif
+#endif /* DO_C99_MATH */
+
+#undef int_WRAPPER_C99
Index: uClibc-0.9.30.1/libm/nan.c
===================================================================
--- uClibc-0.9.30.1/libm/nan.c (revision 25552)
+++ uClibc-0.9.30.1/libm/nan.c (working copy)
@@ -45,7 +45,7 @@ float nanf (const char *tagp)
}
libm_hidden_def(nanf)
-#if defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
+#if defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ && !defined __NO_LONG_DOUBLE_MATH
libm_hidden_proto(nanl)
long double nanl (const char *tagp)
{
Index: uClibc-0.9.30.1/include/math.h
===================================================================
--- uClibc-0.9.30.1/include/math.h (revision 25552)
+++ uClibc-0.9.30.1/include/math.h (working copy)
@@ -118,7 +118,7 @@ __BEGIN_DECLS
# undef __MATH_PRECNAME
# if (__STDC__ - 0 || __GNUC__ - 0) \
- && (defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ || defined __LDBL_COMPAT)
+ && (!defined __NO_LONG_DOUBLE_MATH || defined __LDBL_COMPAT)
# ifdef __LDBL_COMPAT
# ifdef __USE_ISOC99
@@ -230,7 +230,7 @@ enum
};
/* Return number of classification appropriate for X. */
-# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
+# ifdef __NO_LONG_DOUBLE_MATH
# define fpclassify(x) \
(sizeof (x) == sizeof (float) ? __fpclassifyf (x) : __fpclassify (x))
# else
@@ -242,7 +242,7 @@ enum
# endif
/* Return nonzero value if sign of X is negative. */
-# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
+# ifdef __NO_LONG_DOUBLE_MATH
# define signbit(x) \
(sizeof (x) == sizeof (float) ? __signbitf (x) : __signbit (x))
# else
@@ -254,7 +254,7 @@ enum
# endif
/* Return nonzero value if X is not +-Inf or NaN. */
-# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
+# ifdef __NO_LONG_DOUBLE_MATH
# define isfinite(x) \
(sizeof (x) == sizeof (float) ? __finitef (x) : __finite (x))
# else
@@ -270,7 +270,7 @@ enum
/* Return nonzero value if X is a NaN. We could use `fpclassify' but
we already have this functions `__isnan' and it is faster. */
-# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
+# ifdef __NO_LONG_DOUBLE_MATH
# define isnan(x) \
(sizeof (x) == sizeof (float) ? __isnanf (x) : __isnan (x))
# else
@@ -282,7 +282,7 @@ enum
# endif
/* Return nonzero value is X is positive or negative infinity. */
-# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
+# ifdef __NO_LONG_DOUBLE_MATH
# define isinf(x) \
(sizeof (x) == sizeof (float) ? __isinff (x) : __isinf (x))
# else
Index: uClibc-0.9.30.1/include/tgmath.h
===================================================================
--- uClibc-0.9.30.1/include/tgmath.h (revision 25552)
+++ uClibc-0.9.30.1/include/tgmath.h (working copy)
@@ -36,7 +36,7 @@
#if __GNUC_PREREQ (2, 7)
-# ifndef __UCLIBC_HAS_LONG_DOUBLE_MATH__
+# ifdef __NO_LONG_DOUBLE_MATH
# define __tgml(fct) fct
# else
# define __tgml(fct) fct ## l
Index: uClibc-0.9.30.1/libc/sysdeps/linux/powerpc/bits/wordsize.h
===================================================================
--- uClibc-0.9.30.1/libc/sysdeps/linux/powerpc/bits/wordsize.h (revision 25552)
+++ uClibc-0.9.30.1/libc/sysdeps/linux/powerpc/bits/wordsize.h (working copy)
@@ -7,13 +7,13 @@
# define __WORDSIZE 32
#endif
-#if defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ && !defined __LONG_DOUBLE_MATH_OPTIONAL
+#if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL
/* Signal the glibc ABI didn't used to have a `long double'.
The changes all the `long double' function variants to be redirects
to the double functions. */
# define __LONG_DOUBLE_MATH_OPTIONAL 1
# ifndef __LONG_DOUBLE_128__
-# undef __UCLIBC_HAS_LONG_DOUBLE_MATH__
+# define __NO_LONG_DOUBLE_MATH 1
# endif
#endif
Index: uClibc-0.9.30.1/libc/sysdeps/linux/powerpc/bits/mathdef.h
===================================================================
--- uClibc-0.9.30.1/libc/sysdeps/linux/powerpc/bits/mathdef.h (revision 25552)
+++ uClibc-0.9.30.1/libc/sysdeps/linux/powerpc/bits/mathdef.h (working copy)
@@ -65,11 +65,13 @@ typedef double double_t;
#endif /* ISO C99 */
-#ifdef __UCLIBC_HAS_LONG_DOUBLE_MATH__
+#ifndef __NO_LONG_DOUBLE_MATH
#include <bits/wordsize.h>
/* Signal that we do not really have a `long double'. The disables the
declaration of all the `long double' function variants. */
# if __WORDSIZE == 32
-# undef __UCLIBC_HAS_LONG_DOUBLE_MATH__
+# define __NO_LONG_DOUBLE_MATH 1
+# elif !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
+# define __NO_LONG_DOUBLE_MATH 1
# endif /* __WORDSIZE == 32 */
-#endif /* __UCLIBC_HAS_LONG_DOUBLE_MATH__ */
+#endif /* __NO_LONG_DOUBLE_MATH */
Index: uClibc-0.9.30.1/libc/sysdeps/linux/arm/bits/mathdef.h
===================================================================
--- uClibc-0.9.30.1/libc/sysdeps/linux/arm/bits/mathdef.h (revision 25552)
+++ uClibc-0.9.30.1/libc/sysdeps/linux/arm/bits/mathdef.h (working copy)
@@ -34,3 +34,11 @@ typedef double double_t; /* `double' exp
# define FP_ILOGBNAN (2147483647)
#endif /* ISO C99 */
+
+#ifndef __NO_LONG_DOUBLE_MATH
+/* Signal that we do not really have a `long double'. This disables the
+ declaration of all the `long double' function variants. */
+/* XXX The FPA does support this but the patterns in GCC are currently
+ turned off. */
+# define __NO_LONG_DOUBLE_MATH 1
+#endif
Index: uClibc-0.9.30.1/libc/sysdeps/linux/m68k/bits/mathdef.h
===================================================================
--- uClibc-0.9.30.1/libc/sysdeps/linux/m68k/bits/mathdef.h (revision 25552)
+++ uClibc-0.9.30.1/libc/sysdeps/linux/m68k/bits/mathdef.h (working copy)
@@ -36,3 +36,7 @@ typedef long double double_t; /* `double
# define FP_ILOGBNAN (2147483647)
#endif /* ISO C99 */
+
+#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
+# define __NO_LONG_DOUBLE_MATH 1
+#endif
Index: uClibc-0.9.30.1/libc/sysdeps/linux/alpha/bits/wordsize.h
===================================================================
--- uClibc-0.9.30.1/libc/sysdeps/linux/alpha/bits/wordsize.h (revision 25552)
+++ uClibc-0.9.30.1/libc/sysdeps/linux/alpha/bits/wordsize.h (working copy)
@@ -18,13 +18,13 @@
#define __WORDSIZE 64
-#if defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ && !defined __LONG_DOUBLE_MATH_OPTIONAL
+#if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL
/* Signal that we didn't used to have a `long double'. The changes all
the `long double' function variants to be redirects to the double
functions. */
# define __LONG_DOUBLE_MATH_OPTIONAL 1
# ifndef __LONG_DOUBLE_128__
-# undef __UCLIBC_HAS_LONG_DOUBLE_MATH__
+# define __NO_LONG_DOUBLE_MATH 1
# endif
#endif
Index: uClibc-0.9.30.1/libc/sysdeps/linux/alpha/bits/mathdef.h
===================================================================
--- uClibc-0.9.30.1/libc/sysdeps/linux/alpha/bits/mathdef.h (revision 25552)
+++ uClibc-0.9.30.1/libc/sysdeps/linux/alpha/bits/mathdef.h (working copy)
@@ -78,3 +78,7 @@ typedef double double_t;
# endif /* GNUC before 3.4 */
#endif /* COMPLEX_H */
+
+#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
+# define __NO_LONG_DOUBLE_MATH 1
+#endif
Index: uClibc-0.9.30.1/libc/sysdeps/linux/common/bits/mathdef.h
===================================================================
--- uClibc-0.9.30.1/libc/sysdeps/linux/common/bits/mathdef.h (revision 25552)
+++ uClibc-0.9.30.1/libc/sysdeps/linux/common/bits/mathdef.h (working copy)
@@ -35,3 +35,9 @@ typedef double double_t; /* `double' exp
# define FP_ILOGBNAN 2147483647
#endif /* ISO C99 */
+
+#ifndef __NO_LONG_DOUBLE_MATH
+/* Signal that we do not really have a `long double'. The disables the
+ declaration of all the `long double' function variants. */
+# define __NO_LONG_DOUBLE_MATH 1
+#endif
Index: uClibc-0.9.30.1/libc/sysdeps/linux/i386/bits/mathdef.h
===================================================================
--- uClibc-0.9.30.1/libc/sysdeps/linux/i386/bits/mathdef.h (revision 25552)
+++ uClibc-0.9.30.1/libc/sysdeps/linux/i386/bits/mathdef.h (working copy)
@@ -44,3 +44,7 @@ typedef long double double_t; /* `double
# define FP_ILOGBNAN (-2147483647 - 1)
#endif /* ISO C99 */
+
+#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
+# define __NO_LONG_DOUBLE_MATH 1
+#endif
Index: uClibc-0.9.30.1/libc/sysdeps/linux/nios2/bits/mathdef.h
===================================================================
--- uClibc-0.9.30.1/libc/sysdeps/linux/nios2/bits/mathdef.h (revision 25552)
+++ uClibc-0.9.30.1/libc/sysdeps/linux/nios2/bits/mathdef.h (working copy)
@@ -34,3 +34,11 @@ typedef double double_t; /* `double' exp
# define FP_ILOGBNAN (2147483647)
#endif /* ISO C99 */
+
+#ifndef __NO_LONG_DOUBLE_MATH
+/* Signal that we do not really have a `long double'. This disables the
+ declaration of all the `long double' function variants. */
+/* XXX The FPA does support this but the patterns in GCC are currently
+ turned off. */
+# define __NO_LONG_DOUBLE_MATH 1
+#endif
Index: uClibc-0.9.30.1/libc/sysdeps/linux/x86_64/bits/mathdef.h
===================================================================
--- uClibc-0.9.30.1/libc/sysdeps/linux/x86_64/bits/mathdef.h (revision 25552)
+++ uClibc-0.9.30.1/libc/sysdeps/linux/x86_64/bits/mathdef.h (working copy)
@@ -46,3 +46,7 @@ typedef long double double_t; /* `double
# define FP_ILOGBNAN (-2147483647 - 1)
#endif /* ISO C99 */
+
+#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
+# define __NO_LONG_DOUBLE_MATH 1
+#endif
Index: uClibc-0.9.30.1/libc/sysdeps/linux/xtensa/bits/mathdef.h
===================================================================
--- uClibc-0.9.30.1/libc/sysdeps/linux/xtensa/bits/mathdef.h (revision 25552)
+++ uClibc-0.9.30.1/libc/sysdeps/linux/xtensa/bits/mathdef.h (working copy)
@@ -36,8 +36,8 @@ typedef double double_t; /* `double' exp
#endif /* ISO C99 */
-#if defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
+#ifndef __NO_LONG_DOUBLE_MATH
/* Signal that we do not really have a `long double'. The disables the
declaration of all the `long double' function variants. */
-# undef __UCLIBC_HAS_LONG_DOUBLE_MATH__
+# define __NO_LONG_DOUBLE_MATH 1
#endif
Index: uClibc-0.9.30.1/libc/sysdeps/linux/ia64/bits/mathdef.h
===================================================================
--- uClibc-0.9.30.1/libc/sysdeps/linux/ia64/bits/mathdef.h (revision 25552)
+++ uClibc-0.9.30.1/libc/sysdeps/linux/ia64/bits/mathdef.h (working copy)
@@ -35,3 +35,7 @@ typedef double double_t; /* `double' exp
# define FP_ILOGBNAN 2147483647
#endif /* ISO C99 */
+
+#if !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
+# define __NO_LONG_DOUBLE_MATH 1
+#endif
Index: uClibc-0.9.30.1/libc/sysdeps/linux/mips/bits/mathdef.h
===================================================================
--- uClibc-0.9.30.1/libc/sysdeps/linux/mips/bits/mathdef.h (revision 25552)
+++ uClibc-0.9.30.1/libc/sysdeps/linux/mips/bits/mathdef.h (working copy)
@@ -39,8 +39,10 @@ typedef double double_t; /* `double' exp
#endif /* ISO C99 */
-#if defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ && _MIPS_SIM == _ABIO32
+#if ! defined __NO_LONG_DOUBLE_MATH && _MIPS_SIM == _ABIO32
/* Signal that we do not really have a `long double'. This disables the
declaration of all the `long double' function variants. */
-# error defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ and _MIPS_SIM == _ABIO32
+# define __NO_LONG_DOUBLE_MATH 1
+#elif !defined __NO_LONG_DOUBLE_MATH && !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
+# define __NO_LONG_DOUBLE_MATH 1
#endif
Index: uClibc-0.9.30.1/libc/sysdeps/linux/nios/bits/mathdef.h
===================================================================
--- uClibc-0.9.30.1/libc/sysdeps/linux/nios/bits/mathdef.h (revision 25552)
+++ uClibc-0.9.30.1/libc/sysdeps/linux/nios/bits/mathdef.h (working copy)
@@ -34,3 +34,11 @@ typedef double double_t; /* `double' exp
# define FP_ILOGBNAN (2147483647)
#endif /* ISO C99 */
+
+#ifndef __NO_LONG_DOUBLE_MATH
+/* Signal that we do not really have a `long double'. This disables the
+ declaration of all the `long double' function variants. */
+/* XXX The FPA does support this but the patterns in GCC are currently
+ turned off. */
+# define __NO_LONG_DOUBLE_MATH 1
+#endif
Index: uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/wordsize.h
===================================================================
--- uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/wordsize.h (revision 25552)
+++ uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/wordsize.h (working copy)
@@ -6,7 +6,7 @@
# define __WORDSIZE 32
#endif
-#if 0 /* uClibc: done in mathdefs.h: defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ && !defined __LONG_DOUBLE_MATH_OPTIONAL*/
+#if 0 /* uClibc: done in mathdefs.h: !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL*/
# if __WORDSIZE == 32
/* Signal that in 32bit ABI we didn't used to have a `long double'.
@@ -14,7 +14,7 @@
to the double functions. */
# define __LONG_DOUBLE_MATH_OPTIONAL 1
# ifndef __LONG_DOUBLE_128__
-# undef __UCLIBC_HAS_LONG_DOUBLE_MATH__
+# define __NO_LONG_DOUBLE_MATH 1
# endif
# endif
#endif
Index: uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/mathdef.h
===================================================================
--- uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/mathdef.h (revision 25552)
+++ uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/mathdef.h (working copy)
@@ -57,13 +57,15 @@ typedef double double_t;
#endif /* ISO C99 */
-#ifdef __UCLIBC_HAS_LONG_DOUBLE_MATH__
+#ifndef __NO_LONG_DOUBLE_MATH
# if __WORDSIZE == 32
/* Signal that in 32bit ABI we do not really have a `long double'.
The disables the declaration of all the `long double' function
variants. */
-# undef __UCLIBC_HAS_LONG_DOUBLE_MATH__
+# define __NO_LONG_DOUBLE_MATH 1
+# elif !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
+# define __NO_LONG_DOUBLE_MATH 1
# endif
#endif
Index: uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/mathinline.h
===================================================================
--- uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/mathinline.h (revision 25552)
+++ uClibc-0.9.30.1/libc/sysdeps/linux/sparc/bits/mathinline.h (working copy)
@@ -37,7 +37,7 @@
# if __WORDSIZE == 32
-# ifdef __UCLIBC_HAS_LONG_DOUBLE_MATH__
+# ifndef __NO_LONG_DOUBLE_MATH
# define __unordered_cmp(x, y) \
(__extension__ \
@@ -157,7 +157,7 @@ __NTH (__signbit (double __x))
return __u.__i[0] < 0;
}
-# ifdef __UCLIBC_HAS_LONG_DOUBLE_MATH__
+# ifndef __NO_LONG_DOUBLE_MATH
__MATH_INLINE int
__NTH (__signbitl (long double __x))
{
@@ -219,7 +219,7 @@ __NTH (sqrtl (long double __x))
_Qp_sqrt (&__r, &__x);
return __r;
}
-# elif defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
+# elif !defined __NO_LONG_DOUBLE_MATH
__MATH_INLINE long double
sqrtl (long double __x) __THROW
{
@@ -257,7 +257,7 @@ __ieee754_sqrtl (long double __x)
_Qp_sqrt(&__r, &__x);
return __r;
}
-# elif defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
+# elif !defined __NO_LONG_DOUBLE_MATH
__MATH_INLINE long double
__ieee754_sqrtl (long double __x)
{
Index: uClibc-0.9.30.1/libc/sysdeps/linux/sh/bits/mathdef.h
===================================================================
--- uClibc-0.9.30.1/libc/sysdeps/linux/sh/bits/mathdef.h (revision 25552)
+++ uClibc-0.9.30.1/libc/sysdeps/linux/sh/bits/mathdef.h (working copy)
@@ -61,3 +61,9 @@ typedef double double_t;
# define FP_ILOGBNAN 0x7fffffff
#endif /* ISO C99 */
+
+#ifndef __NO_LONG_DOUBLE_MATH
+/* Signal that we do not really have a `long double'. The disables the
+ declaration of all the `long double' function variants. */
+# define __NO_LONG_DOUBLE_MATH 1
+#endif

View File

@ -0,0 +1,13 @@
Index: uClibc/ldso/ldso/Makefile.in
===================================================================
--- uClibc.orig/ldso/ldso/Makefile.in 2009-02-03 17:27:55.000000000 -0800
+++ uClibc/ldso/ldso/Makefile.in 2009-02-03 17:28:11.000000000 -0800
@@ -8,7 +8,7 @@
CFLAGS-ldso := -DNOT_IN_libc -DIS_IN_rtld $(SSP_DISABLE_FLAGS)
# This stuff will not work with -fomit-frame-pointer
-CFLAGS-ldso += -fno-omit-frame-pointer
+CFLAGS-ldso += -O0 -fno-omit-frame-pointer
CFLAGS-ldso += -I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) -I$(top_srcdir)ldso/include -I$(top_srcdir)ldso/ldso
CFLAGS-ldso += -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\"

View File

@ -0,0 +1,72 @@
#
# Automatically generated make config: don't edit
# Version: 0.9.30.1
# Wed Jul 1 17:04:32 2009
#
# TARGET_alpha is not set
# TARGET_arm is not set
# TARGET_avr32 is not set
# TARGET_bfin is not set
# TARGET_cris is not set
# TARGET_e1 is not set
# TARGET_frv is not set
# TARGET_h8300 is not set
# TARGET_hppa is not set
TARGET_i386=y
# TARGET_i960 is not set
# TARGET_ia64 is not set
# TARGET_m68k is not set
# TARGET_microblaze is not set
# TARGET_mips is not set
# TARGET_nios is not set
# TARGET_nios2 is not set
# TARGET_powerpc is not set
# TARGET_sh is not set
# TARGET_sh64 is not set
# TARGET_sparc is not set
# TARGET_v850 is not set
# TARGET_vax is not set
# TARGET_x86_64 is not set
# TARGET_xtensa is not set
#
# Target Architecture Features and Options
#
TARGET_ARCH="i386"
FORCE_OPTIONS_FOR_ARCH=y
CONFIG_GENERIC_386=y
# CONFIG_386 is not set
# CONFIG_486 is not set
# CONFIG_586 is not set
# CONFIG_586MMX is not set
# CONFIG_686 is not set
# CONFIG_PENTIUMII is not set
# CONFIG_PENTIUMIII is not set
# CONFIG_PENTIUM4 is not set
# CONFIG_K6 is not set
# CONFIG_K7 is not set
# CONFIG_ELAN is not set
# CONFIG_CRUSOE is not set
# CONFIG_WINCHIPC6 is not set
# CONFIG_WINCHIP2 is not set
# CONFIG_CYRIXIII is not set
# CONFIG_NEHEMIAH is not set
TARGET_SUBARCH=""
#
# Using ELF file format
#
ARCH_LITTLE_ENDIAN=y
#
# Using Little Endian
#
ARCH_HAS_MMU=y
ARCH_USE_MMU=y
UCLIBC_HAS_FLOATS=y
UCLIBC_HAS_FPU=y
DO_C99_MATH=y
# UCLIBC_HAS_FENV is not set
UCLIBC_HAS_LONG_DOUBLE_MATH=y
KERNEL_HEADERS="/bla"
HAVE_DOT_CONFIG=y

View File

@ -1,34 +0,0 @@
SECTION = "base"
require uclibc_${PV}.bb
FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/uclibc-${PV}', '${FILE_DIRNAME}/uclibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
DEPENDS = "linux-libc-headers ncurses-native virtual/${TARGET_PREFIX}gcc-initial"
PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
PACKAGES = ""
do_stage() {
# Install initial headers into the cross dir
make PREFIX= DEVEL_PREFIX=${UCLIBC_STAGE_PREFIX}/ \
RUNTIME_PREFIX=${UCLIBC_STAGE_PREFIX}/ \
pregen install_dev
make PREFIX= DEVEL_PREFIX=${UCLIBC_STAGE_PREFIX}/ \
RUNTIME_PREFIX=${UCLIBC_STAGE_PREFIX}/ \
lib/crt1.o lib/crti.o lib/crtn.o
ln -sf include ${CROSS_DIR}/${TARGET_SYS}/sys-include
# This conflicts with the c++ version of this header
rm -f ${UCLIBC_STAGE_PREFIX}/include/bits/atomicity.h
install -m 644 lib/crt[1in].o ${UCLIBC_STAGE_PREFIX}/lib
${CC} -nostdlib -nostartfiles -shared -x c /dev/null \
-o ${UCLIBC_STAGE_PREFIX}/lib/libc.so
}
do_install() {
:
}
do_compile () {
:
}

View File

@ -0,0 +1,27 @@
SECTION = "base"
require uclibc_${PV}.bb
DEPENDS = "linux-libc-headers ncurses-native virtual/${TARGET_PREFIX}gcc-initial"
PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
PACKAGES = ""
do_install() {
# Install initial headers into the cross dir
make V=1 CC="${CC}" PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \
install_headers
#ln -sf include ${CROSS_DIR}/${TARGET_SYS}/sys-include
# This conflicts with the c++ version of this header
rm -f ${D}${includedir}/bits/atomicity.h
install -d ${D}${libdir}/
install -m 644 lib/crt[1in].o ${D}${libdir}/
install -d ${D}${libdir}/
install -m 644 lib/libc.so ${D}${libdir}/
}
do_compile () {
make V=1 CC="${CC}" PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \
lib/crt1.o lib/crti.o lib/crtn.o
${CC} -nostdlib -nostartfiles -shared -x c /dev/null \
-o lib/libc.so
}

View File

@ -22,26 +22,32 @@ python __anonymous () {
PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
PROVIDES += "${@['virtual/libiconv', ''][bb.data.getVar('USE_NLS', d, 1) != 'yes']}"
DEPENDS = "virtual/${TARGET_PREFIX}binutils \
virtual/${TARGET_PREFIX}gcc-intermediate linux-libc-headers ncurses-native pax-utils-native"
virtual/${TARGET_PREFIX}gcc-intermediate linux-libc-headers ncurses-native pax-utils-native"
RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
# Blackfin needs a wrapper around ld
DEPENDS_append_bfin = " elf2flt "
#DEPENDS_append_bfin = " elf2flt "
INHIBIT_DEFAULT_DEPS = "1"
PARALLEL_MAKE = ""
PACKAGES =+ "ldd uclibc-utils-dbg uclibc-utils uclibc-gconv uclibc-thread-db"
LEAD_SONAME = "libc.so"
# The last line (gdb and lib1) is for uclinux-uclibc builds
uclibc_baselibs = "/lib/libcrypt*.so* /lib/libdl*.so \
/lib/libintl*.so* /lib/libm*.so \
/lib/libnsl*.so* /lib/libpthread*.so \
/lib/libresolv*.so* /lib/libutil*.so \
/lib/libuClibc*.so* /lib/ld*.so* \
/lib/libc*.so* /lib/libdl*.so* \
/lib/libm*.so* /lib/libutil*.so* \
/lib/libpthread*.so* /lib/librt*.so* \
/usr/lib/libc.gdb /usr/lib/libc /lib/lib1.so \
uclibc_baselibs = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so \
${base_libdir}/libintl*.so.* ${base_libdir}/libintl-*.so \
${base_libdir}/libnsl*.so.* ${base_libdir}/libnsl-*.so \
${base_libdir}/libresolv*.so.* ${base_libdir}/libresolv-*.so \
${base_libdir}/ld*.so.* ${base_libdir}/ld-*.so \
${base_libdir}/libc*.so.* ${base_libdir}/libuClibc-*.so \
${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so \
${base_libdir}/libm*.so.* ${base_libdir}/libm-*.so \
${base_libdir}/libutil*.so.* ${base_libdir}/libutil-*.so \
${base_libdir}/libpthread*.so.* ${base_libdir}/libpthread-*.so \
${base_libdir}/librt*.so.* ${base_libdir}/librt-*.so \
${libdir}/libc.gdb ${libdir}/libc ${base_libdir}/lib1.so \
"
FILES_${PN} = "${sysconfdir} ${uclibc_baselibs} /sbin/ldconfig \
${libexecdir} ${datadir}/zoneinfo ${libdir}/locale"
@ -61,19 +67,20 @@ RPROVIDES_uclibc-dev += "libc-dev"
UCLIBC_LOCALE_FILE = "uClibc-locale-030818.tgz"
UCLIBC_LOCALE_FILE_arm = "uClibc-locale-030818.arm.tgz"
UCLIBC_LOCALE_URI = "http://www.uclibc.org/downloads/${UCLIBC_LOCALE_FILE}"
UCLIBC_LOCALE_URI_arm = "http://openembedded.org/dl/uclibc-locale/${UCLIBC_LOCALE_FILE}"
UCLIBC_LOCALE_URI_arm = "http://wiki.openembedded.net/dl/uclibc-locale/${UCLIBC_LOCALE_FILE}"
SRC_URI = "${@['${UCLIBC_LOCALE_URI}', ''][bb.data.getVar('USE_NLS', d, 1) != 'yes']} \
file://uClibc.config"
UCLIBC_STAGE_PREFIX = "${STAGING_DIR_HOST}${prefix}"
file://uClibc.config \
http://www.uclibc.org/downloads/uClibc-${PV}.tar.bz2 \
"
# do_stage barfs on a CC with whitepspace, therefore put the 'HOST_CC_ARCH' in
# the CFLAGS (for when building the utils).
OEMAKE_NO_CC = "'OPTIMIZATION=' 'CPU_CFLAGS=${CFLAGS}' 'STRIPTOOL=true' 'LD=${LD}' \
OEMAKE_NO_CC = "'STRIPTOOL=true' 'LD=${LD}' \
'LOCALE_DATA_FILENAME=${UCLIBC_LOCALE_FILE}'"
EXTRA_OEMAKE = "${OEMAKE_NO_CC} 'CC=${CC}' HOSTCFLAGS='-I${STAGING_INCDIR_NATIVE}'"
EXTRA_OEMAKE_task_do_populate_sysroot = "${OEMAKE_NO_CC}"
EXTRA_OEMAKE = "${OEMAKE_NO_CC} 'CC=${CC}' \
'HOSTCFLAGS=-I${STAGING_INCDIR_NATIVE}' \
ARCH=`grep TARGET_ARCH ${S}/.config|sed -e 's/TARGET_ARCH=//g'`"
EXTRA_OEMAKE_task_do_package = "${OEMAKE_NO_CC}"
KERNEL_SOURCE = "${STAGING_INCDIR}"
@ -94,7 +101,10 @@ configmangle = 's,^KERNEL_SOURCE=.*,KERNEL_SOURCE="${KERNEL_SOURCE}",g; \
s,^SHARED_LIB_LOADER_PATH=.*,SHARED_LIB_LOADER_PATH="/lib",; \
s,^SHARED_LIB_LOADER_PREFIX=.*,SHARED_LIB_LOADER_PREFIX="/lib",; \
s,.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y,g; \
${@["s,.*UCLIBC_HAS_LOCALE.*,# UCLIBC_HAS_LOCALE is not set,;", ""][bb.data.getVar("USE_NLS", d, 1) == "yes"]}'
${@["","s,.*UCLIBC_HAS_LOCALE.*,UCLIBC_HAS_LOCALE=y,;"][bb.data.getVar("USE_NLS", d, 1) == "yes"]} \
${@["","s,.*LDSO_GNU_HASH_SUPPORT.*,# LDSO_GNU_HASH_SUPPORT is not set,;"][bb.data.getVar("TARGET_ARCH", d, 1) in ['mips', 'mipsel', 'avr32']]} \
'
CFLAGS := "${@oe_filter_out('-I\S+', '${CFLAGS}', d)}"
python () {
@ -133,84 +143,41 @@ do_configure() {
# Mangle the resulting .config depending on OE variables
perl -i -p -e 's,^CROSS=.*,TARGET_ARCH=${TARGET_ARCH}\nCROSS=${TARGET_PREFIX},g' ${S}/Rules.mak
sed -i -e s:'$(CROSS)strip':true: ${S}/Rules.mak
perl -i -p -e '${configmangle}' ${S}/.config
sed -i -e '/CONFIG_ARM_EABI/d' ${S}/.config
if [ "${TARGET_OS}" = "linux-gnueabi" -o "${TARGET_OS}" = "linux-uclibcgnueabi" ]; then
echo "CONFIG_ARM_EABI=y" >> ${S}/.config
else
echo "# CONFIG_ARM_EABI is not set" >> ${S}/.config
if [ `echo ${TARGET_ARCH} | grep -e '^arm'` ]; then
if [ `echo ${TARGET_OS} | grep -e 'eabi$'` ]; then
echo "CONFIG_ARM_EABI=y" >> ${S}/.config
else
echo "# CONFIG_ARM_EABI is not set" >> ${S}/.config
fi
fi
yes '' | oe_runmake oldconfig
}
do_stage() {
# This MUST be done first because we
# will install crt1.o in the install_dev stage and gcc needs it
# Install into the staging dir
oe_runmake PREFIX= DEVEL_PREFIX=${UCLIBC_STAGE_PREFIX}/ \
RUNTIME_PREFIX=${UCLIBC_STAGE_PREFIX}/ \
install_dev install_runtime
# Install into the staging dir
oe_runmake PREFIX= DEVEL_PREFIX=${UCLIBC_STAGE_PREFIX}/ \
RUNTIME_PREFIX=${UCLIBC_STAGE_PREFIX}/ \
install_utils
# We don't really need this
rm -f ${UCLIBC_STAGE_PREFIX}/include/.cvsignore
# Fixup shared lib symlinks
( cd ${UCLIBC_STAGE_PREFIX}/lib
for f in c crypt dl m nsl pthread resolv thread_db util; do
ln -sf lib${f}.so.? lib${f}.so
done
)
# This conflicts with the c++ version of this header
rm -f ${UCLIBC_STAGE_PREFIX}/include/bits/atomicity.h
}
do_install() {
# Tis MUST be done first because we
# will install crt1.o in the install_dev stage and gcc needs it)
oe_runmake PREFIX= DEVEL_PREFIX=${UCLIBC_STAGE_PREFIX}/ \
RUNTIME_PREFIX=${UCLIBC_STAGE_PREFIX}/ \
install_dev install_runtime
oe_runmake PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \
install_dev install_runtime
# Need to overwrite the version from -initial
if [ ! -e ${D}${libdir}/libc.so ]; then
ln -s ../../lib/libc.so.0 ${D}${libdir}/libc.so
fi
# We don't really need this in ${includedir}
rm -f ${D}${prefix}/include/.cvsignore
# This conflicts with the c++ version of this header
rm -f ${D}${prefix}/include/bits/atomicity.h
# ugh.. uclibc doesn't like obeying our path variables.
if [ "${includedir}" != "${prefix}/include" ]; then
install -d ${D}${includedir}
mv ${D}${prefix}/include/* ${D}${includedir}/
rmdir ${D}${prefix}/include
fi
if [ "${libdir}" != "${prefix}/lib" ]; then
install -d ${D}${libdir}
mv ${D}${prefix}/lib/* ${D}${libdir}/
rmdir ${D}${prefix}/lib
fi
if [ "${bindir}" != "/usr/bin" ]; then
install -d ${D}${bindir}
mv ${D}/usr/bin/* ${D}${bindir}/
rmdir ${D}/usr/bin
fi
oe_runmake utils
oe_runmake PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \
oe_runmake "SSP_ALL_CFLAGS=${TARGET_LINK_HASH_STYLE}" utils
oe_runmake STRIPTOOL=true PREFIX=${D} DEVEL_PREFIX=${prefix}/ RUNTIME_PREFIX=/ \
install_utils
# oe_runstrip needs +x on files
chmod +x ${D}/${base_libdir}/*
}

View File

@ -6,39 +6,28 @@
# UCLIBC_BASE can be set in a distro file, but whether this works depends
# on whether the base patches apply to the selected (SRCDATE) svn release.
#
UCLIBC_BASE ?= "0.9.29"
PR = "r9"
UCLIBC_BASE ?= "0.9.30.1"
require uclibc.inc
PR = "r0"
PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
DEPENDS += "ncurses-native"
SRC_URI += "file://uClibc.machine file://uClibc.distro \
file://errno_values.h.patch;patch=1 \
file://termios.h.patch;patch=1 \
file://uClibc-0.9.29-001-fix-mmap.patch;patch=1 \
file://uClibc-0.9.29-conditional-sched_affinity.patch;patch=1 \
file://uClibc-0.9.29-fix-gethostent_r-failure-retval.patch;patch=1 \
file://uClibc-0.9.29-fix-internal_function-definition.patch;patch=1 \
file://uClibc-0.9.29-rm-whitespace.patch;patch=1 \
file://arm_fix_alignment.patch;patch=1 \
"
# mmap-unsigned-shift_bugid1303.patch
# http://uclibc.org/lists/uclibc-cvs/2007-May/011360.html;patch=1"
file://arm-linuxthreads.patch;patch=1 \
file://linuxthreads-changes.patch;patch=1 \
file://pthread_atfork.patch;patch=1 \
file://uclibc_ldso_use_O0.patch;patch=1 \
file://ldso_use_arm_dl_linux_resolve_in_thumb_mode.patch;patch=1 \
file://gcc-4.4-fixlet.patch;patch=1 \
file://uclibc-c99-ldbl-math.patch;patch=1 \
file://Use-__always_inline-instead-of-__inline__.patch;patch=1 \
"
#recent versions uclibc require real kernel headers
PACKAGE_ARCH = "${MACHINE_ARCH}"
#as stated above, uclibc needs real kernel-headers
#however: we can't depend on virtual/kernel when nptl hits due to depends deadlocking ....
KERNEL_SOURCE = "${CROSS_DIR}/${TARGET_SYS}"
SRC_URI += "http://www.uclibc.org/downloads/uClibc-${PV}.tar.bz2"
KERNEL_SOURCE = "${STAGING_DIR_HOST}/${exec_prefix}"
S = "${WORKDIR}/uClibc-${UCLIBC_BASE}"
LEAD_SONAME = "libc.so"