From 202ca9b7d4fcf06e19af34c8718353aa8ffe41f8 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Fri, 13 May 2016 08:44:21 -0700 Subject: [PATCH 1/7] Upgrade uClibc-ng to 1.0.14. Signed-off-by: Alexey Neyman --- config/libc/uClibc.in | 10 +++++----- .../uClibc-ng/1.0.12/100-provide-_obstack_free.patch | 12 ------------ 2 files changed, 5 insertions(+), 17 deletions(-) delete mode 100644 patches/uClibc-ng/1.0.12/100-provide-_obstack_free.patch diff --git a/config/libc/uClibc.in b/config/libc/uClibc.in index a99ff736..6d814da8 100644 --- a/config/libc/uClibc.in +++ b/config/libc/uClibc.in @@ -75,10 +75,10 @@ choice # Don't remove next line # CT_INSERT_VERSION_BELOW -config LIBC_UCLIBC_NG_V_1_0_12 +config LIBC_UCLIBC_NG_V_1_0_14 bool - prompt "1.0.12" - select LIBC_UCLIBC_NG_1_0_12_or_later + prompt "1.0.14" + select LIBC_UCLIBC_NG_1_0_14_or_later config LIBC_UCLIBC_V_0_9_33_2 bool @@ -91,12 +91,12 @@ config LIBC_VERSION string # Don't remove next line # CT_INSERT_VERSION_STRING_BELOW - default "1.0.12" if LIBC_UCLIBC_NG_V_1_0_12 + default "1.0.14" if LIBC_UCLIBC_NG_V_1_0_14 default "0.9.33.2" if LIBC_UCLIBC_V_0_9_33_2 endif # ! LIBC_UCLIBC_CUSTOM -config LIBC_UCLIBC_NG_1_0_12_or_later +config LIBC_UCLIBC_NG_1_0_14_or_later bool select LIBC_UCLIBC_NG_1_0_0_or_later diff --git a/patches/uClibc-ng/1.0.12/100-provide-_obstack_free.patch b/patches/uClibc-ng/1.0.12/100-provide-_obstack_free.patch deleted file mode 100644 index 9fd4bc3a..00000000 --- a/patches/uClibc-ng/1.0.12/100-provide-_obstack_free.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur uClibc-ng-1.0.12.orig/libc/misc/gnu/obstack.c uClibc-ng-1.0.12/libc/misc/gnu/obstack.c ---- uClibc-ng-1.0.12.orig/libc/misc/gnu/obstack.c 2016-03-13 15:08:44.408962824 -0700 -+++ uClibc-ng-1.0.12/libc/misc/gnu/obstack.c 2016-03-13 15:13:30.129322998 -0700 -@@ -385,7 +385,7 @@ - abort (); - } - --# if 0 -+# if 1 - /* Older versions of libc used a function _obstack_free intended to be - called by non-GCC compilers. */ - strong_alias (obstack_free, _obstack_free) From f35c62daf0b4c6eaa50ef3d51499b6c5c4e24332 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Sun, 11 Sep 2016 12:39:42 -0700 Subject: [PATCH 2/7] Add uClibc-ng 1.0.17. Also, support uClibc-ng in addToolVersion.sh Signed-off-by: Alexey Neyman --- config/libc/uClibc.in | 6 ++++++ scripts/addToolVersion.sh | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/config/libc/uClibc.in b/config/libc/uClibc.in index 6d814da8..5ce2674c 100644 --- a/config/libc/uClibc.in +++ b/config/libc/uClibc.in @@ -75,6 +75,11 @@ choice # Don't remove next line # CT_INSERT_VERSION_BELOW +config LIBC_UCLIBC_NG_V_1_0_17 + bool + prompt "1.0.17" + select LIBC_UCLIBC_NG_1_0_14_or_later + config LIBC_UCLIBC_NG_V_1_0_14 bool prompt "1.0.14" @@ -91,6 +96,7 @@ config LIBC_VERSION string # Don't remove next line # CT_INSERT_VERSION_STRING_BELOW + default "1.0.17" if LIBC_UCLIBC_NG_V_1_0_17 default "1.0.14" if LIBC_UCLIBC_NG_V_1_0_14 default "0.9.33.2" if LIBC_UCLIBC_V_0_9_33_2 diff --git a/scripts/addToolVersion.sh b/scripts/addToolVersion.sh index 806ecca8..72baac01 100755 --- a/scripts/addToolVersion.sh +++ b/scripts/addToolVersion.sh @@ -16,7 +16,7 @@ doHelp() { cat <<-EOF Usage: ${myname} <--tool> <[options] version [...]> ... 'tool' in one of: - gcc, binutils, glibc, uClibc, newlib, linux, gdb, dmalloc, + gcc, binutils, glibc, uClibc, uClibc-ng, newlib, linux, gdb, dmalloc, duma, strace, ltrace, libelf, gmp, mpfr, isl, cloog, mpc, mingw-w64, expat, ncurses @@ -179,6 +179,7 @@ while [ $# -gt 0 ]; do --binutils) EXP=; OBS=; cat=BINUTILS; tool=binutils; tool_prefix=binutils; dot2suffix=;; --glibc) EXP=; OBS=; cat=LIBC_GLIBC; tool=glibc; tool_prefix=libc; dot2suffix=;; --uClibc) EXP=; OBS=; cat=LIBC_UCLIBC; tool=uClibc; tool_prefix=libc; dot2suffix=;; + --uClibc-ng)EXP=; OBS=; cat=LIBC_UCLIBC_NG; tool=uClibc; tool_prefix=libc; dot2suffix=;; --newlib) EXP=; OBS=; cat=LIBC_NEWLIB; tool=newlib; tool_prefix=libc; dot2suffix=;; --mingw-w64)EXP=; OBS=; cat=WINAPI; tool=mingw; tool_prefix=libc; dot2suffix=;; --linux) EXP=; OBS=; cat=KERNEL; tool=linux; tool_prefix=kernel; dot2suffix=;; From 2cb1b851c231723f7007ca5adbbbbcc997ff85cc Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Mon, 12 Sep 2016 14:10:23 -0700 Subject: [PATCH 3/7] Make sparc-leon-linux-uclibc "version neutral". Signed-off-by: Alexey Neyman --- samples/sparc-leon-linux-uclibc/crosstool.config | 2 +- .../{uClibc-1.0.12.config => uClibc.config} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename samples/sparc-leon-linux-uclibc/{uClibc-1.0.12.config => uClibc.config} (100%) diff --git a/samples/sparc-leon-linux-uclibc/crosstool.config b/samples/sparc-leon-linux-uclibc/crosstool.config index 4afde665..97488a55 100644 --- a/samples/sparc-leon-linux-uclibc/crosstool.config +++ b/samples/sparc-leon-linux-uclibc/crosstool.config @@ -9,7 +9,7 @@ CT_TARGET_VENDOR="leon" CT_KERNEL_linux=y CT_KERNEL_V_3_10=y CT_LIBC_uClibc=y -CT_LIBC_UCLIBC_CONFIG_FILE="${CT_LIB_DIR}/samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config" +CT_LIBC_UCLIBC_CONFIG_FILE="${CT_LIB_DIR}/samples/${CT_TARGET}/uClibc.config" CT_LIBC_UCLIBC_IPV6=y CT_LIBC_UCLIBC_WCHAR=y CT_CC_GCC_V_4_9_3=y diff --git a/samples/sparc-leon-linux-uclibc/uClibc-1.0.12.config b/samples/sparc-leon-linux-uclibc/uClibc.config similarity index 100% rename from samples/sparc-leon-linux-uclibc/uClibc-1.0.12.config rename to samples/sparc-leon-linux-uclibc/uClibc.config From 03730997ae01710a55988d6129d937c21eb24608 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Sun, 18 Sep 2016 11:38:44 -0700 Subject: [PATCH 4/7] GC uClibc 1.0.14. Signed-off-by: Alexey Neyman --- config/libc/uClibc.in | 6 ------ 1 file changed, 6 deletions(-) diff --git a/config/libc/uClibc.in b/config/libc/uClibc.in index 5ce2674c..3a76a426 100644 --- a/config/libc/uClibc.in +++ b/config/libc/uClibc.in @@ -80,11 +80,6 @@ config LIBC_UCLIBC_NG_V_1_0_17 prompt "1.0.17" select LIBC_UCLIBC_NG_1_0_14_or_later -config LIBC_UCLIBC_NG_V_1_0_14 - bool - prompt "1.0.14" - select LIBC_UCLIBC_NG_1_0_14_or_later - config LIBC_UCLIBC_V_0_9_33_2 bool prompt "0.9.33.2" @@ -97,7 +92,6 @@ config LIBC_VERSION # Don't remove next line # CT_INSERT_VERSION_STRING_BELOW default "1.0.17" if LIBC_UCLIBC_NG_V_1_0_17 - default "1.0.14" if LIBC_UCLIBC_NG_V_1_0_14 default "0.9.33.2" if LIBC_UCLIBC_V_0_9_33_2 endif # ! LIBC_UCLIBC_CUSTOM From 8121be5b217d1b354db856f8c4ca1b94ce7cffd4 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Mon, 19 Sep 2016 18:50:08 -0700 Subject: [PATCH 5/7] Fix m68k with uClibc-ng >= 1.0.15. 1.0.15 only kept a single LINUXTHREADS option, and renamed it, making it no longer option-compatible with uClibc. The option for "1.0.14 or later" version of uClibc-ng is not currently used; rename it to "1.0.15 or later" and use it to handle newer uClibc-ng's linuxthreads. m68k happens to be the only sample using linuxthreads. Signed-off-by: Alexey Neyman --- config/libc/uClibc.in | 4 ++-- config/libc/uClibc.in.2 | 4 +++- scripts/build/libc/uClibc.sh | 5 +++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/config/libc/uClibc.in b/config/libc/uClibc.in index 3a76a426..14564bab 100644 --- a/config/libc/uClibc.in +++ b/config/libc/uClibc.in @@ -78,7 +78,7 @@ choice config LIBC_UCLIBC_NG_V_1_0_17 bool prompt "1.0.17" - select LIBC_UCLIBC_NG_1_0_14_or_later + select LIBC_UCLIBC_NG_1_0_15_or_later config LIBC_UCLIBC_V_0_9_33_2 bool @@ -96,7 +96,7 @@ config LIBC_VERSION endif # ! LIBC_UCLIBC_CUSTOM -config LIBC_UCLIBC_NG_1_0_14_or_later +config LIBC_UCLIBC_NG_1_0_15_or_later bool select LIBC_UCLIBC_NG_1_0_0_or_later diff --git a/config/libc/uClibc.in.2 b/config/libc/uClibc.in.2 index 3a5fe345..dc024201 100644 --- a/config/libc/uClibc.in.2 +++ b/config/libc/uClibc.in.2 @@ -1,6 +1,6 @@ # uClibc second-part option -if THREADS_LT +if THREADS_LT && !LIBC_UCLIBC_NG_1_0_15_or_later choice bool @@ -30,10 +30,12 @@ endchoice endif # THREADS_LT +# uClibc-ng 1.0.15 did away with 2 implementations of linuxthreads config LIBC_UCLIBC_LNXTHRD string default "" if THREADS_NONE default "" if THREADS_NATIVE + default "" if LIBC_UCLIBC_NG_1_0_15_or_later default "old" if LIBC_UCLIBC_LNXTHRD_OLD default "new" if LIBC_UCLIBC_LNXTHRD_NEW diff --git a/scripts/build/libc/uClibc.sh b/scripts/build/libc/uClibc.sh index 47e135b9..be8d6bf2 100644 --- a/scripts/build/libc/uClibc.sh +++ b/scripts/build/libc/uClibc.sh @@ -377,6 +377,11 @@ manage_uClibc_config() { case "${CT_THREADS}:${CT_LIBC_UCLIBC_LNXTHRD}" in none:) ;; + linuxthreads:) + # Newer version of uClibc-ng, no old/new dichotomy + CT_KconfigEnableOption "UCLIBC_HAS_THREADS" "${dst}" + CT_KconfigEnableOption "UCLIBC_HAS_LINUXTHREADS" "${dst}" + ;; linuxthreads:old) CT_KconfigEnableOption "UCLIBC_HAS_THREADS" "${dst}" CT_KconfigEnableOption "LINUXTHREADS_OLD" "${dst}" From 1cb9253dd76ddc93082952c580b2512ff600d9fd Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Tue, 4 Oct 2016 17:48:28 -0700 Subject: [PATCH 6/7] uClibc-ng pushes new releases faster than we merge them in! Signed-off-by: Alexey Neyman --- config/libc/uClibc.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/libc/uClibc.in b/config/libc/uClibc.in index 14564bab..f7054d66 100644 --- a/config/libc/uClibc.in +++ b/config/libc/uClibc.in @@ -75,9 +75,9 @@ choice # Don't remove next line # CT_INSERT_VERSION_BELOW -config LIBC_UCLIBC_NG_V_1_0_17 +config LIBC_UCLIBC_NG_V_1_0_18 bool - prompt "1.0.17" + prompt "1.0.18" select LIBC_UCLIBC_NG_1_0_15_or_later config LIBC_UCLIBC_V_0_9_33_2 @@ -91,7 +91,7 @@ config LIBC_VERSION string # Don't remove next line # CT_INSERT_VERSION_STRING_BELOW - default "1.0.17" if LIBC_UCLIBC_NG_V_1_0_17 + default "1.0.18" if LIBC_UCLIBC_NG_V_1_0_18 default "0.9.33.2" if LIBC_UCLIBC_V_0_9_33_2 endif # ! LIBC_UCLIBC_CUSTOM From 1d43ed3151e184452ce97ba1a326b2027f0dc208 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Wed, 5 Oct 2016 15:23:40 -0700 Subject: [PATCH 7/7] Restore 1.0.17 and make 1.0.18 experimental. 1.0.18 changed the dependencies for the static libraries, notably in libc/Makefile.in. This resulted in packing a lot of unrelated stuff into libc.a, including (sic!) a nested .a library and stuff from other libraries such as libdl. This results in a failure to statically link with thus created libc.a: .../libc.a(libdl.os):(.literal+0x74): undefined reference to `_dl_tlsdesc_return' This was breaking xtensa-*-uclibc sample. Signed-off-by: Alexey Neyman --- config/libc/uClibc.in | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config/libc/uClibc.in b/config/libc/uClibc.in index f7054d66..da74968a 100644 --- a/config/libc/uClibc.in +++ b/config/libc/uClibc.in @@ -60,6 +60,8 @@ config LIBC_UCLIBC_CUSTOM_VERSION prompt "Custom uClibc Version" help Enter the version number for your custom uClibc. + Version 1.0.18 is only enabled in EXPERIMENTAL builds due to issues + with static libraries. config LIBC_VERSION string @@ -75,9 +77,16 @@ choice # Don't remove next line # CT_INSERT_VERSION_BELOW +# List 1.0.17 first to make it default. 1.0.18 has issues with static libs. +config LIBC_UCLIBC_NG_V_1_0_17 + bool + prompt "1.0.17" + select LIBC_UCLIBC_NG_1_0_15_or_later + config LIBC_UCLIBC_NG_V_1_0_18 bool prompt "1.0.18" + depends on EXPERIMENTAL select LIBC_UCLIBC_NG_1_0_15_or_later config LIBC_UCLIBC_V_0_9_33_2 @@ -92,6 +101,7 @@ config LIBC_VERSION # Don't remove next line # CT_INSERT_VERSION_STRING_BELOW default "1.0.18" if LIBC_UCLIBC_NG_V_1_0_18 + default "1.0.17" if LIBC_UCLIBC_NG_V_1_0_17 default "0.9.33.2" if LIBC_UCLIBC_V_0_9_33_2 endif # ! LIBC_UCLIBC_CUSTOM