add basic support for uClibc-ng
PATCH 1/1 add basic support for uClibc-ng
The uClibc-ng project released 1.0.0 lately. Support in buildroot would be nice to get more testers. New problems could be fixed in a faster way and new releases can be done regulary.
--- package/gcc/Config.in.host | 2 +- package/gcc/gcc.mk | 4 +- package/uclibc/Config.in | 32 +++- package/uclibc/uClibc-ng-1.0.0.config | 280 +++++++++++++++++++++++++++++++ package/uclibc/uclibc.mk | 24 ++- toolchain/toolchain-buildroot/Config.in | 17 ++ toolchain/toolchain-common.in | 1 + 7 files changed, 353 insertions(+), 7 deletions(-) create mode 100644 package/uclibc/uClibc-ng-1.0.0.config
package/gcc/Config.in.host +1 -1
@@ -121,7 +121,7 @@ comment "C++ support broken in uClibc with locale enabled with gcc 4.2" depends on BR2_GCC_VERSION_4_2_2_AVR32_2_1_5 && BR2_TOOLCHAIN_BUILDROOT_LOCALE config BR2_GCC_ENABLE_TLS - bool "Enable compiler tls support" if BR2_TOOLCHAIN_BUILDROOT_UCLIBC + bool "Enable compiler tls support" if BR2_TOOLCHAIN_BUILDROOT_UCLIBC || BR2_TOOLCHAIN_BUILDROOT_UCLIBC_NG default y depends on BR2_PTHREADS_NATIVE || BR2_TOOLCHAIN_BUILDROOT_EGLIBC || BR2_TOOLCHAIN_BUILDROOT_GLIBC help
package/gcc/gcc.mk +2 -2
@@ -120,9 +120,9 @@ ifneq ($(BR2_TOOLCHAIN_BUILDROOT_WCHAR),y) HOST_GCC_COMMON_CONF_OPTS += --disable-libquadmath endif -# libsanitizer requires wordexp, not in default uClibc config. Also +# libsanitizer requires wordexp, not in default uClibc/uCLibc-ng config. Also # doesn't build properly with musl. -ifeq ($(BR2_TOOLCHAIN_BUILDROOT_UCLIBC)$(BR2_TOOLCHAIN_BUILDROOT_MUSL),y) +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_UCLIBC)$(BR2_TOOLCHAIN_BUILDROOT_UCLIBC_NG)$(BR2_TOOLCHAIN_BUILDROOT_MUSL),y) HOST_GCC_COMMON_CONF_OPTS += --disable-libsanitizer endif
package/uclibc/Config.in +31 -1
@@ -1,3 +1,32 @@ +if BR2_TOOLCHAIN_BUILDROOT_UCLIBC_NG + +config BR2_PACKAGE_UCLIBC_NG + bool + default y + +comment "uClibc-ng Options" + +choice + prompt "uClibc-ng C library Version" + default BR2_UCLIBC_NG_VERSION_1_0_0 + help + Select the version of uClibc-ng you wish to use. + + config BR2_UCLIBC_NG_VERSION_1_0_0 + bool "uClibc-ng 1.0.0" + +endchoice + +config BR2_UCLIBC_NG_VERSION_STRING + string + default 1.0.0 if BR2_UCLIBC_NG_VERSION_1_0_0 + +config BR2_UCLIBC_NG_CONFIG + string "uClibc-ng configuration file to use?" + default "package/uclibc/uClibc-ng-1.0.0.config" if BR2_UCLIBC_NG_VERSION_1_0_0 + +endif + if BR2_TOOLCHAIN_BUILDROOT_UCLIBC # For legal-info
@@ -59,6 +88,8 @@ config BR2_UCLIBC_CONFIG See also docs/README in this package. If unsure, use the default. +endif + config BR2_TOOLCHAIN_BUILDROOT_LARGEFILE bool "Enable large file (files > 2 GB) support" select BR2_LARGEFILE
@@ -251,4 +282,3 @@ config BR2_UCLIBC_X86_TYPE default PENTIUM4 if BR2_x86_pentium4 || BR2_x86_pentium_m || \ BR2_x86_nocona || BR2_x86_core2 || BR2_x86_corei7 -endif # BR2_TOOLCHAIN_BUILDROOT_UCLIBC
package/uclibc/uClibc-ng-1.0.0.config new file +280 -0
280 lines not on this page · raw message
package/uclibc/uclibc.mk +21 -3
@@ -6,9 +6,6 @@ UCLIBC_VERSION = $(call qstrip,$(BR2_UCLIBC_VERSION_STRING)) UCLIBC_SOURCE ?= uClibc-$(UCLIBC_VERSION).tar.bz2 -UCLIBC_LICENSE = LGPLv2.1+ -UCLIBC_LICENSE_FILES = COPYING.LIB - ifeq ($(BR2_UCLIBC_VERSION_SNAPSHOT),y) UCLIBC_SITE = http://www.uclibc.org/downloads/snapshots else ifeq ($(BR2_arc),y)
@@ -22,6 +19,15 @@ UCLIBC_SITE = http://www.uclibc.org/downloads UCLIBC_SOURCE = uClibc-$(UCLIBC_VERSION).tar.xz endif +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_UCLIBC_NG),y) +UCLIBC_VERSION = $(call qstrip,$(BR2_UCLIBC_NG_VERSION_STRING)) +UCLIBC_SITE = http://downloads.uclibc-ng.org/releases/$(UCLIBC_VERSION)/ +UCLIBC_SOURCE = uClibc-ng-$(UCLIBC_VERSION).tar.xz +endif + +UCLIBC_LICENSE = LGPLv2.1+ +UCLIBC_LICENSE_FILES = COPYING.LIB + UCLIBC_INSTALL_STAGING = YES # uclibc is part of the toolchain so disable the toolchain dependency
@@ -33,9 +39,15 @@ UCLIBC_DEPENDENCIES = host-gcc-initial linux-headers # specifying UCLIBC_CONFIG_FILE on the command-line overrides the .config # setting. +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_UCLIBC_NG),y) +ifndef UCLIBC_NG_CONFIG_FILE +UCLIBC_CONFIG_FILE = $(call qstrip,$(BR2_UCLIBC_NG_CONFIG)) +endif +else ifndef UCLIBC_CONFIG_FILE UCLIBC_CONFIG_FILE = $(call qstrip,$(BR2_UCLIBC_CONFIG)) endif +endif UCLIBC_KCONFIG_FILE = $(UCLIBC_CONFIG_FILE)
@@ -508,6 +520,12 @@ define UCLIBC_INSTALL_TARGET_CMDS $(UCLIBC_INSTALL_UTILS_TARGET) $(UCLIBC_BUILD_TEST_SUITE) $(UCLIBC_INSTALL_TEST_SUITE) + if [ -e $(TARGET_DIR)/lib/ld64-uClibc.so.1 ];then \ + (cd $(TARGET_DIR)/lib;ln -sf ld64-uClibc.so.1 ld64-uClibc.so.0) \ + fi + if [ -e $(TARGET_DIR)/lib/ld-uClibc.so.1 ];then \ + (cd $(TARGET_DIR)/lib;ln -sf ld-uClibc.so.1 ld-uClibc.so.0) \ + fi endef # STATIC has no ld* tools, only getconf
toolchain/toolchain-buildroot/Config.in +17 -0
@@ -39,6 +39,20 @@ config BR2_TOOLCHAIN_BUILDROOT_UCLIBC http://uclibc.org +config BR2_TOOLCHAIN_BUILDROOT_UCLIBC_NG + bool "uClibc-ng" + select BR2_TOOLCHAIN_USES_UCLIBC + depends on BR2_arcle || BR2_arceb || BR2_arm || BR2_armeb || \ + BR2_avr32 || BR2_bfin || BR2_i386 || BR2_m68k || \ + BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || \ + BR2_powerpc || BR2_sh || BR2_sparc || BR2_xtensa || \ + BR2_x86_64 + help + This option selects uClibc-ng as the C library for the + cross-compilation toolchain. + + http://uclibc-ng.org + config BR2_TOOLCHAIN_BUILDROOT_EGLIBC bool "eglibc" depends on BR2_arm || BR2_armeb || BR2_aarch64 || \
@@ -94,7 +108,10 @@ endchoice config BR2_TOOLCHAIN_BUILDROOT_LIBC string + # Both uClibc and uClibc-ng are handled by the package called + # 'uclibc' default "uclibc" if BR2_TOOLCHAIN_BUILDROOT_UCLIBC + default "uclibc" if BR2_TOOLCHAIN_BUILDROOT_UCLIBC_NG # Both glibc and eglibc are handled by the package called # 'glibc' default "glibc" if BR2_TOOLCHAIN_BUILDROOT_EGLIBC
toolchain/toolchain-common.in +1 -0
@@ -70,6 +70,7 @@ config BR2_GENERATE_LOCALE default "" depends on \ (BR2_TOOLCHAIN_BUILDROOT_UCLIBC && BR2_ENABLE_LOCALE) || \ + (BR2_TOOLCHAIN_BUILDROOT_UCLIBC_NG && BR2_ENABLE_LOCALE) || \ BR2_TOOLCHAIN_USES_GLIBC help Generate support for a list of locales. Locales can be
Signature · 1 line
1.7.10.4
PATCH 1/1 add basic support for uClibc-ng
Dear Waldemar Brodkorb,
Quoted 4 lines · Waldemar Brodkorb
(quoted diff) +4
-0+config BR2_TOOLCHAIN_BUILDROOT_UCLIBC_NG + bool "uClibc-ng" + select BR2_TOOLCHAIN_USES_UCLIBC + depends on BR2_arcle || BR2_arceb || BR2_arm || BR2_armeb || \
Review
Quoted 10 lines
(quoted diff) +10
-0+ BR2_avr32 || BR2_bfin || BR2_i386 || BR2_m68k || \ + BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || \ + BR2_powerpc || BR2_sh || BR2_sparc || BR2_xtensa || \ + BR2_x86_64 + help + This option selects uClibc-ng as the C library for the + cross-compilation toolchain. + + http://uclibc-ng.org +
I don't think introducing this symbol is needed. Instead, we can just make uClibc-ng another version of uClibc. Like the following (untested) :
package/uclibc/Config.in +6 -0
@@ -21,6 +21,10 @@ choice bool "uClibc 0.9.33.x" depends on !(BR2_arc || BR2_avr32 || BR2_xtensa) + config BR2_UCLIBC_NG_VERSION_1_0_0 + bool "uClibc-ng 1.0.0" + depends on !(BR2_arc || BR2_avr32 || BR2_xtensa) + config BR2_UCLIBC_VERSION_XTENSA_GIT bool "uClibc Git Xtensa" depends on BR2_xtensa
@@ -42,6 +46,7 @@ config BR2_UCLIBC_VERSION_STRING string default 0.9.31.1 if BR2_UCLIBC_VERSION_0_9_31 default 0.9.33.2 if BR2_UCLIBC_VERSION_0_9_33 + default 1.0.0 if BR2_UCLIBC_NG_VERSION_1_0_0 default "arc-2014.12" if BR2_arc default "7bf35c8b7d4a1f97174eb49f47f33946b282114c" if BR2_UCLIBC_VERSION_XTENSA_GIT default BR2_USE_UCLIBC_SNAPSHOT if BR2_UCLIBC_VERSION_SNAPSHOT
@@ -50,6 +55,7 @@ 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.33.config" if BR2_UCLIBC_VERSION_0_9_33 + default "package/uclibc/uClibc-ng-1.0.0.config" if BR2_UCLIBC_NG_VERSION_1_0_0 default "package/uclibc/uClibc-snapshot.config" if BR2_arc default "package/uclibc/uClibc-snapshot.config" if BR2_UCLIBC_VERSION_SNAPSHOT default "package/uclibc/uClibc-snapshot.config" if BR2_UCLIBC_VERSION_XTENSA_GIT
package/uclibc/uclibc.mk +3 -0
@@ -17,6 +17,9 @@ UCLIBC_SOURCE = uClibc-$(UCLIBC_VERSION).tar.gz else ifeq ($(BR2_UCLIBC_VERSION_XTENSA_GIT),y) UCLIBC_SITE = git://git.busybox.net/uClibc UCLIBC_SOURCE = uClibc-$(UCLIBC_VERSION).tar.gz +else ifeq ($(BR2_UCLIBC_NG_VERSION_1_0_0),y) +UCLIBC_SITE = http://downloads.uclibc-ng.org/releases/1.0.0/ +UCLIBC_SOURCE = uClibc-ng-$(UCLIBC_VERSION).tar.xz else UCLIBC_SITE = http://www.uclibc.org/downloads UCLIBC_SOURCE = uClibc-$(UCLIBC_VERSION).tar.xz
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 add basic support for uClibc-ng
Hi Thomas,
Thomas Petazzoni wrote,
Quoted 13 lines
Dear Waldemar Brodkorb,
Quoted 9 lines · Waldemar Brodkorb
(quoted diff) +9
-0+config BR2_TOOLCHAIN_BUILDROOT_UCLIBC_NG + bool "uClibc-ng" + select BR2_TOOLCHAIN_USES_UCLIBC + depends on BR2_arcle || BR2_arceb || BR2_arm || BR2_armeb || \ + BR2_avr32 || BR2_bfin || BR2_i386 || BR2_m68k || \ + BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || \ + BR2_powerpc || BR2_sh || BR2_sparc || BR2_xtensa || \ + BR2_x86_64 + help
Quoted 8 lines
Review
Quoted 5 lines
(quoted diff) +5
-0+ This option selects uClibc-ng as the C library for the + cross-compilation toolchain. + + http://uclibc-ng.org +I don't think introducing this symbol is needed. Instead, we can just make uClibc-ng another version of uClibc. Like the following (untested) :
I thought about this in my first try, but I have following problem:
When you choose uClibc-ng 1.0.0 instead of uClibc, the default config string is _not_ automatically changed.
How could this be done?
best regards
Waldemar
PATCH 1/1 add basic support for uClibc-ng
Dear Waldemar Brodkorb,
Quoted 6 lines · Waldemar Brodkorb
Quoted 2 lines
I don't think introducing this symbol is needed. Instead, we can just make uClibc-ng another version of uClibc. Like the following (untested) :
I thought about this in my first try, but I have following problem:
When you choose uClibc-ng 1.0.0 instead of uClibc, the default config string is _not_ automatically changed.
I'm not sure to understand: which "config string" are you talking about?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 add basic support for uClibc-ng
Hi,
Thomas Petazzoni wrote,
Quoted 4 lines
Dear Waldemar Brodkorb,
On Tue, 10 Feb 2015 18:25:55 +0100, Waldemar Brodkorb wrote:
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
I don't think introducing this symbol is needed. Instead, we can just make uClibc-ng another version of uClibc. Like the following (untested) :
I thought about this in my first try, but I have following problem:
When you choose uClibc-ng 1.0.0 instead of uClibc, the default config string is _not_ automatically changed.I'm not sure to understand: which "config string" are you talking about?
Sorry, I meant the default string pointing to the uClibc configuration file. It is not switched, when choosing uClibc-ng.
Clearer now?
best regards
Waldemar
PATCH 1/1 add basic support for uClibc-ng
Dear Waldemar Brodkorb,
Quoted 2 lines · Waldemar Brodkorb
Sorry, I meant the default string pointing to the uClibc configuration file. It is not switched, when choosing uClibc-ng.
It is like this for all non-promptless string options: even if you switch between uClibc 0.9.31 and 0.9.33, the string option value will not be changed, unless it's the first time you run "make menuconfig".
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 add basic support for uClibc-ng
In reply to Thomas PetazzoniHi Thomas,
Quoted 38 lines · Thomas Petazzoni
Dear Waldemar Brodkorb,
Quoted 4 lines · Waldemar Brodkorb
(quoted diff) +4
-0+config BR2_TOOLCHAIN_BUILDROOT_UCLIBC_NG + bool "uClibc-ng" + select BR2_TOOLCHAIN_USES_UCLIBC + depends on BR2_arcle || BR2_arceb || BR2_arm || BR2_armeb || \Review
Quoted 10 lines
(quoted diff) +10
-0+ BR2_avr32 || BR2_bfin || BR2_i386 || BR2_m68k || \ + BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || \ + BR2_powerpc || BR2_sh || BR2_sparc || BR2_xtensa || \ + BR2_x86_64 + help + This option selects uClibc-ng as the C library for the + cross-compilation toolchain. + + http://uclibc-ng.org +I don't think introducing this symbol is needed. Instead, we can just make uClibc-ng another version of uClibc. Like the following (untested) :
package/uclibc/Config.in +4
-0@@ -21,6 +21,10 @@ choice bool "uClibc 0.9.33.x" depends on !(BR2_arc || BR2_avr32 || BR2_xtensa) + config BR2_UCLIBC_NG_VERSION_1_0_0 + bool "uClibc-ng 1.0.0" + depends on !(BR2_arc || BR2_avr32 || BR2_xtensa) + config BR2_UCLIBC_VERSION_XTENSA_GIT bool "uClibc Git Xtensa" depends on BR2_xtensa
package/uclibc/Config.in config BR2_UCLIBC_VERSION_STRING · line 49
Quoted 4 lines
package/uclibc/Config.in +1
-0@@ -42,6 +46,7 @@ config BR2_UCLIBC_VERSION_STRING string default 0.9.31.1 if BR2_UCLIBC_VERSION_0_9_31 default 0.9.33.2 if BR2_UCLIBC_VERSION_0_9_33 + default 1.0.0 if BR2_UCLIBC_NG_VERSION_1_0_0
This creates a conflict when the uClibc project decides that they too should release a 1.0.0.
It could be avoided by appending/prepending an 'ng' suffix/prefix, but it would need to be stripped out in uclibc.mk.
Quoted 16 lines
package/uclibc/Config.in +1
-0default "arc-2014.12" if BR2_arc default "7bf35c8b7d4a1f97174eb49f47f33946b282114c" if BR2_UCLIBC_VERSION_XTENSA_GIT default BR2_USE_UCLIBC_SNAPSHOT if BR2_UCLIBC_VERSION_SNAPSHOT@@ -50,6 +55,7 @@ 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.33.config" if BR2_UCLIBC_VERSION_0_9_33 + default "package/uclibc/uClibc-ng-1.0.0.config" if BR2_UCLIBC_NG_VERSION_1_0_0 default "package/uclibc/uClibc-snapshot.config" if BR2_arc default "package/uclibc/uClibc-snapshot.config" if BR2_UCLIBC_VERSION_SNAPSHOT default "package/uclibc/uClibc-snapshot.config" if BR2_UCLIBC_VERSION_XTENSA_GITpackage/uclibc/uclibc.mk +0
-0
package/uclibc/uclibc.mk UCLIBC_SOURCE = uClibc-$(UCLIBC_VERSION).tar.gz · line 22
Quoted 6 lines
package/uclibc/uclibc.mk +3
-0@@ -17,6 +17,9 @@ UCLIBC_SOURCE = uClibc-$(UCLIBC_VERSION).tar.gz else ifeq ($(BR2_UCLIBC_VERSION_XTENSA_GIT),y) UCLIBC_SITE = git://git.busybox.net/uClibc UCLIBC_SOURCE = uClibc-$(UCLIBC_VERSION).tar.gz +else ifeq ($(BR2_UCLIBC_NG_VERSION_1_0_0),y) +UCLIBC_SITE = http://downloads.uclibc-ng.org/releases/1.0.0/ +UCLIBC_SOURCE = uClibc-ng-$(UCLIBC_VERSION).tar.xz
Also this is not very future-proof I think, suppose Waldemar releases 1.0.1, 1.0.2 and 1.1.0 shortly, then we would have three extra ifeq blocks here?
It could be nicer to introduce a 'uclibc variant' option, which is a middle-ground between Waldemar's original patching creating a separate c library, and your proposal of treating just the version different. A separate UCLIBC_VERSION would be created without separate prefix/postfix. So a uclibc version of 1.0.0 would not clash with uclibc-ng version 1.0.0. In uclibc.mk the SITE/SOURCE would be filled based on the variant, and the version can then be used without transformation.
What do you think of that?
Best regards,
Thomas