summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2006-10-02 08:05:02 +0000
committerRichard Purdie <rpurdie@rpsys.net>2006-10-02 08:05:02 +0000
commit15016a995a6d3cdde57924abda65e93755d38209 (patch)
tree8f0d98cc1ba9d56ab1cfa5525aefc1fee11413be
parente1d3c46dca1e96eddb3df74cd76bf3faddcc19ff (diff)
downloadopenembedded-15016a995a6d3cdde57924abda65e93755d38209.tar.gz
glibc: Sync with .dev
-rw-r--r--packages/glibc/glibc-2.4/fix-fchownat-20060808.patch415
-rw-r--r--packages/glibc/glibc-2.4/no-z-defs.patch9
-rw-r--r--packages/glibc/glibc-2.4/openat-bugzilla-fix-1220.patch37
-rw-r--r--packages/glibc/glibc-2.4/zecke-sane-readelf.patch149
-rw-r--r--packages/glibc/glibc-initial_2.4.bb3
-rw-r--r--packages/glibc/glibc-package.bbclass57
-rw-r--r--packages/glibc/glibc_2.4.bb28
7 files changed, 667 insertions, 31 deletions
diff --git a/packages/glibc/glibc-2.4/fix-fchownat-20060808.patch b/packages/glibc/glibc-2.4/fix-fchownat-20060808.patch
new file mode 100644
index 0000000000..057cb779c3
--- /dev/null
+++ b/packages/glibc/glibc-2.4/fix-fchownat-20060808.patch
@@ -0,0 +1,415 @@
+From libc-hacker-return-8994-listarch-libc-hacker=sources dot redhat dot com at sourceware dot org Tue Aug 08 11:49:18 2006
+Return-Path: <libc-hacker-return-8994-listarch-libc-hacker=sources dot redhat dot com at sourceware dot org>
+Delivered-To: listarch-libc-hacker at sources dot redhat dot com
+Received: (qmail 21223 invoked by alias); 8 Aug 2006 11:49:17 -0000
+Received: (qmail 21202 invoked by uid 22791); 8 Aug 2006 11:49:15 -0000
+X-Spam-Check-By: sourceware.org
+Received: from sunsite.ms.mff.cuni.cz (HELO sunsite.mff.cuni.cz) (195.113.15.26)
+ by sourceware dot org (qpsmtpd/0 dot 31) with ESMTP; Tue, 08 Aug 2006 11:49:13 +0000
+Received: from sunsite.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1])
+ by sunsite dot mff dot cuni dot cz (8 dot 13 dot 1/8 dot 13 dot 1) with ESMTP id k78Bn8f9003038;
+ Tue, 8 Aug 2006 13:49:08 +0200
+Received: (from jj@localhost)
+ by sunsite dot mff dot cuni dot cz (8 dot 13 dot 1/8 dot 13 dot 1/Submit) id k78Bn82P003037;
+ Tue, 8 Aug 2006 13:49:08 +0200
+Date: Tue, 8 Aug 2006 13:49:07 +0200
+From: Jakub Jelinek <jakub at redhat dot com>
+To: Ulrich Drepper <drepper at redhat dot com>
+Cc: Glibc hackers <libc-hacker at sources dot redhat dot com>
+Subject: [PATCH] Fix fchownat
+Message-ID: <20060808114907.GA4556@sunsite.mff.cuni.cz>
+Reply-To: Jakub Jelinek <jakub at redhat dot com>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=us-ascii
+Content-Disposition: inline
+User-Agent: Mutt/1.4.1i
+Mailing-List: contact libc-hacker-help at sourceware dot org; run by ezmlm
+Precedence: bulk
+List-Subscribe: <mailto:libc-hacker-subscribe at sourceware dot org>
+List-Archive: <http://sourceware.org/ml/libc-hacker/>
+List-Post: <mailto:libc-hacker at sourceware dot org>
+List-Help: <mailto:libc-hacker-help at sourceware dot org>, <http://sourceware dot org/ml/#faqs>
+Sender: libc-hacker-owner at sourceware dot org
+Delivered-To: mailing list libc-hacker at sourceware dot org
+
+Hi!
+
+Apparently fchownat was only changed to use the direct syscall if available
+in the generic linux version, not in the various arch specializations.
+
+2006-08-08 Jakub Jelinek <jakub@redhat.com>
+
+ * sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c (fchownat): Use
+ fchownat syscall if available.
+ * sysdeps/unix/sysv/linux/powerpc/fchownat.c (fchownat): Likewise.
+ * sysdeps/unix/sysv/linux/sh/fchownat.c (fchownat): Likewise.
+ * sysdeps/unix/sysv/linux/i386/fchownat.c (fchownat): Likewise.
+
+--- libc/sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c.jj 2006-01-11 16:55:32.000000000 +0100
++++ libc/sysdeps/unix/sysv/linux/s390/s390-32/fchownat.c 2006-08-08 11:11:23.000000000 +0200
+@@ -53,6 +53,24 @@ extern int __libc_missing_32bit_uids;
+ int
+ fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag)
+ {
++ int result;
++
++#ifdef __NR_fchownat
++# ifndef __ASSUME_ATFCTS
++ if (__have_atfcts >= 0)
++# endif
++ {
++ result = INLINE_SYSCALL (fchownat, 5, fd, file, owner, group, flag);
++# ifndef __ASSUME_ATFCTS
++ if (result == -1 && errno == ENOSYS)
++ __have_atfcts = -1;
++ else
++# endif
++ return result;
++ }
++#endif
++
++#ifndef __ASSUME_ATFCTS
+ if (flag & ~AT_SYMLINK_NOFOLLOW)
+ {
+ __set_errno (EINVAL);
+@@ -79,16 +97,15 @@ fchownat (int fd, const char *file, uid_
+ file = buf;
+ }
+
+- int result;
+ INTERNAL_SYSCALL_DECL (err);
+
+-#if __ASSUME_32BITUIDS > 0
++# if __ASSUME_32BITUIDS > 0
+ result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner,
+ group);
+-#else
++# else
+ static int __libc_old_chown;
+
+-# ifdef __NR_chown32
++# ifdef __NR_chown32
+ if (__libc_missing_32bit_uids <= 0)
+ {
+ if (flag & AT_SYMLINK_NOFOLLOW)
+@@ -105,7 +122,7 @@ fchownat (int fd, const char *file, uid_
+
+ __libc_missing_32bit_uids = 1;
+ }
+-# endif /* __NR_chown32 */
++# endif /* __NR_chown32 */
+ if (((owner + 1) > (uid_t) ((__kernel_uid_t) -1U))
+ || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U)))
+ {
+@@ -128,7 +145,7 @@ fchownat (int fd, const char *file, uid_
+
+ result = INTERNAL_SYSCALL (lchown, err, 3, CHECK_STRING (file), owner,
+ group);
+-#endif
++# endif
+
+ if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0))
+ {
+@@ -138,4 +155,5 @@ fchownat (int fd, const char *file, uid_
+ }
+
+ return result;
++#endif
+ }
+--- libc/sysdeps/unix/sysv/linux/powerpc/fchownat.c.jj 2005-11-11 20:43:35.000000000 +0100
++++ libc/sysdeps/unix/sysv/linux/powerpc/fchownat.c 2006-08-08 11:14:52.000000000 +0200
+@@ -37,6 +37,24 @@
+ int
+ fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag)
+ {
++ int result;
++
++#ifdef __NR_fchownat
++# ifndef __ASSUME_ATFCTS
++ if (__have_atfcts >= 0)
++# endif
++ {
++ result = INLINE_SYSCALL (fchownat, 5, fd, file, owner, group, flag);
++# ifndef __ASSUME_ATFCTS
++ if (result == -1 && errno == ENOSYS)
++ __have_atfcts = -1;
++ else
++# endif
++ return result;
++ }
++#endif
++
++#ifndef __ASSUME_ATFCTS
+ if (flag & ~AT_SYMLINK_NOFOLLOW)
+ {
+ __set_errno (EINVAL);
+@@ -63,15 +81,14 @@ fchownat (int fd, const char *file, uid_
+ file = buf;
+ }
+
+- int result;
+ INTERNAL_SYSCALL_DECL (err);
+
+-#if __ASSUME_LCHOWN_SYSCALL
++# if __ASSUME_LCHOWN_SYSCALL
+ if (flag & AT_SYMLINK_NOFOLLOW)
+ result = INTERNAL_SYSCALL (lchown, err, 3, file, owner, group);
+ else
+ result = INTERNAL_SYSCALL (chown, err, 3, file, owner, group);
+-#else
++# else
+ char link[PATH_MAX + 2];
+ char path[2 * PATH_MAX + 4];
+ int loopct;
+@@ -89,7 +106,7 @@ fchownat (int fd, const char *file, uid_
+ goto out;
+ }
+
+-# ifdef __NR_lchown
++# ifdef __NR_lchown
+ if (flag & AT_SYMLINK_NOFOLLOW)
+ {
+ result = INTERNAL_SYSCALL (lchown, err, 3, __ptrvalue (file), owner,
+@@ -110,25 +127,25 @@ fchownat (int fd, const char *file, uid_
+ }
+ libc_old_chown = -1;
+ }
+-# else
++# else
+ if (flag & AT_SYMLINK_NOFOLLOW)
+ {
+ result = INTERNAL_SYSCALL (chown, err, 3, __ptrvalue (file), owner,
+ group);
+ goto out;
+ }
+-# endif
++# endif
+
+ result = __readlink (file, link, PATH_MAX + 1);
+ if (result == -1)
+ {
+-# ifdef __NR_lchown
++# ifdef __NR_lchown
+ result = INTERNAL_SYSCALL (lchown, err, 3, __ptrvalue (file), owner,
+ group);
+-# else
++# else
+ result = INTERNAL_SYSCALL (chown, err, 3, __ptrvalue (file), owner,
+ group);
+-# endif
++# endif
+ goto out;
+ }
+
+@@ -178,11 +195,11 @@ fchownat (int fd, const char *file, uid_
+
+ if (result == -1)
+ {
+-# ifdef __NR_lchown
++# ifdef __NR_lchown
+ result = INTERNAL_SYSCALL (lchown, err, 3, path, owner, group);
+-# else
++# else
+ result = INTERNAL_SYSCALL (chown, err, 3, path, owner, group);
+-# endif
++# endif
+ goto out;
+ }
+ }
+@@ -190,16 +207,17 @@ fchownat (int fd, const char *file, uid_
+ return -1;
+
+ out:
+-#endif
++# endif
+
+ if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0))
+ {
+-#if !__ASSUME_LCHOWN_SYSCALL
++# if !__ASSUME_LCHOWN_SYSCALL
+ fail:
+-#endif
++# endif
+ __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf);
+ result = -1;
+ }
+
+ return result;
++#endif
+ }
+--- libc/sysdeps/unix/sysv/linux/sh/fchownat.c.jj 2006-03-05 14:32:42.000000000 +0100
++++ libc/sysdeps/unix/sysv/linux/sh/fchownat.c 2006-08-08 11:19:28.000000000 +0200
+@@ -40,6 +40,24 @@ extern int __libc_missing_32bit_uids;
+ int
+ fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag)
+ {
++ int result;
++
++#ifdef __NR_fchownat
++# ifndef __ASSUME_ATFCTS
++ if (__have_atfcts >= 0)
++# endif
++ {
++ result = INLINE_SYSCALL (fchownat, 5, fd, file, owner, group, flag);
++# ifndef __ASSUME_ATFCTS
++ if (result == -1 && errno == ENOSYS)
++ __have_atfcts = -1;
++ else
++# endif
++ return result;
++ }
++#endif
++
++#ifndef __ASSUME_ATFCTS
+ if (flag & ~AT_SYMLINK_NOFOLLOW)
+ {
+ __set_errno (EINVAL);
+@@ -66,18 +84,17 @@ fchownat (int fd, const char *file, uid_
+ file = buf;
+ }
+
+- int result;
+ INTERNAL_SYSCALL_DECL (err);
+
+-#if __ASSUME_32BITUIDS > 0
++# if __ASSUME_32BITUIDS > 0
+ if (flag & AT_SYMLINK_NOFOLLOW)
+ result = INTERNAL_SYSCALL (lchown32, err, 3, CHECK_STRING (file), owner,
+ group);
+ else
+ result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner,
+ group);
+-#else
+-# ifdef __NR_chown32
++# else
++# ifdef __NR_chown32
+ if (__libc_missing_32bit_uids <= 0)
+ {
+ if (flag & AT_SYMLINK_NOFOLLOW)
+@@ -94,7 +111,7 @@ fchownat (int fd, const char *file, uid_
+
+ __libc_missing_32bit_uids = 1;
+ }
+-# endif /* __NR_chown32 */
++# endif /* __NR_chown32 */
+
+ if (((owner + 1) > (gid_t) ((__kernel_uid_t) -1U))
+ || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U)))
+@@ -109,7 +126,7 @@ fchownat (int fd, const char *file, uid_
+ else
+ result = INTERNAL_SYSCALL (chown, err, 3, CHECK_STRING (file), owner,
+ group);
+-#endif
++# endif
+
+ if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0))
+ {
+@@ -119,4 +136,5 @@ fchownat (int fd, const char *file, uid_
+ }
+
+ return result;
++#endif
+ }
+--- libc/sysdeps/unix/sysv/linux/i386/fchownat.c.jj 2006-02-27 18:31:00.000000000 +0100
++++ libc/sysdeps/unix/sysv/linux/i386/fchownat.c 2006-08-08 11:20:49.000000000 +0200
+@@ -61,6 +61,24 @@ extern int __libc_missing_32bit_uids;
+ int
+ fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag)
+ {
++ int result;
++
++#ifdef __NR_fchownat
++# ifndef __ASSUME_ATFCTS
++ if (__have_atfcts >= 0)
++# endif
++ {
++ result = INLINE_SYSCALL (fchownat, 5, fd, file, owner, group, flag);
++# ifndef __ASSUME_ATFCTS
++ if (result == -1 && errno == ENOSYS)
++ __have_atfcts = -1;
++ else
++# endif
++ return result;
++ }
++#endif
++
++#ifndef __ASSUME_ATFCTS
+ if (flag & ~AT_SYMLINK_NOFOLLOW)
+ {
+ __set_errno (EINVAL);
+@@ -87,14 +105,13 @@ fchownat (int fd, const char *file, uid_
+ file = buf;
+ }
+
+- int result;
+ INTERNAL_SYSCALL_DECL (err);
+
+-#if defined __NR_lchown || __ASSUME_LCHOWN_SYSCALL > 0
+-# if __ASSUME_LCHOWN_SYSCALL == 0
++# if defined __NR_lchown || __ASSUME_LCHOWN_SYSCALL > 0
++# if __ASSUME_LCHOWN_SYSCALL == 0
+ static int __libc_old_chown;
+
+-# ifdef __NR_chown32
++# ifdef __NR_chown32
+ if (__libc_missing_32bit_uids <= 0)
+ {
+ if (flag & AT_SYMLINK_NOFOLLOW)
+@@ -111,7 +128,7 @@ fchownat (int fd, const char *file, uid_
+
+ __libc_missing_32bit_uids = 1;
+ }
+-# endif /* __NR_chown32 */
++# endif /* __NR_chown32 */
+
+ if (((owner + 1) > (uid_t) ((__kernel_uid_t) -1U))
+ || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U)))
+@@ -135,13 +152,13 @@ fchownat (int fd, const char *file, uid_
+
+ result = INTERNAL_SYSCALL (lchown, err, 3, CHECK_STRING (file), owner,
+ group);
+-# elif __ASSUME_32BITUIDS
++# elif __ASSUME_32BITUIDS
+ /* This implies __ASSUME_LCHOWN_SYSCALL. */
+ result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner,
+ group);
+-# else
++# else
+ /* !__ASSUME_32BITUIDS && ASSUME_LCHOWN_SYSCALL */
+-# ifdef __NR_chown32
++# ifdef __NR_chown32
+ if (__libc_missing_32bit_uids <= 0)
+ {
+ result = INTERNAL_SYSCALL (chown32, err, 3, CHECK_STRING (file), owner,
+@@ -153,7 +170,7 @@ fchownat (int fd, const char *file, uid_
+
+ __libc_missing_32bit_uids = 1;
+ }
+-# endif /* __NR_chown32 */
++# endif /* __NR_chown32 */
+ if (((owner + 1) > (uid_t) ((__kernel_uid_t) -1U))
+ || ((group + 1) > (gid_t) ((__kernel_gid_t) -1U)))
+ {
+@@ -162,10 +179,10 @@ fchownat (int fd, const char *file, uid_
+ }
+
+ result = INTERNAL_SYSCALL (chown, err, 3, CHECK_STRING (file), owner, group);
+-# endif
+-#else
++# endif
++# else
+ result = INTERNAL_SYSCALL (chown, err, 3, CHECK_STRING (file), owner, group);
+-#endif
++# endif
+
+ if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0))
+ goto fail;
+@@ -175,4 +192,5 @@ fchownat (int fd, const char *file, uid_
+ fail:
+ __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf);
+ return -1;
++#endif
+ }
+
+ Jakub
+
diff --git a/packages/glibc/glibc-2.4/no-z-defs.patch b/packages/glibc/glibc-2.4/no-z-defs.patch
new file mode 100644
index 0000000000..48c6a41267
--- /dev/null
+++ b/packages/glibc/glibc-2.4/no-z-defs.patch
@@ -0,0 +1,9 @@
+Create a configparms file which disabled no-z-defs.
+This is required to build a working glibs for sh4,
+without there will be a lot linker errors during the build.
+
+diff -duNr libc.orig/configparms libc/configparms
+--- libc.orig/configparms 1970-01-01 10:00:00.000000000 +1000
++++ libc/configparms 2006-02-23 14:08:18.000000000 +1100
+@@ -0,0 +1 @@
++no-z-defs=yes
diff --git a/packages/glibc/glibc-2.4/openat-bugzilla-fix-1220.patch b/packages/glibc/glibc-2.4/openat-bugzilla-fix-1220.patch
new file mode 100644
index 0000000000..dff7c73da7
--- /dev/null
+++ b/packages/glibc/glibc-2.4/openat-bugzilla-fix-1220.patch
@@ -0,0 +1,37 @@
+--- glibc-2.4/sysdeps/unix/sysv/linux/openat.orig 2006-03-01 07:32:42.000000000 +0200
++++ glibc-2.4/sysdeps/unix/sysv/linux/openat.c 2006-04-30 19:15:52.000000000 +0300
+@@ -27,6 +27,9 @@
+ #include <sysdep-cancel.h>
+ #include <not-cancel.h>
+
++#if !defined OPENAT
++# define OPENAT openat
++#endif
+
+ #if !defined OPENAT && !defined __ASSUME_ATFCTS
+ # define OPENAT openat
+@@ -70,11 +73,7 @@ int __have_atfcts;
+
+
+ int
+-OPENAT_NOT_CANCEL (fd, file, oflag, mode)
+- int fd;
+- const char *file;
+- int oflag;
+- mode_t mode;
++OPENAT_NOT_CANCEL (int fd, const char *file, int oflag, mode_t mode)
+ {
+
+ /* We have to add the O_LARGEFILE flag for openat64. */
+@@ -144,10 +143,7 @@ OPENAT_NOT_CANCEL (fd, file, oflag, mode
+ the directory associated with FD. If OFLAG includes O_CREAT, a
+ third argument is the file protection. */
+ int
+-__OPENAT (fd, file, oflag)
+- int fd;
+- const char *file;
+- int oflag;
++__OPENAT (int fd, const char *file, int oflag, ...)
+ {
+ mode_t mode = 0;
+ if (oflag & O_CREAT)
diff --git a/packages/glibc/glibc-2.4/zecke-sane-readelf.patch b/packages/glibc/glibc-2.4/zecke-sane-readelf.patch
new file mode 100644
index 0000000000..023b6a51bc
--- /dev/null
+++ b/packages/glibc/glibc-2.4/zecke-sane-readelf.patch
@@ -0,0 +1,149 @@
+Index: glibc-2.4/configure
+===================================================================
+--- glibc-2.4.orig/configure 2006-03-06 12:18:56.000000000 +0100
++++ glibc-2.4/configure 2006-08-06 14:10:51.000000000 +0200
+@@ -5488,6 +5488,95 @@
+ fi
+ fi
+
++### XXXX copy and pasted
++# Check for readelf
++# Extract the first word of "$target_alias-readelf", so it can be a program name with args.
++set dummy $target_alias-readelf; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_READELF+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$READELF"; then
++ ac_cv_prog_READELF="$READELF" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_READELF="$target_alias-readelf"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++fi
++fi
++READELF=$ac_cv_prog_READELF
++if test -n "$READELF"; then
++ { echo "$as_me:$LINENO: result: $READELF" >&5
++echo "${ECHO_T}$READELF" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++
++if test -z "$ac_cv_prog_READELF"; then
++ if test "$build" = "$target"; then
++ ac_ct_READELF=$READELF
++ # Extract the first word of "readelf", so it can be a program name with args.
++set dummy readelf; ac_word=$2
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
++if test "${ac_cv_prog_ac_ct_READELF+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$ac_ct_READELF"; then
++ ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_ac_ct_READELF="readelf"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++IFS=$as_save_IFS
++
++ test -z "$ac_cv_prog_ac_ct_READELF" && ac_cv_prog_ac_ct_READELF="readelf"
++fi
++fi
++ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
++if test -n "$ac_ct_READELF"; then
++ { echo "$as_me:$LINENO: result: $ac_ct_READELF" >&5
++echo "${ECHO_T}$ac_ct_READELF" >&6; }
++else
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
++fi
++
++ READELF=ac_ct_READELF
++ else
++ READELF="readelf"
++ fi
++else
++ READELF="$ac_cv_prog_READELF"
++fi
++
++### XXXX copy and pasted
++
+ echo "$as_me:$LINENO: checking for .preinit_array/.init_array/.fini_array support" >&5
+ echo $ECHO_N "checking for .preinit_array/.init_array/.fini_array support... $ECHO_C" >&6
+ if test "${libc_cv_initfini_array+set}" = set; then
+@@ -5507,7 +5596,7 @@
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }
+ then
+- if readelf -S conftest | fgrep INIT_ARRAY > /dev/null; then
++ if $READELF -S conftest | fgrep INIT_ARRAY > /dev/null; then
+ libc_cv_initfini_array=yes
+ else
+ libc_cv_initfini_array=no
+@@ -5801,7 +5890,7 @@
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }
+ then
+- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
++ if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
+ libc_cv_z_combreloc=yes
+ else
+ libc_cv_z_combreloc=no
+Index: glibc-2.4/configure.in
+===================================================================
+--- glibc-2.4.orig/configure.in 2006-03-01 10:17:40.000000000 +0100
++++ glibc-2.4/configure.in 2006-08-06 14:09:31.000000000 +0200
+@@ -1350,6 +1350,8 @@
+ fi
+ fi
+
++ AC_CHECK_TARGET_TOOL([READELF],[readelf],[readelf],[$PATH])
++
+ AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support,
+ libc_cv_initfini_array, [dnl
+ cat > conftest.c <<EOF
+@@ -1361,7 +1363,7 @@
+ if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -o conftest conftest.c
+ -static -nostartfiles -nostdlib 1>&AS_MESSAGE_LOG_FD])
+ then
+- if readelf -S conftest | fgrep INIT_ARRAY > /dev/null; then
++ if $READELF -S conftest | fgrep INIT_ARRAY > /dev/null; then
+ libc_cv_initfini_array=yes
+ else
+ libc_cv_initfini_array=no
+@@ -1543,7 +1545,7 @@
+ dnl introducing new options this is not easily doable. Instead use a tool
+ dnl which always is cross-platform: readelf. To detect whether -z combreloc
+ dnl look for a section named .rel.dyn.
+- if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
++ if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
+ libc_cv_z_combreloc=yes
+ else
+ libc_cv_z_combreloc=no
diff --git a/packages/glibc/glibc-initial_2.4.bb b/packages/glibc/glibc-initial_2.4.bb
index 70c7e161a4..f13419a413 100644
--- a/packages/glibc/glibc-initial_2.4.bb
+++ b/packages/glibc/glibc-initial_2.4.bb
@@ -1,9 +1,8 @@
-SECTION = "libs"
require glibc_${PV}.bb
DEPENDS = "linux-libc-headers"
PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/glibc-cvs', '${FILE_DIRNAME}/glibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
+FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/glibc-2.4', '${FILE_DIRNAME}/glibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
PACKAGES = ""
diff --git a/packages/glibc/glibc-package.bbclass b/packages/glibc/glibc-package.bbclass
index 2b0a63af90..51f5a80bec 100644
--- a/packages/glibc/glibc-package.bbclass
+++ b/packages/glibc/glibc-package.bbclass
@@ -8,12 +8,13 @@
python __anonymous () {
import bb, re
- uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None)
+ uc_os = (re.match('.*uclibc*', bb.data.getVar('TARGET_OS', d, 1)) != None)
if uc_os:
raise bb.parse.SkipPackage("incompatible with target %s" %
bb.data.getVar('TARGET_OS', d, 1))
}
+
# Binary locales are generated at build time if ENABLE_BINARY_LOCALE_GENERATION
# is set. The idea is to avoid running localedef on the target (at first boot)
# to decrease initial boot time and avoid localedef being killed by the OOM
@@ -25,20 +26,21 @@ ENABLE_BINARY_LOCALE_GENERATION ?= "0"
# BINARY_LOCALE_ARCHES is a space separated list of regular expressions
BINARY_LOCALE_ARCHES ?= "arm.*"
-PACKAGES = "glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile"
-PACKAGES_DYNAMIC = "glibc-gconv-* glibc-charmap-* glibc-localedata-*"
+PACKAGES = "glibc-dbg glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile"
+PACKAGES_DYNAMIC = "glibc-gconv-* glibc-charmap-* glibc-localedata-* libc6*"
libc_baselibs = "/lib/libc* /lib/libm* /lib/ld* /lib/libpthread* /lib/libresolv* /lib/librt* /lib/libutil* /lib/libnsl* /lib/libnss_files* /lib/libnss_compat* /lib/libnss_dns* /lib/libdl* /lib/libanl* /lib/libBrokenLocale*"
-FILES_${PN} = "${sysconfdir} ${libc_baselibs} /sbin/ldconfig ${libexecdir} ${datadir}/zoneinfo"
+FILES_${PN} = "${sysconfdir} ${libc_baselibs} /sbin/ldconfig ${libexecdir}/* ${datadir}/zoneinfo"
FILES_ldd = "${bindir}/ldd"
FILES_libsegfault = "/lib/libSegFault*"
FILES_glibc-extra-nss = "/lib/libnss*"
FILES_sln = "/sbin/sln"
FILES_glibc-dev_append = " ${libdir}/*.o ${bindir}/rpcgen"
FILES_nscd = "${sbindir}/nscd*"
-FILES_glibc-utils = "${bindir} ${sbindir}"
-FILES_glibc-gconv = "${libdir}/gconv"
+FILES_glibc-utils = "${bindir}/* ${sbindir}/*"
+FILES_glibc-gconv = "${libdir}/gconv/*"
+FILES_${PN}-dbg += " ${libdir}/gconv/.debug"
FILES_catchsegv = "${bindir}/catchsegv"
RDEPENDS_catchsegv = "libsegfault"
FILES_glibc-pcprofile = "/lib/libpcprofile.so"
@@ -77,10 +79,17 @@ do_install() {
grep -v $i ${WORKDIR}/SUPPORTED > ${WORKDIR}/SUPPORTED.tmp
mv ${WORKDIR}/SUPPORTED.tmp ${WORKDIR}/SUPPORTED
done
+ # If indicated, only build a limited selection of locales
+ if [ "${LIMIT_BUILT_LOCALES}" != "${LIMIT_BUILT_LOCALES}" ]; then
+ for i in ${LIMIT_BUILT_LOCALES}; do
+ grep $i ${WORKDIR}/SUPPORTED > ${WORKDIR}/SUPPORTED.tmp
+ mv ${WORKDIR}/SUPPORTED.tmp ${WORKDIR}/SUPPORTED
+ done
+ fi
rm -f ${D}/etc/rpc
}
-TMP_LOCALE="/tmp/locale/${libdir}/locale"
+TMP_LOCALE="/tmp/locale${libdir}/locale"
locale_base_postinst() {
#!/bin/sh
@@ -142,7 +151,7 @@ do_prep_locale_tree() {
for i in $treedir/${datadir}/i18n/charmaps/*gz; do
gunzip $i
done
- cp -a ${STAGING_LIBDIR}/* $treedir/lib
+ cp -a ${D}/lib/* $treedir/lib
if [ -f ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.* ]; then
cp -a ${CROSS_DIR}/${TARGET_SYS}/lib/libgcc_s.* $treedir/lib
fi
@@ -198,12 +207,7 @@ python package_do_split_gconvs () {
if deps != []:
bb.data.setVar('RDEPENDS_%s' % pkg, " ".join(deps), d)
- use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1)
- if use_bin:
- do_split_packages(d, locales_dir, file_regex='(.*)', output_pattern='glibc-localedata-%s', description='locale definition for %s', hook=calc_locale_deps, extra_depends='', aux_files_pattern_verbatim=binary_locales_dir + '/%s')
- else:
- do_split_packages(d, locales_dir, file_regex='(.*)', output_pattern='glibc-localedata-%s', description='locale definition for %s', hook=calc_locale_deps, extra_depends='')
- bb.note("generation of binary locales disabled. this may break i18n!")
+ do_split_packages(d, locales_dir, file_regex='(.*)', output_pattern='glibc-localedata-%s', description='locale definition for %s', hook=calc_locale_deps, extra_depends='')
bb.data.setVar('PACKAGES', bb.data.getVar('PACKAGES', d) + ' glibc-gconv', d)
f = open(os.path.join(bb.data.getVar('WORKDIR', d, 1), "SUPPORTED"), "r")
@@ -242,8 +246,12 @@ python package_do_split_gconvs () {
target_arch = bb.data.getVar("TARGET_ARCH", d, 1)
qemu = "qemu-%s" % target_arch
pkgname = 'locale-base-' + legitimize_package_name(name)
-
- bb.data.setVar('RDEPENDS_%s' % pkgname, 'glibc-localedata-%s glibc-charmap-%s' % (legitimize_package_name(locale), legitimize_package_name(encoding)), d)
+ m = re.match("(.*)\.(.*)", name)
+ if m:
+ glibc_name = "%s.%s" % (m.group(1), m.group(2).lower().replace("-",""))
+ else:
+ glibc_name = name
+ bb.data.setVar('RDEPENDS_%s' % pkgname, legitimize_package_name('glibc-binary-localedata-%s' % glibc_name), d)
rprovides = 'virtual-locale-%s' % legitimize_package_name(name)
m = re.match("(.*)_(.*)", name)
if m:
@@ -256,7 +264,7 @@ python package_do_split_gconvs () {
path = bb.data.getVar("PATH", d, 1)
i18npath = os.path.join(treedir, datadir, "i18n")
- localedef_opts = "--force --old-style --no-archive --prefix=%s --inputfile=%s/i18n/locales/%s --charmap=%s %s" % (treedir, datadir, locale, encoding, locale)
+ localedef_opts = "--force --old-style --no-archive --prefix=%s --inputfile=%s/i18n/locales/%s --charmap=%s %s" % (treedir, datadir, locale, encoding, name)
cmd = "PATH=\"%s\" I18NPATH=\"%s\" %s -L %s %s/bin/localedef %s" % (path, i18npath, qemu, treedir, treedir, localedef_opts)
bb.note("generating locale %s (%s)" % (locale, encoding))
if os.system(cmd):
@@ -275,20 +283,33 @@ python package_do_split_gconvs () {
bb.build.exec_func("do_prep_locale_tree", d)
# Reshuffle names so that UTF-8 is preferred over other encodings
+ non_utf8 = []
for l in encodings.keys():
if len(encodings[l]) == 1:
output_locale(l, l, encodings[l][0])
+ if encodings[l][0] != "UTF-8":
+ non_utf8.append(l)
else:
if "UTF-8" in encodings[l]:
output_locale(l, l, "UTF-8")
encodings[l].remove("UTF-8")
+ else:
+ non_utf8.append(l)
for e in encodings[l]:
- output_locale('%s-%s' % (l, e), l, e)
+ output_locale('%s.%s' % (l, e), l, e)
+
+ if non_utf8 != []:
+ bb.note("the following locales are supported only in legacy encodings:")
+ bb.note(" " + " ".join(non_utf8))
use_bin = bb.data.getVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", d, 1)
if use_bin:
bb.note("collecting binary locales from locale tree")
bb.build.exec_func("do_collect_bins_from_locale_tree", d)
+ do_split_packages(d, binary_locales_dir, file_regex='(.*)', output_pattern='glibc-binary-localedata-%s', description='binary locale definition for %s', extra_depends='', allow_dirs=True)
+ else:
+ bb.note("generation of binary locales disabled. this may break i18n!")
+
}
# We want to do this indirection so that we can safely 'return'
diff --git a/packages/glibc/glibc_2.4.bb b/packages/glibc/glibc_2.4.bb
index 4d6d8a94c5..4483edb0aa 100644
--- a/packages/glibc/glibc_2.4.bb
+++ b/packages/glibc/glibc_2.4.bb
@@ -3,15 +3,19 @@ HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
LICENSE = "LGPL"
SECTION = "libs"
PRIORITY = "required"
-DEFAULT_PREFERENCE = "-1"
-PR = "r5"
+PR = "r10"
+
+# the -isystem in bitbake.conf screws up glibc do_stage
+BUILD_CPPFLAGS = "-I${STAGING_DIR}/${BUILD_SYS}/include"
+TARGET_CPPFLAGS = "-I${STAGING_DIR}/${TARGET_SYS}/include"
+
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/glibc-2.4"
GLIBC_ADDONS ?= "ports,nptl,libidn"
GLIBC_EXTRA_OECONF ?= ""
-GLIBC_BROKEN_LOCALES = "sid_ET tr_TR mn_MN"
+GLIBC_BROKEN_LOCALES = "sid_ET tr_TR mn_MN gez_ET gez_ER bn_BD te_IN"
#
# For now, we will skip building of a gcc package if it is a uclibc one
@@ -53,6 +57,7 @@ SRC_URI = "ftp://ftp.gnu.org/pub/gnu/glibc/glibc-2.4.tar.bz2 \
file://nptl-crosscompile.patch;patch=1 \
file://glibc-2.4-compile.patch;patch=1 \
file://fixup-aeabi-syscalls.patch;patch=1 \
+ file://zecke-sane-readelf.patch;patch=1 \
file://generic-bits_select.h \
file://generic-bits_types.h \
file://generic-bits_typesizes.h \
@@ -60,6 +65,14 @@ SRC_URI = "ftp://ftp.gnu.org/pub/gnu/glibc/glibc-2.4.tar.bz2 \
file://etc/ld.so.conf \
file://generate-supported.mk"
+# Build fails on x86 without additional patches, but these break arm
+SRC_URI_append_x86 = " file://openat-bugzilla-fix-1220.patch;patch=1 \
+ file://fix-fchownat-20060808.patch;patch=1"
+
+# Build fails on sh3 and sh4 without additional patches
+SRC_URI_append_sh3 = " file://no-z-defs.patch;patch=1"
+SRC_URI_append_sh4 = " file://no-z-defs.patch;patch=1"
+
S = "${WORKDIR}/glibc-2.4"
B = "${WORKDIR}/build-${TARGET_SYS}"
@@ -109,18 +122,11 @@ do_munge() {
rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/fenv.h
# Obsoleted by sysdeps/gnu/bits/utmp.h
rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/utmp.h
-
- # http://www.handhelds.org/hypermail/oe/51/5135.html
- # Some files were moved around between directories on
- # 2005-12-21, which means that any attempt to check out
- # from CVS using a datestamp older than that will be doomed.
- #
- # This is a workaround for that problem.
- rm -rf ${S}/bits
}
addtask munge before do_patch after do_unpack
+
do_configure () {
# override this function to avoid the autoconf/automake/aclocal/autoheader
# calls for now