[Buildroot] [PATCH 1/1] package/numactl: needs atomic

Thomas Petazzoni thomas.petazzoni at bootlin.com
Thu Apr 28 21:45:27 UTC 2022


On Wed, 27 Apr 2022 22:50:57 +0200
Fabrice Fontaine <fontaine.fabrice at gmail.com> wrote:

> numactl unconditionally uses __atomic_fetch_and resulting in the
> following build failure on microblaze since commit
> 4ed540ddf59bec4b389be44d7f42820d2466904f:

This explanation is unfortunately incorrect. It has nothing to do with
microblaze, because BR2_TOOLCHAIN_HAS_ATOMIC is true on microblaze:

config BR2_TOOLCHAIN_HAS_LIBATOMIC
        bool
        default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 && \
                !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64 && \
                BR2_TOOLCHAIN_HAS_THREADS && \
                !BR2_BINFMT_FLAT

config BR2_TOOLCHAIN_HAS_ATOMIC
        bool
        default y if BR2_TOOLCHAIN_HAS_LIBATOMIC
        default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_arm
        default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_armeb
        default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_xtensa
        default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_ARCH_IS_64

However, the key thing is that the build failure
http://autobuild.buildroot.org/results/e225cb83dae390d9dc543d4da85c52180efbd40a
has thread support disabled, and when threads are disabled, libatomic
is not built, and therefore BR2_TOOLCHAIN_HAS_LIBATOMIC is false.

However, I don't see anywhere in the numactl build system where
-latomic is passed. Does it build on architectures that need to link
against libatomic to get atomic intrinsics?

Could you double check this, and rework the commit message?

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com



More information about the buildroot mailing list