Skip to contentSkip to conversation

uclibc: reinstate support for version 0.9.31

PATCH New spdawson at gmail.com 2 participants 2 messages Nov 7, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v5 1/1 uclibc: reinstate support for version 0.9.31

From: Simon Dawson <[email protected]>

This patch reinstates support for uClibc version 0.9.31, which was removed from Buildroot in commit 8abb5b33c1aae035cf48b1c81104b433ff884c64

---
v5: Various improvements suggested by Peter Korsgaard, including a reduction
of the 0.9.31 uClibc patch set
v4: As suggested by Thomas Petazzoni, make 0.9.31 avr32-only, and disable
other uClibc versions for avr32
v3: Rebase on top of current master
v2: Resend original RFC patch, no changes

 package/libglib2/libglib2.mk                       |   2 +-
 .../uClibc-0001-add-bsd-endian-conversions.patch   |  64 +++++
 .../0.9.31.1/uClibc-0002-add-inotify-init1.patch   |  64 +++++
 .../0.9.31.1/uClibc-0003-add-sock-cloexec.patch    |  43 ++++
 .../0.9.31.1/uClibc-0004-export-strverscmp.patch   |  30 +++
 ...bc-0005-fix-daylight-saving-time-handling.patch |  36 +++
 .../uClibc-0006-fix-error-locale-utf-8.patch       |  17 ++
 .../uClibc-0007-linuxthreads-errno-fix.patch       |  98 ++++++++
 .../uClibc-0008-more-workarounds-GCC-PR32219.patch |  40 ++++
 package/uclibc/0.9.31.1/uClibc-0009-unshare.patch  |  74 ++++++
 .../uClibc-0010-workaround-GCC-PR32219.patch       |  57 +++++
 .../uClibc-0011-startfiles-Make-targets.patch      |  60 +++++
 package/uclibc/Config.in                           |   8 +-
 package/uclibc/uClibc-0.9.31.config                | 259 +++++++++++++++++++++
 14 files changed, 850 insertions(+), 2 deletions(-)
 create mode 100644 package/uclibc/0.9.31.1/uClibc-0001-add-bsd-endian-conversions.patch
 create mode 100644 package/uclibc/0.9.31.1/uClibc-0002-add-inotify-init1.patch
 create mode 100644 package/uclibc/0.9.31.1/uClibc-0003-add-sock-cloexec.patch
 create mode 100644 package/uclibc/0.9.31.1/uClibc-0004-export-strverscmp.patch
 create mode 100644 package/uclibc/0.9.31.1/uClibc-0005-fix-daylight-saving-time-handling.patch
 create mode 100644 package/uclibc/0.9.31.1/uClibc-0006-fix-error-locale-utf-8.patch
 create mode 100644 package/uclibc/0.9.31.1/uClibc-0007-linuxthreads-errno-fix.patch
 create mode 100644 package/uclibc/0.9.31.1/uClibc-0008-more-workarounds-GCC-PR32219.patch
 create mode 100644 package/uclibc/0.9.31.1/uClibc-0009-unshare.patch
 create mode 100644 package/uclibc/0.9.31.1/uClibc-0010-workaround-GCC-PR32219.patch
 create mode 100644 package/uclibc/0.9.31.1/uClibc-0011-startfiles-Make-targets.patch
 create mode 100644 package/uclibc/uClibc-0.9.31.config
package/libglib2/libglib2.mk +1 -1
index 51b2fc1..f770d3a 100644
@@ -51,7 +51,7 @@ LIBGLIB2_CONF_ENV = \
 		gt_cv_c_wchar_t=$(if $(BR2_USE_WCHAR),yes,no)
 
 # old uClibc versions don't provide qsort_r
-ifeq ($(BR2_UCLIBC_VERSION_0_9_32)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC)$(BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEEL_V2)$(BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEBE_V2),y)
+ifeq ($(BR2_UCLIBC_VERSION_0_9_31)$(BR2_UCLIBC_VERSION_0_9_32)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC)$(BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEEL_V2)$(BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEBE_V2),y)
 LIBGLIB2_CONF_ENV += glib_cv_have_qsort_r=no
 else
 LIBGLIB2_CONF_ENV += glib_cv_have_qsort_r=yes
package/uclibc/0.9.31.1/uClibc-0001-add-bsd-endian-conversions.patch new file +64 -0

64 lines not on this page · raw message

package/uclibc/0.9.31.1/uClibc-0002-add-inotify-init1.patch new file +64 -0

64 lines not on this page · raw message

package/uclibc/0.9.31.1/uClibc-0003-add-sock-cloexec.patch new file +43 -0

43 lines not on this page · raw message

