changeset 955:651b2f107fe9

Update uClibc to 0.9.30.2. (Breaks mips, tracking that down now.)
author Rob Landley <rob@landley.net>
date Tue, 19 Jan 2010 19:29:51 -0600
parents 5706228c2e6a
children ba1b92e403e7
files download.sh sources/patches/uClibc-add-shm.patch sources/patches/uClibc-fix-getline.patch sources/patches/uClibc-fixsh4.patch sources/patches/uClibc-fixsparc.patch sources/patches/uClibc-installutils.patch sources/patches/uClibc-sparcldso.patch
diffstat 7 files changed, 2 insertions(+), 267 deletions(-) [+]
line wrap: on
line diff
--- a/download.sh	Tue Jan 19 19:27:39 2010 -0600
+++ b/download.sh	Tue Jan 19 19:29:51 2010 -0600
@@ -35,8 +35,8 @@
 UNSTABLE=http://kernel.org/pub/linux/kernel/v2.6/testing/linux-2.6.32-rc7.tar.bz2 \
 download || dienow
 
-URL=http://www.uclibc.org/downloads/uClibc-0.9.30.1.tar.bz2 \
-SHA1=4b36fec9a0dacbd6fe0fd2cdb7836aaf8b7f4992 \
+URL=http://www.uclibc.org/downloads/uClibc-0.9.30.2.tar.bz2 \
+SHA1=a956b1c37e3163c961dad7fdf96b6d4c7e176d1f \
 UNSTABLE=http://uclibc.org/downloads/uClibc-snapshot.tar.bz2 \
 download || dienow
 
--- a/sources/patches/uClibc-add-shm.patch	Tue Jan 19 19:27:39 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-librt/shm.c |   98 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 1 files changed, 98 insertions(+), 0 deletions(-)
- create mode 100644 librt/shm.c
-
-diff --git a/librt/shm.c b/librt/shm.c
-new file mode 100644
-index 0000000..637e945
---- /dev/null
-+++ b/librt/shm.c
-@@ -0,0 +1,98 @@
-+/* Copyright (C) 2009 Bernhard Reutner-Fischer <uclibc at uclibc.org>
-+ *
-+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-+ */
-+
-+#include <features.h>
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+#include <fcntl.h>
-+#include <unistd.h>
-+#include <stdlib.h>
-+#include <stdio.h>
-+
-+#ifndef O_CLOEXEC
-+#include <errno.h>
-+#endif
-+
-+#ifndef _PATH_SHM
-+#define _PATH_SHM "/dev/shm/"
-+#endif
-+
-+#ifndef NAME_MAX
-+#define NAME_MAX 255
-+#endif
-+
-+/* Get name of dummy shm operation handle.
-+ * Returns a malloc'ed buffer containing the OS specific path
-+ * to the shm filename or NULL upon failure.
-+ */
-+static __attribute_noinline__ char* get_shm_name(const char*name) __nonnull((1));
-+static char* get_shm_name(const char*name)
-+{
-+	char *path;
-+	int i;
-+
-+	/* Skip leading slashes */
-+	while (*name == '/')
-+		++name;
-+#ifdef __USE_GNU
-+	i = asprintf(&path, _PATH_SHM "%s", name);
-+	if (i < 0)
-+		return NULL;
-+#else
-+	path = malloc(NAME_MAX);
-+	if (path == NULL)
-+		return NULL;
-+	i = snprintf(path, NAME_MAX, _PATH_SHM "%s", name);
-+	if (i < 0) {
-+		free(path);
-+		return NULL;
-+	}
-+#endif
-+	return path;
-+}
-+
-+int shm_open(const char *name, int oflag, mode_t mode)
-+{
-+	int fd, old_errno;
-+	char *shm_name = get_shm_name(name);
-+
-+	/* Stripped multiple '/' from start; may have set errno properly */
-+	if (shm_name == NULL)
-+		return -1;
-+	/* The FD_CLOEXEC file descriptor flag associated with the new
-+	 * file descriptor is set.  */
-+#ifdef O_CLOEXEC
-+	 /* Just open it with CLOEXEC set, for brevity */
-+	fd = open(shm_name, oflag | O_CLOEXEC, mode);
-+#else
-+	fd = open(shm_name, oflag, mode);
-+	if (fd >= 0) {
-+		int fdflags = fcntl(fd, F_GETFD, 0);
-+		if (fdflags >= 0)
-+			fdflags = fcntl(fd, F_SETFD, fdflags | FD_CLOEXEC);
-+		if (fdflags < 0) {
-+			close(fd);
-+			fd = -1;
-+		}
-+	}
-+#endif
-+	old_errno = errno;
-+	free(shm_name);
-+	errno = old_errno;
-+	return fd;
-+}
-+
-+int shm_unlink(const char *name)
-+{
-+	char *shm_name = get_shm_name(name);
-+	int ret;
-+
-+	/* Stripped multiple '/' from start; may have set errno properly */
-+	if (shm_name == NULL)
-+		return -1;
-+	ret = unlink(shm_name);
-+	free(shm_name);
-+	return ret;
-+}
--- a/sources/patches/uClibc-fix-getline.patch	Tue Jan 19 19:27:39 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-From: Justin P. Mattock <justinmattock@gmail.com>
-
-commit d15bd1067b1fcb2b7250d22bc0c7c7fea0b759f7 upstream (linux kernel).
-
-This fixes an error when compiling the kernel.
-
-  CHK     include/linux/version.h
-  HOSTCC  scripts/unifdef
-scripts/unifdef.c:209: error: conflicting types for 'getline'
-/usr/include/stdio.h:651: note: previous declaration of 'getline' was here
-make[1]: *** [scripts/unifdef] Error 1
-make: *** [__headers] Error 2
-
-Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
-Cc:  Frederic Weisbecker <fweisbec@gmail.com>
-Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
-Cc: Gilles Espinasse <g.esp@free.fr>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
---
- scripts/unifdef.c |    6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
---- a/extra/scripts/unifdef.c
-+++ b/extra/scripts/unifdef.c
-@@ -206,7 +206,7 @@ static void             done(void);
- 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 @@ process(void)
- 
- 	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 @@ process(void)
-  * help from skipcomment().
-  */
- static Linetype
--getline(void)
-+get_line(void)
- {
- 	const char *cp;
- 	int cursym;
--- a/sources/patches/uClibc-fixsh4.patch	Tue Jan 19 19:27:39 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-diff -ru uClibc/libc/sysdeps/linux/sh/bits/kernel_types.h uClibc2/libc/sysdeps/linux/sh/bits/kernel_types.h
---- uClibc/libc/sysdeps/linux/sh/bits/kernel_types.h	2008-07-23 06:23:36.000000000 -0500
-+++ uClibc2/libc/sysdeps/linux/sh/bits/kernel_types.h	2009-09-17 21:05:29.000000000 -0500
-@@ -4,8 +4,9 @@
-  * our private content, and not the kernel header, will win.
-  *  -Erik
-  */
--#ifndef __ASM_SH_POSIX_TYPES_H
-+#if !defined(__ASM_SH_POSIX_TYPES_H) && !defined(__ASM_SH_POSIX_TYPES_32_H)
- #define __ASM_SH_POSIX_TYPES_H
-+#define __ASM_SH_POSIX_TYPES_32_H
- 
- typedef unsigned short	__kernel_dev_t;
- typedef unsigned long	__kernel_ino_t;
-diff -ru uClibc/libc/sysdeps/linux/sh64/bits/kernel_types.h uClibc2/libc/sysdeps/linux/sh64/bits/kernel_types.h
---- uClibc/libc/sysdeps/linux/sh64/bits/kernel_types.h	2008-07-23 06:23:36.000000000 -0500
-+++ uClibc2/libc/sysdeps/linux/sh64/bits/kernel_types.h	2009-09-17 21:06:35.000000000 -0500
-@@ -16,8 +16,9 @@
-  * our private content, and not the kernel header, will win.
-  *  -Erik
-  */
--#ifndef __ASM_SH64_POSIX_TYPES_H
-+#if !defined(__ASM_SH64_POSIX_TYPES_H) && !defined(__ASM_SH_POSIX_TYPES_64_H)
- #define __ASM_SH64_POSIX_TYPES_H
-+#define __ASM_SH_POSIX_TYPES_64_H
- 
- typedef unsigned short  __kernel_dev_t;
- typedef unsigned long   __kernel_ino_t;
--- a/sources/patches/uClibc-fixsparc.patch	Tue Jan 19 19:27:39 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-diff -ru uClibc/libc/sysdeps/linux/sparc/bits/kernel_types.h uClibc.bak/libc/sysdeps/linux/sparc/bits/kernel_types.h
---- uClibc/libc/sysdeps/linux/sparc/bits/kernel_types.h	2008-07-23 06:23:36.000000000 -0500
-+++ uClibc.bak/libc/sysdeps/linux/sparc/bits/kernel_types.h	2009-03-26 18:05:26.000000000 -0500
-@@ -4,9 +4,10 @@
-  * our private content, and not the kernel header, will win.
-  *  -Erik
-  */
--#if ! defined __ARCH_SPARC_POSIX_TYPES_H && ! defined __ARCH_SPARC64_POSIX_TYPES_H
-+#if ! defined __ARCH_SPARC_POSIX_TYPES_H && ! defined __ARCH_SPARC64_POSIX_TYPES_H && !defined __SPARC_POSIX_TYPES_H
- #define __ARCH_SPARC_POSIX_TYPES_H
- #define __ARCH_SPARC64_POSIX_TYPES_H
-+#define __SPARC_POSIX_TYPES_H
- 
- # if __WORDSIZE == 64
- typedef unsigned long          __kernel_size_t;
--- a/sources/patches/uClibc-installutils.patch	Tue Jan 19 19:27:39 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-Index: Makefile.in
-===================================================================
---- a/Makefile.in	(revision 24348)
-+++ b/Makefile.in	(working copy)
-@@ -447,6 +447,9 @@
- install_utils: utils
- 	$(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils utils_install
- 
-+install_hostutils: hostutils
-+	$(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils utils_install DOTHOST=.host
-+
- endif # ifeq ($(HAVE_DOT_CONFIG),y)
- 
- include/bits include/config:
-Index: utils/Makefile.in
-===================================================================
---- a/utils/Makefile.in	(revision 24348)
-+++ b/utils/Makefile.in	(working copy)
-@@ -83,15 +83,17 @@
- 
- install-y += utils_install
- 
--utils_install: utils
--	#$(Q)$(INSTALL) -D -m 755 $(utils_OUT)/readelf $(PREFIX)$(RUNTIME_PREFIX)usr/bin/readelf
-+# This installs both utils and hostutils, so doesn't depend on either.
-+
-+utils_install:
-+	$(Q)$(INSTALL) -D -m 755 $(utils_OUT)/readelf$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)bin/readelf
- ifeq ($(HAVE_SHARED),y)
--	$(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldd $(PREFIX)$(RUNTIME_PREFIX)usr/bin/ldd
--	$(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldconfig $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig
-+	$(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)bin/ldd
-+	$(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig
- endif
- ifeq ($(UCLIBC_HAS_LOCALE),y)
--	$(Q)$(INSTALL) -D -m 755 $(utils_OUT)/iconv $(PREFIX)$(RUNTIME_PREFIX)usr/bin/iconv
--	$(Q)$(INSTALL) -m 755 $(utils_OUT)/locale $(PREFIX)$(RUNTIME_PREFIX)usr/bin/locale
-+	$(Q)$(INSTALL) -D -m 755 $(utils_OUT)/iconv$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)bin/iconv
-+	$(Q)$(INSTALL) -m 755 $(utils_OUT)/locale$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)bin/locale
- endif
- 
- objclean-y += utils_clean
--- a/sources/patches/uClibc-sparcldso.patch	Tue Jan 19 19:27:39 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-Sparc v8 and v9 should still support EM_SPARC binaries, not _just_ SPARC32PLUS.
-
---- uClibc/ldso/ldso/sparc/dl-sysdep.h	2008-09-15 11:36:11.000000000 -0500
-+++ uClibc.bak/ldso/ldso/sparc/dl-sysdep.h	2009-04-08 01:09:53.000000000 -0500
-@@ -29,13 +29,8 @@
- /* Here we define the magic numbers that this dynamic loader should accept
-  * Note that SPARCV9 doesn't use EM_SPARCV9 since the userland is still 32-bit.
-  */
--#if defined(__sparc_v9__) || defined(__sparc_v8__)
- #define MAGIC1 EM_SPARC32PLUS
--#else
--#define MAGIC1 EM_SPARC
--#endif
--
--#undef  MAGIC2
-+#define MAGIC2 EM_SPARC
- 
- /* Used for error messages */
- #define ELF_TARGET "sparc"