uclibc: rename patches for version 0.9.31
authorSimon Dawson <spdawson@gmail.com>
Sun, 17 Nov 2013 11:47:42 +0000 (11:47 +0000)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 18 Nov 2013 10:03:02 +0000 (11:03 +0100)
Rename patches for uClibc version 0.9.31, for consistency with the general
patch naming scheme in Buildroot. Also remove a .avr32 extension from a patch;
this is not necessary, since uclibc 0.9.31 is unavailable on architectures
other than avr32.

Signed-off-by: Simon Dawson <spdawson@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
24 files changed:
package/uclibc/0.9.31.1/uClibc-0001-add-bsd-endian-conversions.patch [deleted file]
package/uclibc/0.9.31.1/uClibc-0002-add-inotify-init1.patch [deleted file]
package/uclibc/0.9.31.1/uClibc-0003-add-sock-cloexec.patch [deleted file]
package/uclibc/0.9.31.1/uClibc-0004-export-strverscmp.patch [deleted file]
package/uclibc/0.9.31.1/uClibc-0005-fix-daylight-saving-time-handling.patch [deleted file]
package/uclibc/0.9.31.1/uClibc-0006-fix-error-locale-utf-8.patch [deleted file]
package/uclibc/0.9.31.1/uClibc-0007-linuxthreads-errno-fix.patch [deleted file]
package/uclibc/0.9.31.1/uClibc-0008-more-workarounds-GCC-PR32219.patch [deleted file]
package/uclibc/0.9.31.1/uClibc-0009-unshare.patch [deleted file]
package/uclibc/0.9.31.1/uClibc-0010-workaround-GCC-PR32219.patch [deleted file]
package/uclibc/0.9.31.1/uClibc-0011-startfiles-Make-targets.patch [deleted file]
package/uclibc/0.9.31.1/uClibc-0012-netlinkaccess-header-types.patch.avr32 [deleted file]
package/uclibc/0.9.31.1/uclibc-0001-add-bsd-endian-conversions.patch [new file with mode: 0644]
package/uclibc/0.9.31.1/uclibc-0002-add-inotify-init1.patch [new file with mode: 0644]
package/uclibc/0.9.31.1/uclibc-0003-add-sock-cloexec.patch [new file with mode: 0644]
package/uclibc/0.9.31.1/uclibc-0004-export-strverscmp.patch [new file with mode: 0644]
package/uclibc/0.9.31.1/uclibc-0005-fix-daylight-saving-time-handling.patch [new file with mode: 0644]
package/uclibc/0.9.31.1/uclibc-0006-fix-error-locale-utf-8.patch [new file with mode: 0644]
package/uclibc/0.9.31.1/uclibc-0007-linuxthreads-errno-fix.patch [new file with mode: 0644]
package/uclibc/0.9.31.1/uclibc-0008-more-workarounds-GCC-PR32219.patch [new file with mode: 0644]
package/uclibc/0.9.31.1/uclibc-0009-unshare.patch [new file with mode: 0644]
package/uclibc/0.9.31.1/uclibc-0010-workaround-GCC-PR32219.patch [new file with mode: 0644]
package/uclibc/0.9.31.1/uclibc-0011-startfiles-Make-targets.patch [new file with mode: 0644]
package/uclibc/0.9.31.1/uclibc-0012-netlinkaccess-header-types.patch [new file with mode: 0644]

diff --git a/package/uclibc/0.9.31.1/uClibc-0001-add-bsd-endian-conversions.patch b/package/uclibc/0.9.31.1/uClibc-0001-add-bsd-endian-conversions.patch
deleted file mode 100644 (file)
index 652d7c9..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-From c6d6237819037168a6923ac080e348e54615422c Mon Sep 17 00:00:00 2001
-From: Vladimir Zapolskiy <vzapolskiy@gmail.com>
-Date: Tue, 1 Jun 2010 23:22:57 +0400
-Subject: [PATCH] endian.h: add BSD convertions between big/little-endian byte order
-
-This patch adds support for convertion of values between host and
-big-/little-endian byte order.
-
-Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
-Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
----
- include/endian.h |   38 ++++++++++++++++++++++++++++++++++++++
- 1 files changed, 38 insertions(+), 0 deletions(-)
-
-diff --git a/include/endian.h b/include/endian.h
-index 2f7bce1..0ba7384 100644
---- a/include/endian.h
-+++ b/include/endian.h
-@@ -55,4 +55,42 @@
- # define __LONG_LONG_PAIR(HI, LO) HI, LO
- #endif
-+
-+#ifdef __USE_BSD
-+/* Conversion interfaces.  */
-+# include <byteswap.h>
-+
-+# if __BYTE_ORDER == __LITTLE_ENDIAN
-+#  define htobe16(x) __bswap_16 (x)
-+#  define htole16(x) (x)
-+#  define be16toh(x) __bswap_16 (x)
-+#  define le16toh(x) (x)
-+
-+#  define htobe32(x) __bswap_32 (x)
-+#  define htole32(x) (x)
-+#  define be32toh(x) __bswap_32 (x)
-+#  define le32toh(x) (x)
-+
-+#  define htobe64(x) __bswap_64 (x)
-+#  define htole64(x) (x)
-+#  define be64toh(x) __bswap_64 (x)
-+#  define le64toh(x) (x)
-+# else
-+#  define htobe16(x) (x)
-+#  define htole16(x) __bswap_16 (x)
-+#  define be16toh(x) (x)
-+#  define le16toh(x) __bswap_16 (x)
-+
-+#  define htobe32(x) (x)
-+#  define htole32(x) __bswap_32 (x)
-+#  define be32toh(x) (x)
-+#  define le32toh(x) __bswap_32 (x)
-+
-+#  define htobe64(x) (x)
-+#  define htole64(x) __bswap_64 (x)
-+#  define be64toh(x) (x)
-+#  define le64toh(x) __bswap_64 (x)
-+# endif
-+#endif
-+
- #endif        /* endian.h */
--- 
-1.7.3.4
-
diff --git a/package/uclibc/0.9.31.1/uClibc-0002-add-inotify-init1.patch b/package/uclibc/0.9.31.1/uClibc-0002-add-inotify-init1.patch
deleted file mode 100644 (file)
index cbec426..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-From a2e5630af426f85fdd8721b2820786d9bd2aa695 Mon Sep 17 00:00:00 2001
-From: Vladimir Zapolskiy <vzapolskiy@gmail.com>
-Date: Tue, 1 Jun 2010 20:02:54 +0400
-Subject: [PATCH] inotify: add inotify_init1 system call support
-
-This patch introduces support for inotify_init1 system call, found
-since Linux 2.6.27.
-
-Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libc/sysdeps/linux/common/inotify.c     |    4 ++++
- libc/sysdeps/linux/common/sys/inotify.h |   13 +++++++++++++
- 2 files changed, 17 insertions(+), 0 deletions(-)
-
-diff --git a/libc/sysdeps/linux/common/inotify.c b/libc/sysdeps/linux/common/inotify.c
-index e5a6120..e35f043 100644
---- a/libc/sysdeps/linux/common/inotify.c
-+++ b/libc/sysdeps/linux/common/inotify.c
-@@ -15,6 +15,10 @@
- _syscall0(int, inotify_init)
- #endif
-+#ifdef __NR_inotify_init1
-+_syscall1(int, inotify_init1, int, flags)
-+#endif
-+
- #ifdef __NR_inotify_add_watch
- _syscall3(int, inotify_add_watch, int, fd, const char *, path, uint32_t, mask)
- #endif
-diff --git a/libc/sysdeps/linux/common/sys/inotify.h b/libc/sysdeps/linux/common/sys/inotify.h
-index 0131db9..dc4e19d 100644
---- a/libc/sysdeps/linux/common/sys/inotify.h
-+++ b/libc/sysdeps/linux/common/sys/inotify.h
-@@ -22,6 +22,16 @@
- #include <stdint.h>
-+/* Flags for the parameter of inotify_init1.  */
-+enum
-+  {
-+    IN_CLOEXEC = 02000000,
-+#define IN_CLOEXEC IN_CLOEXEC
-+    IN_NONBLOCK = 04000
-+#define IN_NONBLOCK IN_NONBLOCK
-+  };
-+
-+
- /* Structure describing an inotify event.  */
- struct inotify_event
- {
-@@ -79,6 +89,9 @@ __BEGIN_DECLS
- /* Create and initialize inotify instance.  */
- extern int inotify_init (void) __THROW;
-+/* Create and initialize inotify instance.  */
-+extern int inotify_init1 (int __flags) __THROW;
-+
- /* Add watch of object NAME to inotify instance FD.  Notify about
-    events specified by MASK.  */
- extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask)
--- 
-1.7.3.4
-
diff --git a/package/uclibc/0.9.31.1/uClibc-0003-add-sock-cloexec.patch b/package/uclibc/0.9.31.1/uClibc-0003-add-sock-cloexec.patch
deleted file mode 100644 (file)
index a7089a9..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-From 83333e9c873e4eca6b2c945f7770b1f5373b0427 Mon Sep 17 00:00:00 2001
-From: Vladimir Zapolskiy <vzapolskiy@gmail.com>
-Date: Tue, 1 Jun 2010 20:02:39 +0400
-Subject: [PATCH] bits/socket.h: add SOCK_CLOEXEC and SOCK_NONBLOCK support
-
-This patch adds support for SOCK_CLOEXEC and SOCK_NONBLOCK socket
-descriptor flags, which are introduced since Linux 2.6.27
-
-Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libc/sysdeps/linux/common/bits/socket.h |   12 +++++++++++-
- 1 files changed, 11 insertions(+), 1 deletions(-)
-
-diff --git a/libc/sysdeps/linux/common/bits/socket.h b/libc/sysdeps/linux/common/bits/socket.h
-index ac5a433..11f6e97 100644
---- a/libc/sysdeps/linux/common/bits/socket.h
-+++ b/libc/sysdeps/linux/common/bits/socket.h
-@@ -53,10 +53,20 @@ enum __socket_type
-   SOCK_SEQPACKET = 5,         /* Sequenced, reliable, connection-based,
-                                  datagrams of fixed maximum length.  */
- #define SOCK_SEQPACKET SOCK_SEQPACKET
--  SOCK_PACKET = 10            /* Linux specific way of getting packets
-+  SOCK_PACKET = 10,           /* Linux specific way of getting packets
-                                  at the dev level.  For writing rarp and
-                                  other similar things on the user level. */
- #define SOCK_PACKET SOCK_PACKET
-+
-+  /* Flags to be ORed into the type parameter of socket and socketpair and
-+     used for the flags parameter of paccept.  */
-+
-+  SOCK_CLOEXEC = 02000000,    /* Atomically set close-on-exec flag for the
-+                                 new descriptor(s).  */
-+#define SOCK_CLOEXEC SOCK_CLOEXEC
-+  SOCK_NONBLOCK = 04000               /* Atomically mark descriptor(s) as
-+                                 non-blocking.  */
-+#define SOCK_NONBLOCK SOCK_NONBLOCK
- };
- /* Protocol families.  */
--- 
-1.7.3.4
-
diff --git a/package/uclibc/0.9.31.1/uClibc-0004-export-strverscmp.patch b/package/uclibc/0.9.31.1/uClibc-0004-export-strverscmp.patch
deleted file mode 100644 (file)
index 19bc021..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-From 139b8f0c673fed465d27f99c98568e5d5e1b9b72 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Fri, 4 Jun 2010 13:36:30 +0200
-Subject: [PATCH] strverscmp: I forgot to export it
-
-Result was:
-
-strverscmp.o:
-000000ec T __GI_strverscmp
-
-i.e. no plain "strverscmp"!
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
----
- libc/string/strverscmp.c |    1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
-
-diff --git a/libc/string/strverscmp.c b/libc/string/strverscmp.c
-index 74ae4c6..b19e8f0 100644
---- a/libc/string/strverscmp.c
-+++ b/libc/string/strverscmp.c
-@@ -115,3 +115,4 @@ int strverscmp (const char *s1, const char *s2)
-       return state;
-   }
- }
-+libc_hidden_def(strverscmp)
--- 
-1.7.3.4
-
diff --git a/package/uclibc/0.9.31.1/uClibc-0005-fix-daylight-saving-time-handling.patch b/package/uclibc/0.9.31.1/uClibc-0005-fix-daylight-saving-time-handling.patch
deleted file mode 100644 (file)
index 5a96113..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-From 47f3da1cf49377c25772bb54d07db55225bbb142 Mon Sep 17 00:00:00 2001
-From: Guillaume Bourcier <guillaumebourcier@free.fr>
-Date: Tue, 11 Oct 2011 13:45:33 +0200
-Subject: [PATCH] libc: fix daylight saving time handling
-
-The algorithm computing daylight saving time incorrectly adds a day for
-each month after January for leap years. The clock shift from/to DST can
-be delayed if the last Sunday of a transition month is exactly seven
-days before the first of the following month.
-
-This change adds a day for the February month only.
-
-Signed-off-by: Guillaume Bourcier <guillaumebourcier@free.fr>
-Signed-off-by: Richard Braun <rbraun@sceen.net>
-Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
-Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
----
- libc/misc/time/time.c |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c
-index 19d68e1..8e2ebf1 100644
---- a/libc/misc/time/time.c
-+++ b/libc/misc/time/time.c
-@@ -689,7 +689,7 @@ static int tm_isdst(register const struct tm *__restrict ptm,
-                                       ++day;
-                               }
-                               monlen = 31 + day_cor[r->month -1] - day_cor[r->month];
--                              if (isleap && (r->month > 1)) {
-+                              if (isleap && (r->month == 2)) {
-                                       ++monlen;
-                               }
-                               /* Wweekday (0 is Sunday) of 1st of the month
--- 
-1.7.3.4
-
diff --git a/package/uclibc/0.9.31.1/uClibc-0006-fix-error-locale-utf-8.patch b/package/uclibc/0.9.31.1/uClibc-0006-fix-error-locale-utf-8.patch
deleted file mode 100644 (file)
index 1305add..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
----
- extra/locale/gen_wc8bit.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: uClibc-0.9.31/extra/locale/gen_wc8bit.c
-===================================================================
---- uClibc-0.9.31.orig/extra/locale/gen_wc8bit.c
-+++ uClibc-0.9.31/extra/locale/gen_wc8bit.c
-@@ -120,7 +120,7 @@
-               }
-  locale_failure:
--              printf("could not find a UTF8 locale ... please enable en_US.UTF-8\n");
-+              fprintf(stderr, "could not find a UTF8 locale ... please enable en_US.UTF-8\n");
-               return EXIT_FAILURE;
-  locale_success:
-               pclose(fp);
diff --git a/package/uclibc/0.9.31.1/uClibc-0007-linuxthreads-errno-fix.patch b/package/uclibc/0.9.31.1/uClibc-0007-linuxthreads-errno-fix.patch
deleted file mode 100644 (file)
index c49821b..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-From af8b2d71ce37b9d4d24ddbc755cdea68de02949a Mon Sep 17 00:00:00 2001
-From: Peter Korsgaard <jacmet@sunsite.dk>
-Date: Mon, 5 Jul 2010 14:08:17 +0200
-Subject: [PATCH] don't make __errno_location / __h_errno_location hidden
-
-Closes #2089 (https://bugs.busybox.net/show_bug.cgi?id=2089)
-
-__errno_location / __h_errno_location access has to go through the PLT
-like malloc/free, so the linuxthread variants gets used instead when
-compiling with -pthread.
-
-Based on http://github.com/mat-c/uClibc/commit/328d392c54aa5dc2b8e7f398a419087de497de2b
-
-Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
----
- include/netdb.h                               |    1 -
- libc/misc/internals/__errno_location.c        |    3 ---
- libc/misc/internals/__h_errno_location.c      |    1 -
- libc/misc/internals/__uClibc_main.c           |    2 --
- libc/sysdeps/linux/common/bits/errno.h        |    1 -
- libc/sysdeps/linux/common/bits/uClibc_errno.h |    3 ---
- 6 files changed, 0 insertions(+), 11 deletions(-)
-
-diff --git a/include/netdb.h b/include/netdb.h
-index 9d3807d..ac411ab 100644
---- a/include/netdb.h
-+++ b/include/netdb.h
-@@ -59,7 +59,6 @@ __BEGIN_DECLS
- /* Function to get address of global `h_errno' variable.  */
- extern int *__h_errno_location (void) __THROW __attribute__ ((__const__));
--libc_hidden_proto(__h_errno_location)
- /* Macros for accessing h_errno from inside libc.  */
- #ifdef _LIBC
-diff --git a/libc/misc/internals/__errno_location.c b/libc/misc/internals/__errno_location.c
-index 487a9c2..0620860 100644
---- a/libc/misc/internals/__errno_location.c
-+++ b/libc/misc/internals/__errno_location.c
-@@ -11,6 +11,3 @@ int * weak_const_function __errno_location (void)
- {
-     return &errno;
- }
--#ifdef IS_IN_libc /* not really need, only to keep in sync w/ libc_hidden_proto */
--libc_hidden_weak(__errno_location)
--#endif
-diff --git a/libc/misc/internals/__h_errno_location.c b/libc/misc/internals/__h_errno_location.c
-index 213d398..235df4e 100644
---- a/libc/misc/internals/__h_errno_location.c
-+++ b/libc/misc/internals/__h_errno_location.c
-@@ -10,4 +10,3 @@ int * weak_const_function __h_errno_location (void)
- {
-     return &h_errno;
- }
--libc_hidden_weak(__h_errno_location)
-diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c
-index 6e520fa..f4a9ebb 100644
---- a/libc/misc/internals/__uClibc_main.c
-+++ b/libc/misc/internals/__uClibc_main.c
-@@ -64,9 +64,7 @@ void internal_function _dl_aux_init (ElfW(auxv_t) *av);
-  * Prototypes.
-  */
- extern int *weak_const_function __errno_location(void);
--libc_hidden_proto(__errno_location)
- extern int *weak_const_function __h_errno_location(void);
--libc_hidden_proto(__h_errno_location)
- extern void weak_function _stdio_init(void) attribute_hidden;
- #ifdef __UCLIBC_HAS_LOCALE__
-diff --git a/libc/sysdeps/linux/common/bits/errno.h b/libc/sysdeps/linux/common/bits/errno.h
-index 0bf6354..de9688a 100644
---- a/libc/sysdeps/linux/common/bits/errno.h
-+++ b/libc/sysdeps/linux/common/bits/errno.h
-@@ -43,7 +43,6 @@
- # ifndef __ASSEMBLER__
- /* Function to get address of global `errno' variable.  */
- extern int *__errno_location (void) __THROW __attribute__ ((__const__));
--libc_hidden_proto(__errno_location)
- #  ifdef __UCLIBC_HAS_THREADS__
- /* When using threads, errno is a per-thread value.  */
-diff --git a/libc/sysdeps/linux/common/bits/uClibc_errno.h b/libc/sysdeps/linux/common/bits/uClibc_errno.h
-index 9c15618..79eb7e6 100644
---- a/libc/sysdeps/linux/common/bits/uClibc_errno.h
-+++ b/libc/sysdeps/linux/common/bits/uClibc_errno.h
-@@ -33,9 +33,6 @@ extern int *__errno_location (void) __THROW __attribute__ ((__const__))
- ;
- # if defined __UCLIBC_HAS_THREADS__
- #  include <tls.h>
--#  if defined USE___THREAD && USE___THREAD
--libc_hidden_proto(__errno_location)
--#  endif
- # endif
- #endif /* !__ASSEMBLER__ */
--- 
-1.7.1
-
diff --git a/package/uclibc/0.9.31.1/uClibc-0008-more-workarounds-GCC-PR32219.patch b/package/uclibc/0.9.31.1/uClibc-0008-more-workarounds-GCC-PR32219.patch
deleted file mode 100644 (file)
index 9e69532..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-From aa67771881d65373da448ad5f7a8393f3a1d9469 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
-Date: Wed, 30 Jun 2010 14:46:37 +0300
-Subject: [PATCH] more workarounds for GCC PR32219
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Commit 2e53dd645d5348f207cec7f8595969dc566c5a55 workarounds GCC
-bug when accessing _locale_init and _stdio_init. We need the same
-fix for __errno_location and __h_errno_location otherwise we crash
-calling null with static and non-threaded builds.
-
-Signed-off-by: Timo Teräs <timo.teras@iki.fi>
-Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
----
- libc/misc/internals/__uClibc_main.c |    4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c
-index 3f09ad2..58f6643 100644
---- a/libc/misc/internals/__uClibc_main.c
-+++ b/libc/misc/internals/__uClibc_main.c
-@@ -447,11 +447,11 @@ void __uClibc_main(int (*main)(int, char **, char **), int argc,
-      * have resulted in errno being set nonzero, so set it to 0 before
-      * we call main.
-      */
--    if (likely(__errno_location!=NULL))
-+    if (likely(not_null_ptr(__errno_location)))
-       *(__errno_location()) = 0;
-     /* Set h_errno to 0 as well */
--    if (likely(__h_errno_location!=NULL))
-+    if (likely(not_null_ptr(__h_errno_location)))
-       *(__h_errno_location()) = 0;
- #if defined HAVE_CLEANUP_JMP_BUF && defined __UCLIBC_HAS_THREADS_NATIVE__
--- 
-1.7.1
-
diff --git a/package/uclibc/0.9.31.1/uClibc-0009-unshare.patch b/package/uclibc/0.9.31.1/uClibc-0009-unshare.patch
deleted file mode 100644 (file)
index ad440d9..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-Backport of unshare() syscall.
-From uClibc git 19dd090a0f68765db87990ef8eda9bf77bb29581
-
-Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
-
----
-diff -Nura uClibc-0.9.31.1.orig/libc/sysdeps/linux/common/bits/sched.h uClibc-0.9.31.1/libc/sysdeps/linux/common/bits/sched.h
---- uClibc-0.9.31.1.orig/libc/sysdeps/linux/common/bits/sched.h        2011-06-08 15:58:40.000000000 -0300
-+++ uClibc-0.9.31.1/libc/sysdeps/linux/common/bits/sched.h     2011-12-05 08:10:02.491978849 -0300
-@@ -58,7 +58,13 @@
-                                     force CLONE_PTRACE on this clone.  */
- # define CLONE_CHILD_SETTID 0x01000000 /* Store TID in userlevel buffer in
-                                         the child.  */
--# define CLONE_STOPPED        0x02000000 /* Start in stopped state.  */
-+# define CLONE_STOPPED 0x02000000 /* Start in stopped state.  */
-+# define CLONE_NEWUTS  0x04000000      /* New utsname group.  */
-+# define CLONE_NEWIPC  0x08000000      /* New ipcs.  */
-+# define CLONE_NEWUSER 0x10000000      /* New user namespace.  */
-+# define CLONE_NEWPID  0x20000000      /* New pid namespace.  */
-+# define CLONE_NEWNET  0x40000000      /* New network namespace.  */
-+# define CLONE_IO      0x80000000      /* Clone I/O context.  */
- #endif
- /* The official definition.  */
-@@ -74,11 +80,9 @@
- extern int clone (int (*__fn) (void *__arg), void *__child_stack,
-                 int __flags, void *__arg, ...) __THROW;
--#if 0
- /* Unshare the specified resources.  */
- extern int unshare (int __flags) __THROW;
- #endif
--#endif
- __END_DECLS
-diff -Nura uClibc-0.9.31.1.orig/libc/sysdeps/linux/common/Makefile.in uClibc-0.9.31.1/libc/sysdeps/linux/common/Makefile.in
---- uClibc-0.9.31.1.orig/libc/sysdeps/linux/common/Makefile.in 2011-06-08 15:58:40.000000000 -0300
-+++ uClibc-0.9.31.1/libc/sysdeps/linux/common/Makefile.in      2011-12-05 08:23:28.353757602 -0300
-@@ -31,7 +31,8 @@
-       remap_file_pages.c sched_getaffinity.c sched_setaffinity.c \
-       sendfile64.c sendfile.c setfsgid.c setfsuid.c setresuid.c \
-       splice.c vmsplice.c tee.c signalfd.c swapoff.c swapon.c \
--      sync_file_range.c sysctl.c sysinfo.c timerfd.c uselib.c vhangup.c,$(CSRC))
-+      sync_file_range.c sysctl.c sysinfo.c timerfd.c unshare.c uselib.c \
-+      vhangup.c,$(CSRC))
- endif
- ifneq ($(UCLIBC_BSD_SPECIFIC),y)
-diff -Nura uClibc-0.9.31.1.orig/libc/sysdeps/linux/common/unshare.c uClibc-0.9.31.1/libc/sysdeps/linux/common/unshare.c
---- uClibc-0.9.31.1.orig/libc/sysdeps/linux/common/unshare.c   1969-12-31 21:00:00.000000000 -0300
-+++ uClibc-0.9.31.1/libc/sysdeps/linux/common/unshare.c        2011-12-05 08:22:45.954453512 -0300
-@@ -0,0 +1,21 @@
-+/* vi: set sw=4 ts=4: */
-+/*
-+ * unshare() for uClibc
-+ *
-+ * Copyright (C) 2011 Henning Heinold <heinold@inf.fu-berlin.de>
-+ *
-+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-+ */
-+
-+#include <sys/syscall.h>
-+#include <sched.h>
-+
-+#if defined __NR_unshare && defined __UCLIBC_LINUX_SPECIFIC__
-+_syscall1(int, unshare, int, flags)
-+#else
-+int unshare(int flags) 
-+{   
-+    __set_errno(ENOSYS);
-+    return -1;
-+}
-+#endif
diff --git a/package/uclibc/0.9.31.1/uClibc-0010-workaround-GCC-PR32219.patch b/package/uclibc/0.9.31.1/uClibc-0010-workaround-GCC-PR32219.patch
deleted file mode 100644 (file)
index 242a526..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-From 2e53dd645d5348f207cec7f8595969dc566c5a55 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Mon, 17 May 2010 15:56:19 +0200
-Subject: [PATCH] workaround GCC PR32219
-
-we ended up calling 0
-Fixes bug #1033
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
----
- libc/misc/internals/__uClibc_main.c |   15 +++++++++++++--
- 1 files changed, 13 insertions(+), 2 deletions(-)
-
-diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c
-index f9e1244..4ee4443 100644
---- a/libc/misc/internals/__uClibc_main.c
-+++ b/libc/misc/internals/__uClibc_main.c
-@@ -105,6 +105,17 @@ _pthread_cleanup_pop_restore(struct _pthread_cleanup_buffer *__buffer,
- #endif /* !SHARED */
-+/* Defeat compiler optimization which assumes function addresses are never NULL */
-+static __always_inline int not_null_ptr(const void *p)
-+{
-+      const void *q;
-+      __asm__ (""
-+              : "=r" (q) /* output */
-+              : "0" (p) /* input */
-+      );
-+      return q != 0;
-+}
-+
- /*
-  * Prototypes.
-  */
-@@ -254,7 +265,7 @@ void __uClibc_init(void)
- #ifdef __UCLIBC_HAS_LOCALE__
-     /* Initialize the global locale structure. */
--    if (likely(_locale_init!=NULL))
-+    if (likely(not_null_ptr(_locale_init)))
-       _locale_init();
- #endif
-@@ -264,7 +275,7 @@ void __uClibc_init(void)
-      * Thus we get a nice size savings because the stdio functions
-      * won't be pulled into the final static binary unless used.
-      */
--    if (likely(_stdio_init != NULL))
-+    if (likely(not_null_ptr(_stdio_init)))
-       _stdio_init();
- }
--- 
-1.7.1
-
diff --git a/package/uclibc/0.9.31.1/uClibc-0011-startfiles-Make-targets.patch b/package/uclibc/0.9.31.1/uClibc-0011-startfiles-Make-targets.patch
deleted file mode 100644 (file)
index 9a7f304..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-Add startfiles and install_startfiles targets to the top-level Makefile, as
-in uClibc 0.9.32 and later.
-
-Signed-off-by: Simon Dawson <spdawson@gmail.com>
-
-diff -Nurp a/Makefile.help b/Makefile.help
---- a/Makefile.help    2011-06-08 19:58:40.000000000 +0100
-+++ b/Makefile.help    2013-08-10 21:17:46.572104259 +0100
-@@ -14,6 +14,7 @@ help:
-       @echo 'Build:'
-       @echo '  all                    - libraries and generated headers'
-       @echo '  pregen         - generate headers'
-+      @echo '  startfiles             - build startfiles (crt)'
-       @echo '  utils                  - build target utilities'
-       @echo '                   (ldd, ldconfig, locale, iconv)'
-       @echo '  hostutils              - build host utilities (see utils)'
-@@ -32,6 +33,7 @@ help:
-       @echo '  install                - install both the runtime and the headers'
-       @echo '  install_runtime        - install the libraries'
-       @echo '  install_dev            - install all headers and static libs'
-+      @echo '  install_startfiles     - install startfiles (crt)'
-       @echo '  install_headers        - install headers excluding generated ones'
-       @echo '  install_utils          - install target utilities'
-       @echo '  install_hostutils      - install host utilities'
-diff -Nurp a/Makefile.in b/Makefile.in
---- a/Makefile.in      2011-06-08 19:58:40.000000000 +0100
-+++ b/Makefile.in      2013-08-10 21:10:55.248649101 +0100
-@@ -193,6 +193,8 @@ install: install_runtime install_dev
- RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB=$(shell $(top_srcdir)extra/scripts/relative_path.sh $(DEVEL_PREFIX)$(MULTILIB_DIR) $(RUNTIME_PREFIX)$(MULTILIB_DIR))
-+startfiles: $(crt-y)
-+
- $(top_builddir)extra/scripts/unifdef: |$(top_builddir)extra/scripts
- $(top_builddir)extra/scripts/unifdef: $(top_srcdir)extra/scripts/unifdef.c
-       $(hcompile.u)
-@@ -301,6 +303,10 @@ else
-       cd $(PREFIX)$(DEVEL_PREFIX)include && $(RM) -f wchar-stub.h
- endif
-+# Installs startfiles
-+install_startfiles: startfiles | $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)
-+      -$(INSTALL) -m 644 $(startfiles) $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/
-+
- # Installs development library links.
- install_dev: install_headers install_runtime | $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)
-       -$(INSTALL) -m 644 $(top_builddir)lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/
-diff -Nurp a/Makerules b/Makerules
---- a/Makerules        2011-06-08 19:58:40.000000000 +0100
-+++ b/Makerules        2013-08-10 21:24:21.287583111 +0100
-@@ -406,7 +406,8 @@ endif
- CRTS_COMPAT :=
- #endif
--$(crt-y): $(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT) $(CRTRELOC)
-+startfiles = $(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT) $(CRTRELOC)
-+$(crt-y): $(startfiles)
- $(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT) $(CRTRELOC): | headers
- $(top_builddir)lib/$(NONSHARED_LIBNAME): $(libc-nonshared-y)
diff --git a/package/uclibc/0.9.31.1/uClibc-0012-netlinkaccess-header-types.patch.avr32 b/package/uclibc/0.9.31.1/uClibc-0012-netlinkaccess-header-types.patch.avr32
deleted file mode 100644 (file)
index bc981a4..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-Using kernel headers newer than 3.6.x, uclibc 0.9.31.1 fails to build:
-
-  In file included from output/host/usr/avr32-buildroot-linux-uclibc/sysroot/usr/include/linux/rtnetlink.h:6,
-                 from libc/inet/netlinkaccess.h:34,
-                 from libc/inet/if_index.c:36:
-  output/host/usr/avr32-buildroot-linux-uclibc/sysroot/usr/include/linux/if_link.h:314: error: expected specifier-qualifier-list before '__be16'
-  make[1]: *** [libc/inet/if_index.os] Error 1
-  make[1]: Leaving directory `output/build/uclibc-0.9.31.1'
-  make: *** [output/build/uclibc-0.9.31.1/.stamp_built] Error 2
-
-This patch adjusts the system type definitions in the netlinkaccess.h
-header, updating the types to match those used in uClibc 0.9.33.2.
-
-Signed-off-by: Simon Dawson <spdawson@gmail.com>
-
-diff -Nurp a/libc/inet/netlinkaccess.h b/libc/inet/netlinkaccess.h
---- a/libc/inet/netlinkaccess.h        2011-06-08 19:58:40.000000000 +0100
-+++ b/libc/inet/netlinkaccess.h        2012-12-20 12:16:34.251965672 +0000
-@@ -22,15 +22,8 @@
- #include <features.h>
- #include <stdint.h>
- #include <unistd.h>
--#include <sys/types.h>
--
- #if defined __ASSUME_NETLINK_SUPPORT || defined __UCLIBC_USE_NETLINK__
--#define _LINUX_TYPES_H
--typedef uint8_t __u8;
--typedef uint16_t __u16;
--typedef uint32_t __u32;
--typedef uint64_t __u64;
--typedef int32_t __s32;
-+#include <asm/types.h>
- #include <linux/rtnetlink.h>
- #include <linux/netlink.h>
diff --git a/package/uclibc/0.9.31.1/uclibc-0001-add-bsd-endian-conversions.patch b/package/uclibc/0.9.31.1/uclibc-0001-add-bsd-endian-conversions.patch
new file mode 100644 (file)
index 0000000..652d7c9
--- /dev/null
@@ -0,0 +1,64 @@
+From c6d6237819037168a6923ac080e348e54615422c Mon Sep 17 00:00:00 2001
+From: Vladimir Zapolskiy <vzapolskiy@gmail.com>
+Date: Tue, 1 Jun 2010 23:22:57 +0400
+Subject: [PATCH] endian.h: add BSD convertions between big/little-endian byte order
+
+This patch adds support for convertion of values between host and
+big-/little-endian byte order.
+
+Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
+Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
+---
+ include/endian.h |   38 ++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 38 insertions(+), 0 deletions(-)
+
+diff --git a/include/endian.h b/include/endian.h
+index 2f7bce1..0ba7384 100644
+--- a/include/endian.h
++++ b/include/endian.h
+@@ -55,4 +55,42 @@
+ # define __LONG_LONG_PAIR(HI, LO) HI, LO
+ #endif
++
++#ifdef __USE_BSD
++/* Conversion interfaces.  */
++# include <byteswap.h>
++
++# if __BYTE_ORDER == __LITTLE_ENDIAN
++#  define htobe16(x) __bswap_16 (x)
++#  define htole16(x) (x)
++#  define be16toh(x) __bswap_16 (x)
++#  define le16toh(x) (x)
++
++#  define htobe32(x) __bswap_32 (x)
++#  define htole32(x) (x)
++#  define be32toh(x) __bswap_32 (x)
++#  define le32toh(x) (x)
++
++#  define htobe64(x) __bswap_64 (x)
++#  define htole64(x) (x)
++#  define be64toh(x) __bswap_64 (x)
++#  define le64toh(x) (x)
++# else
++#  define htobe16(x) (x)
++#  define htole16(x) __bswap_16 (x)
++#  define be16toh(x) (x)
++#  define le16toh(x) __bswap_16 (x)
++
++#  define htobe32(x) (x)
++#  define htole32(x) __bswap_32 (x)
++#  define be32toh(x) (x)
++#  define le32toh(x) __bswap_32 (x)
++
++#  define htobe64(x) (x)
++#  define htole64(x) __bswap_64 (x)
++#  define be64toh(x) (x)
++#  define le64toh(x) __bswap_64 (x)
++# endif
++#endif
++
+ #endif        /* endian.h */
+-- 
+1.7.3.4
+
diff --git a/package/uclibc/0.9.31.1/uclibc-0002-add-inotify-init1.patch b/package/uclibc/0.9.31.1/uclibc-0002-add-inotify-init1.patch
new file mode 100644 (file)
index 0000000..cbec426
--- /dev/null
@@ -0,0 +1,64 @@
+From a2e5630af426f85fdd8721b2820786d9bd2aa695 Mon Sep 17 00:00:00 2001
+From: Vladimir Zapolskiy <vzapolskiy@gmail.com>
+Date: Tue, 1 Jun 2010 20:02:54 +0400
+Subject: [PATCH] inotify: add inotify_init1 system call support
+
+This patch introduces support for inotify_init1 system call, found
+since Linux 2.6.27.
+
+Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libc/sysdeps/linux/common/inotify.c     |    4 ++++
+ libc/sysdeps/linux/common/sys/inotify.h |   13 +++++++++++++
+ 2 files changed, 17 insertions(+), 0 deletions(-)
+
+diff --git a/libc/sysdeps/linux/common/inotify.c b/libc/sysdeps/linux/common/inotify.c
+index e5a6120..e35f043 100644
+--- a/libc/sysdeps/linux/common/inotify.c
++++ b/libc/sysdeps/linux/common/inotify.c
+@@ -15,6 +15,10 @@
+ _syscall0(int, inotify_init)
+ #endif
++#ifdef __NR_inotify_init1
++_syscall1(int, inotify_init1, int, flags)
++#endif
++
+ #ifdef __NR_inotify_add_watch
+ _syscall3(int, inotify_add_watch, int, fd, const char *, path, uint32_t, mask)
+ #endif
+diff --git a/libc/sysdeps/linux/common/sys/inotify.h b/libc/sysdeps/linux/common/sys/inotify.h
+index 0131db9..dc4e19d 100644
+--- a/libc/sysdeps/linux/common/sys/inotify.h
++++ b/libc/sysdeps/linux/common/sys/inotify.h
+@@ -22,6 +22,16 @@
+ #include <stdint.h>
++/* Flags for the parameter of inotify_init1.  */
++enum
++  {
++    IN_CLOEXEC = 02000000,
++#define IN_CLOEXEC IN_CLOEXEC
++    IN_NONBLOCK = 04000
++#define IN_NONBLOCK IN_NONBLOCK
++  };
++
++
+ /* Structure describing an inotify event.  */
+ struct inotify_event
+ {
+@@ -79,6 +89,9 @@ __BEGIN_DECLS
+ /* Create and initialize inotify instance.  */
+ extern int inotify_init (void) __THROW;
++/* Create and initialize inotify instance.  */
++extern int inotify_init1 (int __flags) __THROW;
++
+ /* Add watch of object NAME to inotify instance FD.  Notify about
+    events specified by MASK.  */
+ extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask)
+-- 
+1.7.3.4
+
diff --git a/package/uclibc/0.9.31.1/uclibc-0003-add-sock-cloexec.patch b/package/uclibc/0.9.31.1/uclibc-0003-add-sock-cloexec.patch
new file mode 100644 (file)
index 0000000..a7089a9
--- /dev/null
@@ -0,0 +1,43 @@
+From 83333e9c873e4eca6b2c945f7770b1f5373b0427 Mon Sep 17 00:00:00 2001
+From: Vladimir Zapolskiy <vzapolskiy@gmail.com>
+Date: Tue, 1 Jun 2010 20:02:39 +0400
+Subject: [PATCH] bits/socket.h: add SOCK_CLOEXEC and SOCK_NONBLOCK support
+
+This patch adds support for SOCK_CLOEXEC and SOCK_NONBLOCK socket
+descriptor flags, which are introduced since Linux 2.6.27
+
+Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libc/sysdeps/linux/common/bits/socket.h |   12 +++++++++++-
+ 1 files changed, 11 insertions(+), 1 deletions(-)
+
+diff --git a/libc/sysdeps/linux/common/bits/socket.h b/libc/sysdeps/linux/common/bits/socket.h
+index ac5a433..11f6e97 100644
+--- a/libc/sysdeps/linux/common/bits/socket.h
++++ b/libc/sysdeps/linux/common/bits/socket.h
+@@ -53,10 +53,20 @@ enum __socket_type
+   SOCK_SEQPACKET = 5,         /* Sequenced, reliable, connection-based,
+                                  datagrams of fixed maximum length.  */
+ #define SOCK_SEQPACKET SOCK_SEQPACKET
+-  SOCK_PACKET = 10            /* Linux specific way of getting packets
++  SOCK_PACKET = 10,           /* Linux specific way of getting packets
+                                  at the dev level.  For writing rarp and
+                                  other similar things on the user level. */
+ #define SOCK_PACKET SOCK_PACKET
++
++  /* Flags to be ORed into the type parameter of socket and socketpair and
++     used for the flags parameter of paccept.  */
++
++  SOCK_CLOEXEC = 02000000,    /* Atomically set close-on-exec flag for the
++                                 new descriptor(s).  */
++#define SOCK_CLOEXEC SOCK_CLOEXEC
++  SOCK_NONBLOCK = 04000               /* Atomically mark descriptor(s) as
++                                 non-blocking.  */
++#define SOCK_NONBLOCK SOCK_NONBLOCK
+ };
+ /* Protocol families.  */
+-- 
+1.7.3.4
+
diff --git a/package/uclibc/0.9.31.1/uclibc-0004-export-strverscmp.patch b/package/uclibc/0.9.31.1/uclibc-0004-export-strverscmp.patch
new file mode 100644 (file)
index 0000000..19bc021
--- /dev/null
@@ -0,0 +1,30 @@
+From 139b8f0c673fed465d27f99c98568e5d5e1b9b72 Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <vda.linux@googlemail.com>
+Date: Fri, 4 Jun 2010 13:36:30 +0200
+Subject: [PATCH] strverscmp: I forgot to export it
+
+Result was:
+
+strverscmp.o:
+000000ec T __GI_strverscmp
+
+i.e. no plain "strverscmp"!
+
+Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+---
+ libc/string/strverscmp.c |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/libc/string/strverscmp.c b/libc/string/strverscmp.c
+index 74ae4c6..b19e8f0 100644
+--- a/libc/string/strverscmp.c
++++ b/libc/string/strverscmp.c
+@@ -115,3 +115,4 @@ int strverscmp (const char *s1, const char *s2)
+       return state;
+   }
+ }
++libc_hidden_def(strverscmp)
+-- 
+1.7.3.4
+
diff --git a/package/uclibc/0.9.31.1/uclibc-0005-fix-daylight-saving-time-handling.patch b/package/uclibc/0.9.31.1/uclibc-0005-fix-daylight-saving-time-handling.patch
new file mode 100644 (file)
index 0000000..5a96113
--- /dev/null
@@ -0,0 +1,36 @@
+From 47f3da1cf49377c25772bb54d07db55225bbb142 Mon Sep 17 00:00:00 2001
+From: Guillaume Bourcier <guillaumebourcier@free.fr>
+Date: Tue, 11 Oct 2011 13:45:33 +0200
+Subject: [PATCH] libc: fix daylight saving time handling
+
+The algorithm computing daylight saving time incorrectly adds a day for
+each month after January for leap years. The clock shift from/to DST can
+be delayed if the last Sunday of a transition month is exactly seven
+days before the first of the following month.
+
+This change adds a day for the February month only.
+
+Signed-off-by: Guillaume Bourcier <guillaumebourcier@free.fr>
+Signed-off-by: Richard Braun <rbraun@sceen.net>
+Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+---
+ libc/misc/time/time.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c
+index 19d68e1..8e2ebf1 100644
+--- a/libc/misc/time/time.c
++++ b/libc/misc/time/time.c
+@@ -689,7 +689,7 @@ static int tm_isdst(register const struct tm *__restrict ptm,
+                                       ++day;
+                               }
+                               monlen = 31 + day_cor[r->month -1] - day_cor[r->month];
+-                              if (isleap && (r->month > 1)) {
++                              if (isleap && (r->month == 2)) {
+                                       ++monlen;
+                               }
+                               /* Wweekday (0 is Sunday) of 1st of the month
+-- 
+1.7.3.4
+
diff --git a/package/uclibc/0.9.31.1/uclibc-0006-fix-error-locale-utf-8.patch b/package/uclibc/0.9.31.1/uclibc-0006-fix-error-locale-utf-8.patch
new file mode 100644 (file)
index 0000000..1305add
--- /dev/null
@@ -0,0 +1,17 @@
+---
+ extra/locale/gen_wc8bit.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: uClibc-0.9.31/extra/locale/gen_wc8bit.c
+===================================================================
+--- uClibc-0.9.31.orig/extra/locale/gen_wc8bit.c
++++ uClibc-0.9.31/extra/locale/gen_wc8bit.c
+@@ -120,7 +120,7 @@
+               }
+  locale_failure:
+-              printf("could not find a UTF8 locale ... please enable en_US.UTF-8\n");
++              fprintf(stderr, "could not find a UTF8 locale ... please enable en_US.UTF-8\n");
+               return EXIT_FAILURE;
+  locale_success:
+               pclose(fp);
diff --git a/package/uclibc/0.9.31.1/uclibc-0007-linuxthreads-errno-fix.patch b/package/uclibc/0.9.31.1/uclibc-0007-linuxthreads-errno-fix.patch
new file mode 100644 (file)
index 0000000..c49821b
--- /dev/null
@@ -0,0 +1,98 @@
+From af8b2d71ce37b9d4d24ddbc755cdea68de02949a Mon Sep 17 00:00:00 2001
+From: Peter Korsgaard <jacmet@sunsite.dk>
+Date: Mon, 5 Jul 2010 14:08:17 +0200
+Subject: [PATCH] don't make __errno_location / __h_errno_location hidden
+
+Closes #2089 (https://bugs.busybox.net/show_bug.cgi?id=2089)
+
+__errno_location / __h_errno_location access has to go through the PLT
+like malloc/free, so the linuxthread variants gets used instead when
+compiling with -pthread.
+
+Based on http://github.com/mat-c/uClibc/commit/328d392c54aa5dc2b8e7f398a419087de497de2b
+
+Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
+---
+ include/netdb.h                               |    1 -
+ libc/misc/internals/__errno_location.c        |    3 ---
+ libc/misc/internals/__h_errno_location.c      |    1 -
+ libc/misc/internals/__uClibc_main.c           |    2 --
+ libc/sysdeps/linux/common/bits/errno.h        |    1 -
+ libc/sysdeps/linux/common/bits/uClibc_errno.h |    3 ---
+ 6 files changed, 0 insertions(+), 11 deletions(-)
+
+diff --git a/include/netdb.h b/include/netdb.h
+index 9d3807d..ac411ab 100644
+--- a/include/netdb.h
++++ b/include/netdb.h
+@@ -59,7 +59,6 @@ __BEGIN_DECLS
+ /* Function to get address of global `h_errno' variable.  */
+ extern int *__h_errno_location (void) __THROW __attribute__ ((__const__));
+-libc_hidden_proto(__h_errno_location)
+ /* Macros for accessing h_errno from inside libc.  */
+ #ifdef _LIBC
+diff --git a/libc/misc/internals/__errno_location.c b/libc/misc/internals/__errno_location.c
+index 487a9c2..0620860 100644
+--- a/libc/misc/internals/__errno_location.c
++++ b/libc/misc/internals/__errno_location.c
+@@ -11,6 +11,3 @@ int * weak_const_function __errno_location (void)
+ {
+     return &errno;
+ }
+-#ifdef IS_IN_libc /* not really need, only to keep in sync w/ libc_hidden_proto */
+-libc_hidden_weak(__errno_location)
+-#endif
+diff --git a/libc/misc/internals/__h_errno_location.c b/libc/misc/internals/__h_errno_location.c
+index 213d398..235df4e 100644
+--- a/libc/misc/internals/__h_errno_location.c
++++ b/libc/misc/internals/__h_errno_location.c
+@@ -10,4 +10,3 @@ int * weak_const_function __h_errno_location (void)
+ {
+     return &h_errno;
+ }
+-libc_hidden_weak(__h_errno_location)
+diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c
+index 6e520fa..f4a9ebb 100644
+--- a/libc/misc/internals/__uClibc_main.c
++++ b/libc/misc/internals/__uClibc_main.c
+@@ -64,9 +64,7 @@ void internal_function _dl_aux_init (ElfW(auxv_t) *av);
+  * Prototypes.
+  */
+ extern int *weak_const_function __errno_location(void);
+-libc_hidden_proto(__errno_location)
+ extern int *weak_const_function __h_errno_location(void);
+-libc_hidden_proto(__h_errno_location)
+ extern void weak_function _stdio_init(void) attribute_hidden;
+ #ifdef __UCLIBC_HAS_LOCALE__
+diff --git a/libc/sysdeps/linux/common/bits/errno.h b/libc/sysdeps/linux/common/bits/errno.h
+index 0bf6354..de9688a 100644
+--- a/libc/sysdeps/linux/common/bits/errno.h
++++ b/libc/sysdeps/linux/common/bits/errno.h
+@@ -43,7 +43,6 @@
+ # ifndef __ASSEMBLER__
+ /* Function to get address of global `errno' variable.  */
+ extern int *__errno_location (void) __THROW __attribute__ ((__const__));
+-libc_hidden_proto(__errno_location)
+ #  ifdef __UCLIBC_HAS_THREADS__
+ /* When using threads, errno is a per-thread value.  */
+diff --git a/libc/sysdeps/linux/common/bits/uClibc_errno.h b/libc/sysdeps/linux/common/bits/uClibc_errno.h
+index 9c15618..79eb7e6 100644
+--- a/libc/sysdeps/linux/common/bits/uClibc_errno.h
++++ b/libc/sysdeps/linux/common/bits/uClibc_errno.h
+@@ -33,9 +33,6 @@ extern int *__errno_location (void) __THROW __attribute__ ((__const__))
+ ;
+ # if defined __UCLIBC_HAS_THREADS__
+ #  include <tls.h>
+-#  if defined USE___THREAD && USE___THREAD
+-libc_hidden_proto(__errno_location)
+-#  endif
+ # endif
+ #endif /* !__ASSEMBLER__ */
+-- 
+1.7.1
+
diff --git a/package/uclibc/0.9.31.1/uclibc-0008-more-workarounds-GCC-PR32219.patch b/package/uclibc/0.9.31.1/uclibc-0008-more-workarounds-GCC-PR32219.patch
new file mode 100644 (file)
index 0000000..9e69532
--- /dev/null
@@ -0,0 +1,40 @@
+From aa67771881d65373da448ad5f7a8393f3a1d9469 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Wed, 30 Jun 2010 14:46:37 +0300
+Subject: [PATCH] more workarounds for GCC PR32219
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Commit 2e53dd645d5348f207cec7f8595969dc566c5a55 workarounds GCC
+bug when accessing _locale_init and _stdio_init. We need the same
+fix for __errno_location and __h_errno_location otherwise we crash
+calling null with static and non-threaded builds.
+
+Signed-off-by: Timo Teräs <timo.teras@iki.fi>
+Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
+---
+ libc/misc/internals/__uClibc_main.c |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c
+index 3f09ad2..58f6643 100644
+--- a/libc/misc/internals/__uClibc_main.c
++++ b/libc/misc/internals/__uClibc_main.c
+@@ -447,11 +447,11 @@ void __uClibc_main(int (*main)(int, char **, char **), int argc,
+      * have resulted in errno being set nonzero, so set it to 0 before
+      * we call main.
+      */
+-    if (likely(__errno_location!=NULL))
++    if (likely(not_null_ptr(__errno_location)))
+       *(__errno_location()) = 0;
+     /* Set h_errno to 0 as well */
+-    if (likely(__h_errno_location!=NULL))
++    if (likely(not_null_ptr(__h_errno_location)))
+       *(__h_errno_location()) = 0;
+ #if defined HAVE_CLEANUP_JMP_BUF && defined __UCLIBC_HAS_THREADS_NATIVE__
+-- 
+1.7.1
+
diff --git a/package/uclibc/0.9.31.1/uclibc-0009-unshare.patch b/package/uclibc/0.9.31.1/uclibc-0009-unshare.patch
new file mode 100644 (file)
index 0000000..ad440d9
--- /dev/null
@@ -0,0 +1,74 @@
+Backport of unshare() syscall.
+From uClibc git 19dd090a0f68765db87990ef8eda9bf77bb29581
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+
+---
+diff -Nura uClibc-0.9.31.1.orig/libc/sysdeps/linux/common/bits/sched.h uClibc-0.9.31.1/libc/sysdeps/linux/common/bits/sched.h
+--- uClibc-0.9.31.1.orig/libc/sysdeps/linux/common/bits/sched.h        2011-06-08 15:58:40.000000000 -0300
++++ uClibc-0.9.31.1/libc/sysdeps/linux/common/bits/sched.h     2011-12-05 08:10:02.491978849 -0300
+@@ -58,7 +58,13 @@
+                                     force CLONE_PTRACE on this clone.  */
+ # define CLONE_CHILD_SETTID 0x01000000 /* Store TID in userlevel buffer in
+                                         the child.  */
+-# define CLONE_STOPPED        0x02000000 /* Start in stopped state.  */
++# define CLONE_STOPPED 0x02000000 /* Start in stopped state.  */
++# define CLONE_NEWUTS  0x04000000      /* New utsname group.  */
++# define CLONE_NEWIPC  0x08000000      /* New ipcs.  */
++# define CLONE_NEWUSER 0x10000000      /* New user namespace.  */
++# define CLONE_NEWPID  0x20000000      /* New pid namespace.  */
++# define CLONE_NEWNET  0x40000000      /* New network namespace.  */
++# define CLONE_IO      0x80000000      /* Clone I/O context.  */
+ #endif
+ /* The official definition.  */
+@@ -74,11 +80,9 @@
+ extern int clone (int (*__fn) (void *__arg), void *__child_stack,
+                 int __flags, void *__arg, ...) __THROW;
+-#if 0
+ /* Unshare the specified resources.  */
+ extern int unshare (int __flags) __THROW;
+ #endif
+-#endif
+ __END_DECLS
+diff -Nura uClibc-0.9.31.1.orig/libc/sysdeps/linux/common/Makefile.in uClibc-0.9.31.1/libc/sysdeps/linux/common/Makefile.in
+--- uClibc-0.9.31.1.orig/libc/sysdeps/linux/common/Makefile.in 2011-06-08 15:58:40.000000000 -0300
++++ uClibc-0.9.31.1/libc/sysdeps/linux/common/Makefile.in      2011-12-05 08:23:28.353757602 -0300
+@@ -31,7 +31,8 @@
+       remap_file_pages.c sched_getaffinity.c sched_setaffinity.c \
+       sendfile64.c sendfile.c setfsgid.c setfsuid.c setresuid.c \
+       splice.c vmsplice.c tee.c signalfd.c swapoff.c swapon.c \
+-      sync_file_range.c sysctl.c sysinfo.c timerfd.c uselib.c vhangup.c,$(CSRC))
++      sync_file_range.c sysctl.c sysinfo.c timerfd.c unshare.c uselib.c \
++      vhangup.c,$(CSRC))
+ endif
+ ifneq ($(UCLIBC_BSD_SPECIFIC),y)
+diff -Nura uClibc-0.9.31.1.orig/libc/sysdeps/linux/common/unshare.c uClibc-0.9.31.1/libc/sysdeps/linux/common/unshare.c
+--- uClibc-0.9.31.1.orig/libc/sysdeps/linux/common/unshare.c   1969-12-31 21:00:00.000000000 -0300
++++ uClibc-0.9.31.1/libc/sysdeps/linux/common/unshare.c        2011-12-05 08:22:45.954453512 -0300
+@@ -0,0 +1,21 @@
++/* vi: set sw=4 ts=4: */
++/*
++ * unshare() for uClibc
++ *
++ * Copyright (C) 2011 Henning Heinold <heinold@inf.fu-berlin.de>
++ *
++ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
++ */
++
++#include <sys/syscall.h>
++#include <sched.h>
++
++#if defined __NR_unshare && defined __UCLIBC_LINUX_SPECIFIC__
++_syscall1(int, unshare, int, flags)
++#else
++int unshare(int flags) 
++{   
++    __set_errno(ENOSYS);
++    return -1;
++}
++#endif
diff --git a/package/uclibc/0.9.31.1/uclibc-0010-workaround-GCC-PR32219.patch b/package/uclibc/0.9.31.1/uclibc-0010-workaround-GCC-PR32219.patch
new file mode 100644 (file)
index 0000000..242a526
--- /dev/null
@@ -0,0 +1,57 @@
+From 2e53dd645d5348f207cec7f8595969dc566c5a55 Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <vda.linux@googlemail.com>
+Date: Mon, 17 May 2010 15:56:19 +0200
+Subject: [PATCH] workaround GCC PR32219
+
+we ended up calling 0
+Fixes bug #1033
+
+Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
+Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
+---
+ libc/misc/internals/__uClibc_main.c |   15 +++++++++++++--
+ 1 files changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c
+index f9e1244..4ee4443 100644
+--- a/libc/misc/internals/__uClibc_main.c
++++ b/libc/misc/internals/__uClibc_main.c
+@@ -105,6 +105,17 @@ _pthread_cleanup_pop_restore(struct _pthread_cleanup_buffer *__buffer,
+ #endif /* !SHARED */
++/* Defeat compiler optimization which assumes function addresses are never NULL */
++static __always_inline int not_null_ptr(const void *p)
++{
++      const void *q;
++      __asm__ (""
++              : "=r" (q) /* output */
++              : "0" (p) /* input */
++      );
++      return q != 0;
++}
++
+ /*
+  * Prototypes.
+  */
+@@ -254,7 +265,7 @@ void __uClibc_init(void)
+ #ifdef __UCLIBC_HAS_LOCALE__
+     /* Initialize the global locale structure. */
+-    if (likely(_locale_init!=NULL))
++    if (likely(not_null_ptr(_locale_init)))
+       _locale_init();
+ #endif
+@@ -264,7 +275,7 @@ void __uClibc_init(void)
+      * Thus we get a nice size savings because the stdio functions
+      * won't be pulled into the final static binary unless used.
+      */
+-    if (likely(_stdio_init != NULL))
++    if (likely(not_null_ptr(_stdio_init)))
+       _stdio_init();
+ }
+-- 
+1.7.1
+
diff --git a/package/uclibc/0.9.31.1/uclibc-0011-startfiles-Make-targets.patch b/package/uclibc/0.9.31.1/uclibc-0011-startfiles-Make-targets.patch
new file mode 100644 (file)
index 0000000..9a7f304
--- /dev/null
@@ -0,0 +1,60 @@
+Add startfiles and install_startfiles targets to the top-level Makefile, as
+in uClibc 0.9.32 and later.
+
+Signed-off-by: Simon Dawson <spdawson@gmail.com>
+
+diff -Nurp a/Makefile.help b/Makefile.help
+--- a/Makefile.help    2011-06-08 19:58:40.000000000 +0100
++++ b/Makefile.help    2013-08-10 21:17:46.572104259 +0100
+@@ -14,6 +14,7 @@ help:
+       @echo 'Build:'
+       @echo '  all                    - libraries and generated headers'
+       @echo '  pregen         - generate headers'
++      @echo '  startfiles             - build startfiles (crt)'
+       @echo '  utils                  - build target utilities'
+       @echo '                   (ldd, ldconfig, locale, iconv)'
+       @echo '  hostutils              - build host utilities (see utils)'
+@@ -32,6 +33,7 @@ help:
+       @echo '  install                - install both the runtime and the headers'
+       @echo '  install_runtime        - install the libraries'
+       @echo '  install_dev            - install all headers and static libs'
++      @echo '  install_startfiles     - install startfiles (crt)'
+       @echo '  install_headers        - install headers excluding generated ones'
+       @echo '  install_utils          - install target utilities'
+       @echo '  install_hostutils      - install host utilities'
+diff -Nurp a/Makefile.in b/Makefile.in
+--- a/Makefile.in      2011-06-08 19:58:40.000000000 +0100
++++ b/Makefile.in      2013-08-10 21:10:55.248649101 +0100
+@@ -193,6 +193,8 @@ install: install_runtime install_dev
+ RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB=$(shell $(top_srcdir)extra/scripts/relative_path.sh $(DEVEL_PREFIX)$(MULTILIB_DIR) $(RUNTIME_PREFIX)$(MULTILIB_DIR))
++startfiles: $(crt-y)
++
+ $(top_builddir)extra/scripts/unifdef: |$(top_builddir)extra/scripts
+ $(top_builddir)extra/scripts/unifdef: $(top_srcdir)extra/scripts/unifdef.c
+       $(hcompile.u)
+@@ -301,6 +303,10 @@ else
+       cd $(PREFIX)$(DEVEL_PREFIX)include && $(RM) -f wchar-stub.h
+ endif
++# Installs startfiles
++install_startfiles: startfiles | $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)
++      -$(INSTALL) -m 644 $(startfiles) $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/
++
+ # Installs development library links.
+ install_dev: install_headers install_runtime | $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)
+       -$(INSTALL) -m 644 $(top_builddir)lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/
+diff -Nurp a/Makerules b/Makerules
+--- a/Makerules        2011-06-08 19:58:40.000000000 +0100
++++ b/Makerules        2013-08-10 21:24:21.287583111 +0100
+@@ -406,7 +406,8 @@ endif
+ CRTS_COMPAT :=
+ #endif
+-$(crt-y): $(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT) $(CRTRELOC)
++startfiles = $(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT) $(CRTRELOC)
++$(crt-y): $(startfiles)
+ $(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT) $(CRTRELOC): | headers
+ $(top_builddir)lib/$(NONSHARED_LIBNAME): $(libc-nonshared-y)
diff --git a/package/uclibc/0.9.31.1/uclibc-0012-netlinkaccess-header-types.patch b/package/uclibc/0.9.31.1/uclibc-0012-netlinkaccess-header-types.patch
new file mode 100644 (file)
index 0000000..bc981a4
--- /dev/null
@@ -0,0 +1,35 @@
+Using kernel headers newer than 3.6.x, uclibc 0.9.31.1 fails to build:
+
+  In file included from output/host/usr/avr32-buildroot-linux-uclibc/sysroot/usr/include/linux/rtnetlink.h:6,
+                 from libc/inet/netlinkaccess.h:34,
+                 from libc/inet/if_index.c:36:
+  output/host/usr/avr32-buildroot-linux-uclibc/sysroot/usr/include/linux/if_link.h:314: error: expected specifier-qualifier-list before '__be16'
+  make[1]: *** [libc/inet/if_index.os] Error 1
+  make[1]: Leaving directory `output/build/uclibc-0.9.31.1'
+  make: *** [output/build/uclibc-0.9.31.1/.stamp_built] Error 2
+
+This patch adjusts the system type definitions in the netlinkaccess.h
+header, updating the types to match those used in uClibc 0.9.33.2.
+
+Signed-off-by: Simon Dawson <spdawson@gmail.com>
+
+diff -Nurp a/libc/inet/netlinkaccess.h b/libc/inet/netlinkaccess.h
+--- a/libc/inet/netlinkaccess.h        2011-06-08 19:58:40.000000000 +0100
++++ b/libc/inet/netlinkaccess.h        2012-12-20 12:16:34.251965672 +0000
+@@ -22,15 +22,8 @@
+ #include <features.h>
+ #include <stdint.h>
+ #include <unistd.h>
+-#include <sys/types.h>
+-
+ #if defined __ASSUME_NETLINK_SUPPORT || defined __UCLIBC_USE_NETLINK__
+-#define _LINUX_TYPES_H
+-typedef uint8_t __u8;
+-typedef uint16_t __u16;
+-typedef uint32_t __u32;
+-typedef uint64_t __u64;
+-typedef int32_t __s32;
++#include <asm/types.h>
+ #include <linux/rtnetlink.h>
+ #include <linux/netlink.h>