package/uclibc/0.9.31.1/uClibc-0004-export-strverscmp.patch new file +30 -0
new file mode 100644
index 0000000..19bc021
@@ -0,0 +1,30 @@
+From 139b8f0c673fed465d27f99c98568e5d5e1b9b72 Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <[email protected]>
+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 <[email protected]>
+Signed-off-by: Gustavo Zacarias <[email protected]>
+---
+ 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
+
package/uclibc/0.9.31.1/uClibc-0005-fix-daylight-saving-time-handling.patch new file +36 -0
new file mode 100644
index 0000000..5a96113
@@ -0,0 +1,36 @@
+From 47f3da1cf49377c25772bb54d07db55225bbb142 Mon Sep 17 00:00:00 2001
+From: Guillaume Bourcier <[email protected]>
+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 <[email protected]>
+Signed-off-by: Richard Braun <[email protected]>
+Signed-off-by: Carmelo Amoroso <[email protected]>
+Signed-off-by: Gustavo Zacarias <[email protected]>
+---
+ 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
+
package/uclibc/0.9.31.1/uClibc-0006-fix-error-locale-utf-8.patch new file +17 -0
new file mode 100644
index 0000000..1305add
@@ -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);
package/uclibc/0.9.31.1/uClibc-0007-linuxthreads-errno-fix.patch new file +98 -0

98 lines not on this page · raw message

package/uclibc/0.9.31.1/uClibc-0008-more-workarounds-GCC-PR32219.patch new file +40 -0
new file mode 100644
index 0000000..9e69532
@@ -0,0 +1,40 @@
+From aa67771881d65373da448ad5f7a8393f3a1d9469 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <[email protected]>
+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 <[email protected]>
+Signed-off-by: Bernhard Reutner-Fischer <[email protected]>
+---
+ 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
+
package/uclibc/0.9.31.1/uClibc-0009-unshare.patch new file +74 -0

74 lines not on this page · raw message

package/uclibc/0.9.31.1/uClibc-0010-workaround-GCC-PR32219.patch new file +57 -0

57 lines not on this page · raw message

package/uclibc/0.9.31.1/uClibc-0011-startfiles-Make-targets.patch new file +60 -0

60 lines not on this page · raw message

package/uclibc/Config.in +7 -1
index 0e7ae54..2dbac12 100644
@@ -8,13 +8,17 @@ choice
 	help
 	  Select the version of uClibc you wish to use.
 
+	config BR2_UCLIBC_VERSION_0_9_31
+		bool "uClibc 0.9.31.x"
+		depends on BR2_avr32
+
 	config BR2_UCLIBC_VERSION_0_9_32
 		bool "uClibc 0.9.32.x"
 		depends on !(BR2_arc || BR2_avr32 || BR2_sh || BR2_xtensa)
 
 	config BR2_UCLIBC_VERSION_0_9_33
 		bool "uClibc 0.9.33.x"
-		depends on !(BR2_arc || BR2_xtensa)
+		depends on !(BR2_arc || BR2_avr32 || BR2_xtensa)
 
 	config BR2_UCLIBC_VERSION_0_9_33_ARC
 		bool "uClibc 0.9.33.x-arc"
@@ -34,6 +38,7 @@ config BR2_USE_UCLIBC_SNAPSHOT
 
 config BR2_UCLIBC_VERSION_STRING
 	string
+	default 0.9.31.1	if BR2_UCLIBC_VERSION_0_9_31
 	default 0.9.32.1	if BR2_UCLIBC_VERSION_0_9_32
 	default 0.9.33.2	if BR2_UCLIBC_VERSION_0_9_33
 	default 0.9.33-arc	if BR2_UCLIBC_VERSION_0_9_33_ARC
@@ -41,6 +46,7 @@ config BR2_UCLIBC_VERSION_STRING
 
 config BR2_UCLIBC_CONFIG
 	string "uClibc configuration file to use?"
+	default "package/uclibc/uClibc-0.9.31.config" if BR2_UCLIBC_VERSION_0_9_31
 	default "package/uclibc/uClibc-0.9.32.config" if BR2_UCLIBC_VERSION_0_9_32
 	default "package/uclibc/uClibc-0.9.33.config" if BR2_UCLIBC_VERSION_0_9_33
 	default "package/uclibc/uClibc-snapshot.config" if BR2_UCLIBC_VERSION_0_9_33_ARC
package/uclibc/uClibc-0.9.31.config new file +259 -0

259 lines not on this page · raw message

Signature · 1 line
1.8.3.2
#1 lore raw

PATCH v5 1/1 uclibc: reinstate support for version 0.9.31

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"spdawson" == spdawson <[email protected]> writes:

From: Simon Dawson <[email protected]>
This patch reinstates support for uClibc version 0.9.31, which was removed from Buildroot in commit 8abb5b33c1aae035cf48b1c81104b433ff884c64

Quoted 8 lines

---
v5: Various improvements suggested by Peter Korsgaard, including a reduction
of the 0.9.31 uClibc patch set
v4: As suggested by Thomas Petazzoni, make 0.9.31 avr32-only, and disable
other uClibc versions for avr32
v3: Rebase on top of current master
v2: Resend original RFC patch, no changes

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard