uclibc: arc: Disable usage of atomic ops if hardware has no LLSC
PATCH 1/1 uclibc: arc: Disable usage of atomic ops if hardware has no LLSC
Since uClibc-ng v1.0.20 we may force libc to either use llock/scond instructions for atomic ops or if those are missing use kernel-assisted emulation. By defult atomics are used so we disable that feature in libc if we build for target without LLSC.
This allows us to build and use NPTL on ARC750 for example which was not possible before.
Signed-off-by Alexey Brodkin <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Peter Korsgaard <[email protected]>
--- package/uclibc/uclibc.mk | 7 +++++++ 1 file changed, 7 insertions(+)
package/uclibc/uclibc.mk +7 -0
@@ -101,6 +101,12 @@ define UCLIBC_ARC_PAGE_SIZE_CONFIG $(call KCONFIG_ENABLE_OPT,$(UCLIBC_ARC_PAGE_SIZE),$(@D)/.config) endef +ifneq ($(BR2_ARC_ATOMIC_EXT),y) +define UCLIBC_ARC_ATOMICS_CONFIG + $(call KCONFIG_DISABLE_OPT,CONFIG_ARC_HAS_ATOMICS,$(@D)/.config) +endef +endif + endif # arc #
@@ -395,6 +401,7 @@ define UCLIBC_KCONFIG_FIXUP_CMDS $(UCLIBC_BINFMT_CONFIG) $(UCLIBC_ARC_TYPE_CONFIG) $(UCLIBC_ARC_PAGE_SIZE_CONFIG) + $(UCLIBC_ARC_ATOMICS_CONFIG) $(UCLIBC_ARM_ABI_CONFIG) $(UCLIBC_ARM_BINFMT_FLAT) $(UCLIBC_ARM_NO_CONTEXT_FUNCS)
Signature · 1 line
2.11.0
PATCH 1/1 uclibc: arc: Disable usage of atomic ops if hardware has no LLSC
Hello,
Quoted 1 line · Alexey Brodkin
+ifneq ($(BR2_ARC_ATOMIC_EXT),y)
Changed to:
ifeq ($(BR2_ARC_ATOMIC_EXT),)
and applied. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com