link with -latomic if needed (again ...) #144
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
numactl unconditionally uses
__atomic_fetch_and
but some architectures (e.g. sparc) needs to link with -latomic to be able to use it. So check if -latomic is needed and update numa.pc accordingly.This linking was made by e0de0d9 but wrongly reverted by 10c277c resulting in the following build failure on sparc or microblaze:
/nvmedata/autobuild/instance-7/output-1/per-package/numactl/host/bin/../lib/gcc/sparc-buildroot-linux-uclibc/10.4.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: ./.libs/libnuma.a(libnuma.o): in function
numa_police_memory': libnuma.c:(.text+0xe28): undefined reference to__atomic_fetch_and_1'
Fixes:
Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com