toolchain: Enable Glibc for all little-endian ARCs with atomic ops
PATCH 1/1 toolchain: Enable Glibc for all little-endian ARCs with atomic ops
Initially we had a port only for ARCv2 cores but
then with a simple change ARCompact cores got supported as well.
So we generalize from BR2_archs to BR2_arcle as we haven't tried to get glibc working on big-endian ARCs yet.
Also we never bothered to check avaialbility of atomic instructions in the core but in case of Glibc for ARC this is really a must, so we add this check here.
Note in case of uClibc we may have system w/o HW atomics but:
1. Only single-core systems are allowed
2. Atomic instructions are emulated via arc_usr_cmpxchg syscall
--- toolchain/toolchain-buildroot/Config.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
toolchain/toolchain-buildroot/Config.in +2 -1
@@ -48,7 +48,7 @@ config BR2_TOOLCHAIN_BUILDROOT_GLIBC BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || \ BR2_riscv || BR2_sh || BR2_sparc64 || \ BR2_x86_64 || BR2_microblaze || BR2_nios2 || \ - BR2_archs38 + BR2_arcle depends on BR2_USE_MMU depends on !BR2_STATIC_LIBS depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
@@ -56,6 +56,7 @@ config BR2_TOOLCHAIN_BUILDROOT_GLIBC depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5 || !BR2_MIPS_NAN_2008 depends on !BR2_powerpc_SPE depends on BR2_RISCV_ISA_RVA || !BR2_riscv + depends on BR2_ARC_ATOMIC_EXT || !BR2_arc select BR2_TOOLCHAIN_USES_GLIBC # our glibc.mk enables RPC support select BR2_TOOLCHAIN_HAS_NATIVE_RPC
Signature · 1 line
2.19.1
PATCH 1/1 toolchain: Enable Glibc for all little-endian ARCs with atomic ops
Hello,
toolchain/toolchain-buildroot/Config.in config BR2_TOOLCHAIN_BUILDROOT_GLIBC · line 51
Quoted 10 lines · Alexey Brodkin
toolchain/toolchain-buildroot/Config.in +1
-1@@ -48,7 +48,7 @@ config BR2_TOOLCHAIN_BUILDROOT_GLIBC BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || \ BR2_riscv || BR2_sh || BR2_sparc64 || \ BR2_x86_64 || BR2_microblaze || BR2_nios2 || \ - BR2_archs38 + BR2_arcle
What about:
(BR2_arcle && BR2_ARC_ATOMIC_EXT)
instead ?
toolchain/toolchain-buildroot/Config.in config BR2_TOOLCHAIN_BUILDROOT_GLIBC · line 59
Quoted 8 lines
toolchain/toolchain-buildroot/Config.in +1
-0depends on BR2_USE_MMU depends on !BR2_STATIC_LIBS depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2@@ -56,6 +56,7 @@ config BR2_TOOLCHAIN_BUILDROOT_GLIBC depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5 || !BR2_MIPS_NAN_2008 depends on !BR2_powerpc_SPE depends on BR2_RISCV_ISA_RVA || !BR2_riscv + depends on BR2_ARC_ATOMIC_EXT || !BR2_arc
and drop this dependency ?
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 toolchain: Enable Glibc for all little-endian ARCs with atomic ops
Hi Thomas,
Quoted 17 lines · Thomas Petazzoni
Hello,
toolchain/toolchain-buildroot/Config.in config BR2_TOOLCHAIN_BUILDROOT_GLIBC · line 51
Quoted 10 lines · Alexey Brodkin
toolchain/toolchain-buildroot/Config.in +1
-1@@ -48,7 +48,7 @@ config BR2_TOOLCHAIN_BUILDROOT_GLIBC BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || \ BR2_riscv || BR2_sh || BR2_sparc64 || \ BR2_x86_64 || BR2_microblaze || BR2_nios2 || \ - BR2_archs38 + BR2_arcleWhat about:
Quoted 3 lines
(BR2_arcle && BR2_ARC_ATOMIC_EXT)instead ?
Sure, but I didn't want to ruin the beauty of above construction thus split in 2 parts.
If you're OK with (x & y) among other pure arch mentions I may send a respin.
-Alexey
PATCH 1/1 toolchain: Enable Glibc for all little-endian ARCs with atomic ops
Hello,
Quoted 20 lines · Alexey Brodkin
Quoted 19 lines · Thomas Petazzoni
Hello,
toolchain/toolchain-buildroot/Config.in config BR2_TOOLCHAIN_BUILDROOT_GLIBC · line 51
Quoted 10 lines · Alexey Brodkin
toolchain/toolchain-buildroot/Config.in +1
-1@@ -48,7 +48,7 @@ config BR2_TOOLCHAIN_BUILDROOT_GLIBC BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || \ BR2_riscv || BR2_sh || BR2_sparc64 || \ BR2_x86_64 || BR2_microblaze || BR2_nios2 || \ - BR2_archs38 + BR2_arcleWhat about:
(BR2_arcle && BR2_ARC_ATOMIC_EXT)
Quoted 7 lines
Quoted 1 line
instead ?
Sure, but I didn't want to ruin the beauty of above construction thus split in 2 parts.
If you're OK with (x & y) among other pure arch mentions I may send a respin.
If you truly want beauty (which is good!) then I think it would be best to have in package/glibc/Config.in:
config BR2_PACKAGE_GLIBC_ARCH_SUPPORTS
bool
default y if ...
default y if ...
and then use that in toolchain/toolchain-buildroot/Config.in. But that requires doing the same for uclibc and musl to keep consistency :)
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com