toolchain/toolchain-buildroot: allow uclibc-ng for riscv
authorDamien Le Moal <damien.lemoal@wdc.com>
Tue, 8 Sep 2020 11:33:19 +0000 (20:33 +0900)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tue, 6 Oct 2020 21:32:49 +0000 (23:32 +0200)
uclibc-ng supports the RISC-V architecture since version 1.0.31, so
let's allow selecting this C library when RISC-V is used.

There was a previous attempt in commit
bd9810e176273914eca1208bcba23f0de9e446b3, which was reverted in
e7d631c0df1698b4edc94f148e7247869430e108, due to uClibc-ng not
implementing the __riscv_flush_icache() which is needed by
gcc. However this function has been implemented in upstream uClibc-ng
as of 1.0.35, so we can now safely re-enable uClibc-ng on RISC-V.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/uclibc/Config.in
toolchain/toolchain-buildroot/Config.in

index de2885bc92fcf65b12aa1d08a04ba561c934dd7d..918c5813f220f165c6f5a733488179845f978d36 100644 (file)
@@ -106,6 +106,8 @@ config BR2_UCLIBC_TARGET_ARCH
        default "xtensa"   if BR2_xtensa
        default "i386"     if BR2_i386
        default "x86_64"   if BR2_x86_64
+       default "riscv64"  if BR2_riscv && BR2_ARCH_IS_64
+       default "riscv32"  if BR2_riscv && !BR2_ARCH_IS_64
 
 config BR2_UCLIBC_MIPS_ABI
        string
index 1c4705600ef2930158e9c274b8bd04ee1f291754..f34dd84c29aaa2faf4e691ec2f29ca8ed6245313 100644 (file)
@@ -31,8 +31,9 @@ config BR2_TOOLCHAIN_BUILDROOT_UCLIBC
                   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
+                  BR2_or1k    || BR2_powerpc || BR2_riscv || BR2_sh2a   || \
+                  BR2_sh4     || BR2_sh4eb   || BR2_sparc || BR2_xtensa || \
+                  BR2_x86_64
        select BR2_TOOLCHAIN_USES_UCLIBC
        help
          This option selects uClibc-ng as the C library for the