summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-01-30 11:26:38 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2010-01-30 11:26:38 +0100
commitb3b48218d1d31b4f6c2675524ae1062fc3bd6a20 (patch)
tree73651249c05c2b4491827d2ebdf672b8d4bbe961
parentdfa96004d55e82830f91cd2d8ddfe19254f9e9f6 (diff)
update uclibc to latest upstream version
MIPS problem is solved, no extension patch needed anymore. uClibc can be compiled again with optimization for size. getline patch is already included upstream. New patch backported from uclibc-current, to compile fastat on 64 Bit Host and Target. ICE for Etrax also fixed.
-rw-r--r--target/rb532/uclibc.config5
-rw-r--r--toolchain/uClibc/Makefile10
-rw-r--r--toolchain/uClibc/Makefile.inc2
-rw-r--r--toolchain/uClibc/patches/disable-opt-debug-cflags.patch25
-rw-r--r--toolchain/uClibc/patches/extension-insteadof-inline.patch77
-rw-r--r--toolchain/uClibc/patches/fastat-64bithost.patch79
-rw-r--r--toolchain/uClibc/patches/getline.patch30
-rw-r--r--toolchain/uClibc/patches/mips.patch66
-rw-r--r--toolchain/uClibc/patches/mips64.patch12
-rw-r--r--toolchain/uClibc/patches/null-pointer.patch12
10 files changed, 152 insertions, 166 deletions
diff --git a/target/rb532/uclibc.config b/target/rb532/uclibc.config
index 9a6a711be..34038425d 100644
--- a/target/rb532/uclibc.config
+++ b/target/rb532/uclibc.config
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Version: 0.9.30.1
-# Thu Jun 18 16:03:47 2009
+# Version: 0.9.30.2
+# Fri Jan 29 19:30:32 2010
#
# TARGET_alpha is not set
# TARGET_arm is not set
@@ -24,6 +24,7 @@ TARGET_mips=y
# TARGET_sh is not set
# TARGET_sh64 is not set
# TARGET_sparc is not set
+# TARGET_ubicom32 is not set
# TARGET_v850 is not set
# TARGET_vax is not set
# TARGET_x86_64 is not set
diff --git a/toolchain/uClibc/Makefile b/toolchain/uClibc/Makefile
index 9ecb2afa4..edb9bdc56 100644
--- a/toolchain/uClibc/Makefile
+++ b/toolchain/uClibc/Makefile
@@ -8,14 +8,10 @@ include ../rules.mk
include Makefile.inc
include ${TOPDIR}/mk/buildhlp.mk
-#workaround for mips and gcc 4.4, where -Os does not inline code in ld.so
-ifeq ($(ARCH),mips)
-TARGET_CFLAGS:=$(subst Os,O2,$(TARGET_CFLAGS))
-endif
#workaround for cris and gcc 4.4, where -Os generates ICE
-ifeq ($(ARCH),cris)
-TARGET_CFLAGS:=$(subst Os,O2,$(TARGET_CFLAGS))
-endif
+#ifeq ($(ARCH),cris)
+#TARGET_CFLAGS:=$(subst Os,O2,$(TARGET_CFLAGS))
+#endif
$(WRKBUILD)/.headers:
$(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(WRKBUILD)/Rules.mak
diff --git a/toolchain/uClibc/Makefile.inc b/toolchain/uClibc/Makefile.inc
index 5fdeb5a17..cc215bd1c 100644
--- a/toolchain/uClibc/Makefile.inc
+++ b/toolchain/uClibc/Makefile.inc
@@ -2,7 +2,7 @@
# material, please see the LICENCE file in the top-level directory.
PKG_NAME:= uClibc
-PKG_VERSION:= 0.9.30.1
+PKG_VERSION:= 0.9.30.2
PKG_RELEASE:= 1
PKG_MD5SUM:= 1a4b84e5536ad8170563ffa88c34679c
PKG_SITES:= http://uclibc.org/downloads/
diff --git a/toolchain/uClibc/patches/disable-opt-debug-cflags.patch b/toolchain/uClibc/patches/disable-opt-debug-cflags.patch
deleted file mode 100644
index 434f1d793..000000000
--- a/toolchain/uClibc/patches/disable-opt-debug-cflags.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff -Nur uClibc-0.9.30.1.orig/Rules.mak uClibc-0.9.30.1/Rules.mak
---- uClibc-0.9.30.1.orig/Rules.mak 2009-03-02 22:10:04.000000000 +0100
-+++ uClibc-0.9.30.1/Rules.mak 2009-06-18 16:02:34.000000000 +0200
-@@ -150,9 +150,10 @@
- # Flags in OPTIMIZATION are used only for non-debug builds
- OPTIMIZATION:=
- # Use '-Os' optimization if available, else use -O2, allow Config to override
--OPTIMIZATION+=$(call check_gcc,-Os,-O2)
-+# disable, let OpenADK do the optimization
-+#OPTIMIZATION+=$(call check_gcc,-Os,-O2)
- # Use the gcc 3.4 -funit-at-a-time optimization when available
--OPTIMIZATION+=$(call check_gcc,-funit-at-a-time,)
-+#OPTIMIZATION+=$(call check_gcc,-funit-at-a-time,)
-
- GCC_MAJOR_VER?=$(shell $(CC) -dumpversion | cut -d . -f 1)
- #GCC_MINOR_VER?=$(shell $(CC) -dumpversion | cut -d . -f 2)
-@@ -547,7 +548,7 @@
-
- LDFLAGS:=$(LDFLAGS_NOSTRIP) -Wl,-z,defs
- ifeq ($(DODEBUG),y)
--CFLAGS += -O0 -g3
-+CFLAGS +=
- else
- CFLAGS += $(OPTIMIZATION) $(XARCH_CFLAGS)
- endif
diff --git a/toolchain/uClibc/patches/extension-insteadof-inline.patch b/toolchain/uClibc/patches/extension-insteadof-inline.patch
deleted file mode 100644
index bd3a720e9..000000000
--- a/toolchain/uClibc/patches/extension-insteadof-inline.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-diff -Nur uClibc-0.9.30.1.orig/ldso/ldso/mips/dl-sysdep.h uClibc-0.9.30.1/ldso/ldso/mips/dl-sysdep.h
---- uClibc-0.9.30.1.orig/ldso/ldso/mips/dl-sysdep.h 2008-09-15 18:36:11.000000000 +0200
-+++ uClibc-0.9.30.1/ldso/ldso/mips/dl-sysdep.h 2009-06-21 19:08:44.487613137 +0200
-@@ -163,22 +163,25 @@
-
- #define OFFSET_GP_GOT 0x7ff0
-
--static __inline__ ElfW(Addr) *
--elf_mips_got_from_gpreg (ElfW(Addr) gpreg)
--{
-- /* FIXME: the offset of gp from GOT may be system-dependent. */
-- return (ElfW(Addr) *) (gpreg - OFFSET_GP_GOT);
--}
-+#define elf_mips_got_from_gpreg(gpreg) __extension__({ \
-+ ElfW(Addr) *elf_mips_got_from_gpreg_res; \
-+ \
-+ /* FIXME: the offset of gp from GOT may be system-dependent. */ \
-+ elf_mips_got_from_gpreg_res = gpreg - OFFSET_GP_GOT; \
-+ (elf_mips_got_from_gpreg_res); \
-+})
-
- /* 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)
--elf_machine_dynamic (void)
--{
-- register ElfW(Addr) gp __asm__ ("$28");
-- return *elf_mips_got_from_gpreg (gp);
--}
-+#define elf_machine_dynamic() __extension__({ \
-+ register ElfW(Addr) elf_machine_dynamic_gp __asm__("$28"); \
-+ ElfW(Addr) elf_machine_dynamic_res; \
-+ \
-+ elf_machine_dynamic_res = *elf_mips_got_from_gpreg( \
-+ elf_machine_dynamic_gp); \
-+ (elf_machine_dynamic_res); \
-+})
-
- #define STRINGXP(X) __STRING(X)
- #define STRINGXV(X) STRINGV_(X)
-@@ -192,21 +195,20 @@
- #endif
-
- /* Return the run-time load address of the shared object. */
--static __inline__ ElfW(Addr)
--elf_machine_load_address (void)
--{
-- ElfW(Addr) addr;
-- __asm__ (" .set noreorder\n"
-- " " STRINGXP (PTR_LA) " %0, 0f\n"
-- " bltzal $0, 0f\n"
-- " nop\n"
-- "0: " STRINGXP (PTR_SUBU) " %0, $31, %0\n"
-- " .set reorder\n"
-- : "=r" (addr)
-- : /* No inputs */
-- : "$31");
-- return addr;
--}
-+#define elf_machine_load_address() __extension__({ \
-+ ElfW(Addr) elf_machine_load_address_addr; \
-+ \
-+ __asm__ (" .set noreorder\n" \
-+ " " STRINGXP (PTR_LA) " %0, 0f\n" \
-+ " bltzal $0, 0f\n" \
-+ " nop\n" \
-+ "0: " STRINGXP (PTR_SUBU) " %0, $31, %0\n" \
-+ " .set reorder\n" \
-+ : "=r" (elf_machine_load_address_addr) \
-+ : /* No inputs */ \
-+ : "$31"); \
-+ (elf_machine_load_address_addr); \
-+})
-
- static __inline__ void
- elf_machine_relative (ElfW(Addr) load_off, const ElfW(Addr) rel_addr,
diff --git a/toolchain/uClibc/patches/fastat-64bithost.patch b/toolchain/uClibc/patches/fastat-64bithost.patch
new file mode 100644
index 000000000..dee068d00
--- /dev/null
+++ b/toolchain/uClibc/patches/fastat-64bithost.patch
@@ -0,0 +1,79 @@
+diff -Nur uClibc-0.9.30.2.orig/libc/sysdeps/linux/common/fstatat64.c uClibc-0.9.30.2/libc/sysdeps/linux/common/fstatat64.c
+--- uClibc-0.9.30.2.orig/libc/sysdeps/linux/common/fstatat64.c 2010-01-13 22:22:31.000000000 +0100
++++ uClibc-0.9.30.2/libc/sysdeps/linux/common/fstatat64.c 2010-01-23 11:55:14.000000000 +0100
+@@ -12,6 +12,11 @@
+
+ #ifdef __UCLIBC_HAS_LFS__
+
++/* 64bit ports tend to favor newfstatat() */
++#ifdef __NR_newfstatat
++# define __NR_fstatat64 __NR_newfstatat
++#endif
++
+ #ifdef __NR_fstatat64
+ int fstatat64(int fd, const char *file, struct stat64 *buf, int flag)
+ {
+diff -Nur uClibc-0.9.30.2.orig/libc/sysdeps/linux/common/fstatat.c uClibc-0.9.30.2/libc/sysdeps/linux/common/fstatat.c
+--- uClibc-0.9.30.2.orig/libc/sysdeps/linux/common/fstatat.c 2010-01-13 22:22:31.000000000 +0100
++++ uClibc-0.9.30.2/libc/sysdeps/linux/common/fstatat.c 2010-01-23 11:54:50.000000000 +0100
+@@ -10,15 +10,20 @@
+ #include <sys/stat.h>
+ #include "xstatconv.h"
+
++/* 64bit ports tend to favor newfstatat() */
++#ifdef __NR_newfstatat
++# define __NR_fstatat64 __NR_newfstatat
++#endif
++
+ #ifdef __NR_fstatat64
+ int fstatat(int fd, const char *file, struct stat *buf, int flag)
+ {
+ int ret;
+- struct kernel_stat kbuf;
++ struct kernel_stat64 kbuf;
+
+ ret = INLINE_SYSCALL(fstatat64, 4, fd, file, &kbuf, flag);
+ if (ret == 0)
+- __xstat_conv(&kbuf, buf);
++ __xstat32_conv(&kbuf, buf);
+
+ return ret;
+ }
+diff -Nur uClibc-0.9.30.2.orig/libc/sysdeps/linux/common/xstatconv.c uClibc-0.9.30.2/libc/sysdeps/linux/common/xstatconv.c
+--- uClibc-0.9.30.2.orig/libc/sysdeps/linux/common/xstatconv.c 2010-01-13 22:22:31.000000000 +0100
++++ uClibc-0.9.30.2/libc/sysdeps/linux/common/xstatconv.c 2010-01-23 11:56:07.000000000 +0100
+@@ -70,4 +70,23 @@
+ buf->st_ctim = kbuf->st_ctim;
+ }
+
++void __xstat32_conv(struct kernel_stat64 *kbuf, struct stat *buf)
++{
++ /* Convert to current kernel version of `struct stat64'. */
++ memset(buf, 0x00, sizeof(*buf));
++ buf->st_dev = kbuf->st_dev;
++ buf->st_ino = kbuf->st_ino;
++ buf->st_mode = kbuf->st_mode;
++ buf->st_nlink = kbuf->st_nlink;
++ buf->st_uid = kbuf->st_uid;
++ buf->st_gid = kbuf->st_gid;
++ buf->st_rdev = kbuf->st_rdev;
++ buf->st_size = kbuf->st_size;
++ buf->st_blksize = kbuf->st_blksize;
++ buf->st_blocks = kbuf->st_blocks;
++ buf->st_atim = kbuf->st_atim;
++ buf->st_mtim = kbuf->st_mtim;
++ buf->st_ctim = kbuf->st_ctim;
++}
++
+ #endif /* __UCLIBC_HAS_LFS__ */
+diff -Nur uClibc-0.9.30.2.orig/libc/sysdeps/linux/common/xstatconv.h uClibc-0.9.30.2/libc/sysdeps/linux/common/xstatconv.h
+--- uClibc-0.9.30.2.orig/libc/sysdeps/linux/common/xstatconv.h 2010-01-13 22:22:31.000000000 +0100
++++ uClibc-0.9.30.2/libc/sysdeps/linux/common/xstatconv.h 2010-01-23 11:56:38.000000000 +0100
+@@ -26,6 +26,7 @@
+ #include <bits/kernel_stat.h>
+
+ extern void __xstat_conv(struct kernel_stat *kbuf, struct stat *buf) attribute_hidden;
++extern void __xstat32_conv(struct kernel_stat64 *kbuf, struct stat *buf) attribute_hidden;
+ #if defined __UCLIBC_HAS_LFS__
+ extern void __xstat64_conv(struct kernel_stat64 *kbuf, struct stat64 *buf) attribute_hidden;
+ #endif
diff --git a/toolchain/uClibc/patches/getline.patch b/toolchain/uClibc/patches/getline.patch
deleted file mode 100644
index fb9f9bcc2..000000000
--- a/toolchain/uClibc/patches/getline.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff -Nur uClibc-0.9.30.1.orig/extra/scripts/unifdef.c uClibc-0.9.30.1/extra/scripts/unifdef.c
---- uClibc-0.9.30.1.orig/extra/scripts/unifdef.c 2008-04-28 01:10:00.000000000 +0200
-+++ uClibc-0.9.30.1/extra/scripts/unifdef.c 2009-10-10 12:37:04.230249774 +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 get_line(void);
- static Linetype ifeval(const char **);
- static void ignoreoff(void);
- static void ignoreon(void);
-@@ -512,7 +512,7 @@
-
- for (;;) {
- linenum++;
-- lineval = getline();
-+ lineval = get_line();
- 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)
-+get_line(void)
- {
- const char *cp;
- int cursym;
diff --git a/toolchain/uClibc/patches/mips.patch b/toolchain/uClibc/patches/mips.patch
new file mode 100644
index 000000000..59bf5963c
--- /dev/null
+++ b/toolchain/uClibc/patches/mips.patch
@@ -0,0 +1,66 @@
+diff -Nur uClibc-0.9.30.2.orig/libc/sysdeps/linux/mips/crt1.S uClibc-0.9.30.2/libc/sysdeps/linux/mips/crt1.S
+--- uClibc-0.9.30.2.orig/libc/sysdeps/linux/mips/crt1.S 2010-01-13 22:22:31.000000000 +0100
++++ uClibc-0.9.30.2/libc/sysdeps/linux/mips/crt1.S 2010-01-24 20:33:06.297867491 +0100
+@@ -85,29 +85,10 @@
+
+ __start:
+ #ifdef __PIC__
+-#if _MIPS_SIM == _MIPS_SIM_ABI32
+- .frame sp, 24, sp
+- .set noreorder
+- move $0, $31 /* Save old ra. */
+- bal 10f /* Find addr of cpload. */
+- nop
+-10:
+- .cpload $31
+- move $31, $0
+- .set reorder
+- .cprestore 16
+-#else
+- move $0, $31; /* Save old ra. */
+- .set noreorder
+- bal 10f /* Find addr of .cpsetup. */
+- nop
+-10:
+- .set reorder
+- .cpsetup $31, $25, 10b
+- move $31, $0
+-#endif
++ SETUP_GPX($0)
++ SETUP_GPX64($25,$0)
+ #else
+- la $28, _gp /* Setup GP correctly if we're non-PIC. */
++ PTR_LA $28, _gp /* Setup GP correctly if we're non-PIC. */
+ move $31, $0
+ #endif
+
+@@ -118,18 +99,18 @@
+ /* Allocate space on the stack for seven arguments and
+ * make sure the stack is aligned to double words (8 bytes) */
+
++ and $29, -2 * SZREG
++
+ #if _MIPS_SIM == _MIPS_SIM_ABI32
+- and $29, -2 * 4
+- subu $29, 32
+- la $7, _init /* init */
+- la $8, _fini
+- sw $8, 16($29) /* fini */
+- sw $2, 20($29) /* rtld_fini */
+- sw $29, 24($29) /* stack_end */
+-#else
+- and $29, -2 * PTRSIZE
++ PTR_SUBIU $29, 32
++#endif
+ PTR_LA $7, _init /* init */
+- PTR_LA $8, _fini /* fini */
++ PTR_LA $8, _fini
++#if _MIPS_SIM == _MIPS_SIM_ABI32
++ PTR_S $8, 16($29) /* fini */
++ PTR_S $2, 20($29) /* rtld_fini */
++ PTR_S $29, 24($29) /* stack_end */
++#else
+ move $9, $2 /* rtld_fini */
+ move $10, $29 /* stack_end */
+ #endif
+-
diff --git a/toolchain/uClibc/patches/mips64.patch b/toolchain/uClibc/patches/mips64.patch
deleted file mode 100644
index 70fcc24e6..000000000
--- a/toolchain/uClibc/patches/mips64.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Nur uClibc-0.9.30.1.orig/Rules.mak uClibc-0.9.30.1/Rules.mak
---- uClibc-0.9.30.1.orig/Rules.mak 2009-03-02 22:10:04.000000000 +0100
-+++ uClibc-0.9.30.1/Rules.mak 2009-05-28 15:08:37.000000000 +0200
-@@ -292,7 +292,7 @@
- CPU_CFLAGS-$(CONFIG_MIPS_ISA_4)+=-mips4 -mtune=mips4
- CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS32)+=-mips32 -mtune=mips32
- CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS32R2)+=-march=mips32r2 -mtune=mips32r2
-- CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS64)+=-mips64 -mtune=mips32
-+ CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS64)+=-mips64
- ifeq ($(strip $(ARCH_BIG_ENDIAN)),y)
- CPU_LDFLAGS-$(CONFIG_MIPS_N64_ABI)+=-Wl,-melf64btsmip
- CPU_LDFLAGS-$(CONFIG_MIPS_O32_ABI)+=-Wl,-melf32btsmip
diff --git a/toolchain/uClibc/patches/null-pointer.patch b/toolchain/uClibc/patches/null-pointer.patch
deleted file mode 100644
index e77cd72b8..000000000
--- a/toolchain/uClibc/patches/null-pointer.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Nur uClibc-0.9.30.1.orig/libc/inet/getaddrinfo.c uClibc-0.9.30.1/libc/inet/getaddrinfo.c
---- uClibc-0.9.30.1.orig/libc/inet/getaddrinfo.c 2009-02-26 13:49:14.000000000 +0100
-+++ uClibc-0.9.30.1/libc/inet/getaddrinfo.c 2009-06-14 17:46:45.000000000 +0200
-@@ -187,6 +187,8 @@
- }
-
- for (runp = ifa; runp != NULL; runp = runp->ifa_next) {
-+ if (runp->ifa_addr == NULL)
-+ continue;
- #if defined __UCLIBC_HAS_IPV4__
- if (runp->ifa_addr->sa_family == PF_INET)
- seen |= SEEN_IPV4;