toolchain/toolchain-buildroot: enable uclibc for riscv64
PATCH 1/2 toolchain/toolchain-buildroot: enable uclibc for riscv64
We can enable uclibc for RISC-V 64 bit now that it has been bumped from v1.0.32 to v1.0.34.
Uclibc has had basic support for RISC-V 64 bit since v1.0.31, but shared library and TLS/NPTL support has only been available since v1.0.33.
This update has been tested using qemu_riscv64_virt_defconfig and the Buildroot host QEMU.
--- package/uclibc/Config.in | 1 + toolchain/toolchain-buildroot/Config.in | 14 ++++++++------ 2 files changed, 9 insertions(+), 6 deletions(-)
package/uclibc/Config.in +1 -0
@@ -101,6 +101,7 @@ config BR2_UCLIBC_TARGET_ARCH default "mips" if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el default "or1k" if BR2_or1k default "powerpc" if BR2_powerpc + default "riscv64" if BR2_riscv && BR2_ARCH_IS_64 default "sh" if BR2_sh default "sparc" if BR2_sparc default "xtensa" if BR2_xtensa
toolchain/toolchain-buildroot/Config.in +8 -6
@@ -27,12 +27,14 @@ choice config BR2_TOOLCHAIN_BUILDROOT_UCLIBC bool "uClibc-ng" - depends on BR2_aarch64 || BR2_aarch64_be || BR2_arcle || BR2_arceb || \ - BR2_arm || BR2_armeb || \ - BR2_i386 || BR2_m68k || BR2_microblaze || \ - BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || \ - BR2_or1k || BR2_powerpc || BR2_sh2a || BR2_sh4 || \ - BR2_sh4eb || BR2_sparc || BR2_xtensa || BR2_x86_64 + depends on BR2_aarch64 || BR2_aarch64_be || BR2_arcle || BR2_arceb || \ + BR2_arm || BR2_armeb || \ + BR2_i386 || BR2_m68k || BR2_microblaze || \ + BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || \ + BR2_or1k || BR2_powerpc || BR2_riscv || \ + BR2_sh2a || BR2_sh4 || BR2_sh4eb || BR2_sparc || \ + BR2_xtensa || BR2_x86_64 + depends on BR2_ARCH_IS_64 || !BR2_riscv select BR2_TOOLCHAIN_USES_UCLIBC help This option selects uClibc-ng as the C library for the
Signature · 1 line
2.20.1
PATCH 2/2 support/config-fragments: add RISC-V 64-bit uclibc autobuild config
Now that RISC-V 64 bit can use uclibc, glibc and musl we can add uclibc to the autobuild internal toolchain configurations by removing the musl specific config file and adding a generic one.
---
...v64-internal-musl.config => br-riscv64-full-internal.config} | 1 -
support/config-fragments/autobuild/toolchain-configs.csv | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
rename support/config-fragments/autobuild/{br-riscv64-internal-musl.config => br-riscv64-full-internal.config} (57%)support/config-fragments/autobuild/br-riscv64-full-internal.config renamed from support/config-fragments/autobuild/br-riscv64-internal-musl.config +0 -1
@@ -1,3 +1,2 @@ BR2_riscv=y -BR2_TOOLCHAIN_BUILDROOT_MUSL=y BR2_TOOLCHAIN_BUILDROOT_CXX=y
support/config-fragments/autobuild/toolchain-configs.csv +1 -1
@@ -53,7 +53,7 @@ support/config-fragments/autobuild/br-powerpc-e500mc-full.config,x86_64 support/config-fragments/autobuild/br-powerpc-internal-full.config,any support/config-fragments/autobuild/br-riscv32.config,x86_64 support/config-fragments/autobuild/br-riscv64.config,x86_64 -support/config-fragments/autobuild/br-riscv64-internal-musl.config,any +support/config-fragments/autobuild/br-riscv64-full-internal.config,any support/config-fragments/autobuild/br-sh4-full.config,x86_64 support/config-fragments/autobuild/br-sparc-uclibc.config,x86_64 support/config-fragments/autobuild/br-sparc64-glibc.config,x86_64
Signature · 1 line
2.20.1
PATCH 2/2 support/config-fragments: add RISC-V 64-bit uclibc autobuild config
Quoted 6 lines · Mark Corbin
Now that RISC-V 64 bit can use uclibc, glibc and musl we can add uclibc to the autobuild internal toolchain configurations by removing the musl specific config file and adding a generic one.
Signed-off-by Mark Corbin <[email protected]>
Alistair
Quoted 37 lines
--- ...v64-internal-musl.config => br-riscv64-full-internal.config} | 1 - support/config-fragments/autobuild/toolchain-configs.csv | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) rename support/config-fragments/autobuild/{br-riscv64-internal-musl.config => br-riscv64-full-internal.config} (57%)support/config-fragments/autobuild/br-riscv64-full-internal.config renamed from support/config-fragments/autobuild/br-riscv64-internal-musl.config +0
-1@@ -1,3 +1,2 @@ BR2_riscv=y -BR2_TOOLCHAIN_BUILDROOT_MUSL=y BR2_TOOLCHAIN_BUILDROOT_CXX=ysupport/config-fragments/autobuild/toolchain-configs.csv +1
-2@@ -53,7 +53,7 @@ support/config-fragments/autobuild/br-powerpc-e500mc-full.config,x86_64 support/config-fragments/autobuild/br-powerpc-internal-full.config,any support/config-fragments/autobuild/br-riscv32.config,x86_64 support/config-fragments/autobuild/br-riscv64.config,x86_64 -support/config-fragments/autobuild/br-riscv64-internal-musl.config,any +support/config-fragments/autobuild/br-riscv64-full-internal.config,any support/config-fragments/autobuild/br-sh4-full.config,x86_64 support/config-fragments/autobuild/br-sparc-uclibc.config,x86_64 support/config-fragments/autobuild/br-sparc64-glibc.config,x86_64 --2.20.1
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 2/2 support/config-fragments: add RISC-V 64-bit uclibc autobuild config
In reply to Mark CorbinQuoted 19 lines · On Fri, 8 May 2020 11:33:38 +0100 Mark Corbin <[email protected]> wrote:
Now that RISC-V 64 bit can use uclibc, glibc and musl we can add uclibc to the autobuild internal toolchain configurations by removing the musl specific config file and adding a generic one.
Signed-off-by Mark Corbin <[email protected]>--- ...v64-internal-musl.config => br-riscv64-full-internal.config} | 1 - support/config-fragments/autobuild/toolchain-configs.csv | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) rename support/config-fragments/autobuild/{br-riscv64-internal-musl.config => br-riscv64-full-internal.config} (57%)support/config-fragments/autobuild/br-riscv64-full-internal.config renamed from support/config-fragments/autobuild/br-riscv64-internal-musl.config +0
-0
support/config-fragments/autobuild/br-riscv64-full-internal.config line 2
Quoted 3 lines
support/config-fragments/autobuild/br-riscv64-full-internal.config renamed from support/config-fragments/autobuild/br-riscv64-internal-musl.config +0
-1@@ -1,3 +1,2 @@ BR2_riscv=y -BR2_TOOLCHAIN_BUILDROOT_MUSL=y BR2_TOOLCHAIN_BUILDROOT_CXX=y
This one is not "generic": it will only build a uClibc toolchain. It seems like you believe that since this defconfig fragment doesn't mention the C library, it will test glibc, musl and uclibc, but that's not the case. We do not randomize the choice of the C library, and since uclibc is our default, this new defconfig file will only test uclibc.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 2/2 support/config-fragments: add RISC-V 64-bit uclibc autobuild config
Quoted 32 lines · On Saturday, 9 May 2020 11:07:58 BST Thomas Petazzoni wrote:
On Fri, 8 May 2020 11:33:38 +0100
Quoted 29 lines · Mark Corbin
Now that RISC-V 64 bit can use uclibc, glibc and musl we can add uclibc to the autobuild internal toolchain configurations by removing the musl specific config file and adding a generic one.
Signed-off-by Mark Corbin <[email protected]>---
...v64-internal-musl.config => br-riscv64-full-internal.config} | 1 - support/config-fragments/autobuild/toolchain-configs.csv | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)rename
support/config-fragments/autobuild/{br-riscv64-internal-musl.config=> br-riscv64-full-internal.config} (57%)>
diff --gita/support/config-fragments/autobuild/br-riscv64-internal-musl.configb/support/config-fragments/autobuild/br-riscv64-full-internal.configsimilarity index 57%
rename fromsupport/config-fragments/autobuild/br-riscv64-internal-musl.configrename tosupport/config-fragments/autobuild/br-riscv64-full-internal.configindex89e7afb276..c729eb55e9100644support/config-fragments/autobuild/br-riscv64-full-internal.config renamed from support/config-fragments/autobuild/br-riscv64-internal-musl.config +0
-1@@ -1,3 +1,2 @@ BR2_riscv=y -BR2_TOOLCHAIN_BUILDROOT_MUSL=y
Quoted 8 lines
Quoted 1 line
BR2_TOOLCHAIN_BUILDROOT_CXX=y
This one is not "generic": it will only build a uClibc toolchain. It seems like you believe that since this defconfig fragment doesn't mention the C library, it will test glibc, musl and uclibc, but that's not the case. We do not randomize the choice of the C library, and since uclibc is our default, this new defconfig file will only test uclibc.
Sorry, that was my misinterpretation of 'full' when looking at config fragments for other architectures.
What would be preferred here? Should I leave the musl config as it is and add an additional fragment for uclibc?
Thanks
Mark
PATCH 2/2 support/config-fragments: add RISC-V 64-bit uclibc autobuild config
Quoted 2 lines · On Sat, 09 May 2020 13:37:24 +0100 Mark Corbin <[email protected]> wrote:
Sorry, that was my misinterpretation of 'full' when looking at config fragments for other architectures.
"full" in fact is used for uClibc toolchains, where it means "all features enabled", i.e threads, wchar, locales, etc.
Quoted 2 lines
What would be preferred here? Should I leave the musl config as it is and add an additional fragment for uclibc?
I'm not a big fan of having too many internal toolchain configurations as it takes quite a lot of build time on the autobuilder machines. Instead, we should build external toolchains if we want to test more configurations.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/2 toolchain/toolchain-buildroot: enable uclibc for riscv64
In reply to Mark CorbinQuoted 4 lines · Mark Corbin
We can enable uclibc for RISC-V 64 bit now that it has been bumped from v1.0.32 to v1.0.34.
Quoted 8 lines
Uclibc has had basic support for RISC-V 64 bit since v1.0.31, but shared library and TLS/NPTL support has only been available since v1.0.33.
This update has been tested using
qemu_riscv64_virt_defconfigand the Buildroot host QEMU.Signed-off-by Mark Corbin <[email protected]>
Alistair
Quoted 49 lines
--- package/uclibc/Config.in | 1 + toolchain/toolchain-buildroot/Config.in | 14 ++++++++------ 2 files changed, 9 insertions(+), 6 deletions(-)package/uclibc/Config.in +1
-0@@ -101,6 +101,7 @@ config BR2_UCLIBC_TARGET_ARCH default "mips" if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el default "or1k" if BR2_or1k default "powerpc" if BR2_powerpc + default "riscv64" if BR2_riscv && BR2_ARCH_IS_64 default "sh" if BR2_sh default "sparc" if BR2_sparc default "xtensa" if BR2_xtensatoolchain/toolchain-buildroot/Config.in +8
-7@@ -27,12 +27,14 @@ choice config BR2_TOOLCHAIN_BUILDROOT_UCLIBC bool "uClibc-ng" - depends on BR2_aarch64 || BR2_aarch64_be || BR2_arcle || BR2_arceb || \ - BR2_arm || BR2_armeb || \ - BR2_i386 || BR2_m68k || BR2_microblaze || \ - BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || \ - BR2_or1k || BR2_powerpc || BR2_sh2a || BR2_sh4 || \ - BR2_sh4eb || BR2_sparc || BR2_xtensa || BR2_x86_64 + depends on BR2_aarch64 || BR2_aarch64_be || BR2_arcle || BR2_arceb || \ + BR2_arm || BR2_armeb || \ + BR2_i386 || BR2_m68k || BR2_microblaze || \ + BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || \ + BR2_or1k || BR2_powerpc || BR2_riscv || \ + BR2_sh2a || BR2_sh4 || BR2_sh4eb || BR2_sparc || \ + BR2_xtensa || BR2_x86_64 + depends on BR2_ARCH_IS_64 || !BR2_riscv select BR2_TOOLCHAIN_USES_UCLIBC help This option selects uClibc-ng as the C library for the --2.20.1
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 1/2 toolchain/toolchain-buildroot: enable uclibc for riscv64
In reply to Mark CorbinQuoted 6 lines · On Fri, 8 May 2020 11:33:37 +0100 Mark Corbin <[email protected]> wrote:
config
BR2_TOOLCHAIN_BUILDROOT_UCLIBCtoolchain/toolchain-buildroot/Config.in +0
-4bool "uClibc-ng" - depends on BR2_aarch64 || BR2_aarch64_be || BR2_arcle || BR2_arceb || \ - BR2_arm || BR2_armeb || \ - BR2_i386 || BR2_m68k || BR2_microblaze || \ - BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || \
toolchain/toolchain-buildroot/Config.in choice · line 37
Quoted 10 lines
toolchain/toolchain-buildroot/Config.in +8
-2- BR2_or1k || BR2_powerpc || BR2_sh2a || BR2_sh4 || \ - BR2_sh4eb || BR2_sparc || BR2_xtensa || BR2_x86_64 + depends on BR2_aarch64 || BR2_aarch64_be || BR2_arcle || BR2_arceb || \ + BR2_arm || BR2_armeb || \ + BR2_i386 || BR2_m68k || BR2_microblaze || \ + BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || \ + BR2_or1k || BR2_powerpc || BR2_riscv || \ + BR2_sh2a || BR2_sh4 || BR2_sh4eb || BR2_sparc || \ + BR2_xtensa || BR2_x86_64 + depends on BR2_ARCH_IS_64 || !BR2_riscv
I think we really want to keep a single "depends on", so just add:
.... || (BR2_riscv && BR2_ARCH_IS_64) ||
or simpler:
.... || BR2_RISCV_64 || ...
You could also use BR2_RISCV_64 in package/uclibc/Config.in.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com