* [Buildroot] [PATCH 1/2] toolchain/toolchain-buildroot: enable uclibc for riscv64
@ 2020-05-08 10:33 Mark Corbin
2020-05-08 10:33 ` [Buildroot] [PATCH 2/2] support/config-fragments: add RISC-V 64-bit uclibc autobuild config Mark Corbin
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Mark Corbin @ 2020-05-08 10:33 UTC (permalink / raw)
To: buildroot
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.
Signed-off-by: Mark Corbin <mark@dibsco.co.uk>
---
package/uclibc/Config.in | 1 +
toolchain/toolchain-buildroot/Config.in | 14 ++++++++------
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in
index de2885bc92..f8c9955bc8 100644
--- a/package/uclibc/Config.in
+++ b/package/uclibc/Config.in
@@ -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
diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in
index 8c33b2b4dd..8ae7358526 100644
--- a/toolchain/toolchain-buildroot/Config.in
+++ b/toolchain/toolchain-buildroot/Config.in
@@ -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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 2/2] support/config-fragments: add RISC-V 64-bit uclibc autobuild config
2020-05-08 10:33 [Buildroot] [PATCH 1/2] toolchain/toolchain-buildroot: enable uclibc for riscv64 Mark Corbin
@ 2020-05-08 10:33 ` Mark Corbin
2020-05-08 19:44 ` Alistair Francis
2020-05-09 10:07 ` Thomas Petazzoni
2020-05-08 19:44 ` [Buildroot] [PATCH 1/2] toolchain/toolchain-buildroot: enable uclibc for riscv64 Alistair Francis
2020-05-09 10:05 ` Thomas Petazzoni
2 siblings, 2 replies; 8+ messages in thread
From: Mark Corbin @ 2020-05-08 10:33 UTC (permalink / raw)
To: buildroot
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 <mark@dibsco.co.uk>
---
...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 --git a/support/config-fragments/autobuild/br-riscv64-internal-musl.config b/support/config-fragments/autobuild/br-riscv64-full-internal.config
similarity index 57%
rename from support/config-fragments/autobuild/br-riscv64-internal-musl.config
rename to support/config-fragments/autobuild/br-riscv64-full-internal.config
index 89e7afb276..c729eb55e9 100644
--- a/support/config-fragments/autobuild/br-riscv64-internal-musl.config
+++ b/support/config-fragments/autobuild/br-riscv64-full-internal.config
@@ -1,3 +1,2 @@
BR2_riscv=y
-BR2_TOOLCHAIN_BUILDROOT_MUSL=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
diff --git a/support/config-fragments/autobuild/toolchain-configs.csv b/support/config-fragments/autobuild/toolchain-configs.csv
index 9b41e2173b..88b0e72ab3 100644
--- a/support/config-fragments/autobuild/toolchain-configs.csv
+++ b/support/config-fragments/autobuild/toolchain-configs.csv
@@ -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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/2] toolchain/toolchain-buildroot: enable uclibc for riscv64
2020-05-08 10:33 [Buildroot] [PATCH 1/2] toolchain/toolchain-buildroot: enable uclibc for riscv64 Mark Corbin
2020-05-08 10:33 ` [Buildroot] [PATCH 2/2] support/config-fragments: add RISC-V 64-bit uclibc autobuild config Mark Corbin
@ 2020-05-08 19:44 ` Alistair Francis
2020-05-09 10:05 ` Thomas Petazzoni
2 siblings, 0 replies; 8+ messages in thread
From: Alistair Francis @ 2020-05-08 19:44 UTC (permalink / raw)
To: buildroot
On Fri, May 8, 2020 at 3:41 AM Mark Corbin <mark@dibsco.co.uk> wrote:
>
> 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.
>
> Signed-off-by: Mark Corbin <mark@dibsco.co.uk>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
> ---
> package/uclibc/Config.in | 1 +
> toolchain/toolchain-buildroot/Config.in | 14 ++++++++------
> 2 files changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in
> index de2885bc92..f8c9955bc8 100644
> --- a/package/uclibc/Config.in
> +++ b/package/uclibc/Config.in
> @@ -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
> diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in
> index 8c33b2b4dd..8ae7358526 100644
> --- a/toolchain/toolchain-buildroot/Config.in
> +++ b/toolchain/toolchain-buildroot/Config.in
> @@ -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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 2/2] support/config-fragments: add RISC-V 64-bit uclibc autobuild config
2020-05-08 10:33 ` [Buildroot] [PATCH 2/2] support/config-fragments: add RISC-V 64-bit uclibc autobuild config Mark Corbin
@ 2020-05-08 19:44 ` Alistair Francis
2020-05-09 10:07 ` Thomas Petazzoni
1 sibling, 0 replies; 8+ messages in thread
From: Alistair Francis @ 2020-05-08 19:44 UTC (permalink / raw)
To: buildroot
On Fri, May 8, 2020 at 3:41 AM Mark Corbin <mark@dibsco.co.uk> 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 <mark@dibsco.co.uk>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
> ---
> ...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 --git a/support/config-fragments/autobuild/br-riscv64-internal-musl.config b/support/config-fragments/autobuild/br-riscv64-full-internal.config
> similarity index 57%
> rename from support/config-fragments/autobuild/br-riscv64-internal-musl.config
> rename to support/config-fragments/autobuild/br-riscv64-full-internal.config
> index 89e7afb276..c729eb55e9 100644
> --- a/support/config-fragments/autobuild/br-riscv64-internal-musl.config
> +++ b/support/config-fragments/autobuild/br-riscv64-full-internal.config
> @@ -1,3 +1,2 @@
> BR2_riscv=y
> -BR2_TOOLCHAIN_BUILDROOT_MUSL=y
> BR2_TOOLCHAIN_BUILDROOT_CXX=y
> diff --git a/support/config-fragments/autobuild/toolchain-configs.csv b/support/config-fragments/autobuild/toolchain-configs.csv
> index 9b41e2173b..88b0e72ab3 100644
> --- a/support/config-fragments/autobuild/toolchain-configs.csv
> +++ b/support/config-fragments/autobuild/toolchain-configs.csv
> @@ -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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/2] toolchain/toolchain-buildroot: enable uclibc for riscv64
2020-05-08 10:33 [Buildroot] [PATCH 1/2] toolchain/toolchain-buildroot: enable uclibc for riscv64 Mark Corbin
2020-05-08 10:33 ` [Buildroot] [PATCH 2/2] support/config-fragments: add RISC-V 64-bit uclibc autobuild config Mark Corbin
2020-05-08 19:44 ` [Buildroot] [PATCH 1/2] toolchain/toolchain-buildroot: enable uclibc for riscv64 Alistair Francis
@ 2020-05-09 10:05 ` Thomas Petazzoni
2 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2020-05-09 10:05 UTC (permalink / raw)
To: buildroot
On Fri, 8 May 2020 11:33:37 +0100
Mark Corbin <mark@dibsco.co.uk> wrote:
> 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
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
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 2/2] support/config-fragments: add RISC-V 64-bit uclibc autobuild config
2020-05-08 10:33 ` [Buildroot] [PATCH 2/2] support/config-fragments: add RISC-V 64-bit uclibc autobuild config Mark Corbin
2020-05-08 19:44 ` Alistair Francis
@ 2020-05-09 10:07 ` Thomas Petazzoni
2020-05-09 12:37 ` Mark Corbin
1 sibling, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2020-05-09 10:07 UTC (permalink / raw)
To: buildroot
On Fri, 8 May 2020 11:33:38 +0100
Mark Corbin <mark@dibsco.co.uk> 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 <mark@dibsco.co.uk>
> ---
> ...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 --git a/support/config-fragments/autobuild/br-riscv64-internal-musl.config b/support/config-fragments/autobuild/br-riscv64-full-internal.config
> similarity index 57%
> rename from support/config-fragments/autobuild/br-riscv64-internal-musl.config
> rename to support/config-fragments/autobuild/br-riscv64-full-internal.config
> index 89e7afb276..c729eb55e9 100644
> --- a/support/config-fragments/autobuild/br-riscv64-internal-musl.config
> +++ b/support/config-fragments/autobuild/br-riscv64-full-internal.config
> @@ -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
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 2/2] support/config-fragments: add RISC-V 64-bit uclibc autobuild config
2020-05-09 10:07 ` Thomas Petazzoni
@ 2020-05-09 12:37 ` Mark Corbin
2020-05-09 14:23 ` Thomas Petazzoni
0 siblings, 1 reply; 8+ messages in thread
From: Mark Corbin @ 2020-05-09 12:37 UTC (permalink / raw)
To: buildroot
On Saturday, 9 May 2020 11:07:58 BST Thomas Petazzoni wrote:
> On Fri, 8 May 2020 11:33:38 +0100
>
> Mark Corbin <mark@dibsco.co.uk> 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 <mark@dibsco.co.uk>
> > ---
> >
> > ...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 --git
> > a/support/config-fragments/autobuild/br-riscv64-internal-musl.config
> > b/support/config-fragments/autobuild/br-riscv64-full-internal.config
> > similarity index 57%
> > rename from
> > support/config-fragments/autobuild/br-riscv64-internal-musl.config rename
> > to support/config-fragments/autobuild/br-riscv64-full-internal.config
> > index 89e7afb276..c729eb55e9 100644
> > --- a/support/config-fragments/autobuild/br-riscv64-internal-musl.config
> > +++ b/support/config-fragments/autobuild/br-riscv64-full-internal.config
> > @@ -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.
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 2/2] support/config-fragments: add RISC-V 64-bit uclibc autobuild config
2020-05-09 12:37 ` Mark Corbin
@ 2020-05-09 14:23 ` Thomas Petazzoni
0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2020-05-09 14:23 UTC (permalink / raw)
To: buildroot
On Sat, 09 May 2020 13:37:24 +0100
Mark Corbin <mark@dibsco.co.uk> 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.
> 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
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-05-09 14:23 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08 10:33 [Buildroot] [PATCH 1/2] toolchain/toolchain-buildroot: enable uclibc for riscv64 Mark Corbin
2020-05-08 10:33 ` [Buildroot] [PATCH 2/2] support/config-fragments: add RISC-V 64-bit uclibc autobuild config Mark Corbin
2020-05-08 19:44 ` Alistair Francis
2020-05-09 10:07 ` Thomas Petazzoni
2020-05-09 12:37 ` Mark Corbin
2020-05-09 14:23 ` Thomas Petazzoni
2020-05-08 19:44 ` [Buildroot] [PATCH 1/2] toolchain/toolchain-buildroot: enable uclibc for riscv64 Alistair Francis
2020-05-09 10:05 ` Thomas Petazzoni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.