Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

link with -latomic if needed (again ...) #144

Merged
merged 1 commit into from
Nov 2, 2022
Merged

link with -latomic if needed (again ...) #144

merged 1 commit into from
Nov 2, 2022

Conversation

ffontaine
Copy link
Contributor

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

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:
 - http://autobuild.buildroot.org/results/54b7567d804d9abff56f47cd26bae774c1e38669

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
@andikleen andikleen merged commit 18ec3b9 into numactl:master Nov 2, 2022
@andikleen
Copy link
Contributor

Thanks!
Sorry should have caught that during the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants