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

StdAtomic.cmake: probe atomic increment as well #800

Merged
merged 1 commit into from Feb 17, 2021
Merged

StdAtomic.cmake: probe atomic increment as well #800

merged 1 commit into from Feb 17, 2021

Conversation

trofi
Copy link
Contributor

@trofi trofi commented Feb 16, 2021

On sparc there are 8-byte atomic loads and stores available in ISA
but not atomic increments. As a result linking fails as:

ld: src/libccache_lib.a(InodeCache.cpp.o):
    undefined reference to symbol '__atomic_fetch_add_8@@LIBATOMIC_1.0'
ld: sparc-unknown-linux-gnu/8.2.0/libatomic.so.1:
    error adding symbols: DSO missing from command line

The fix is to add increment into libatomic test.
tested on sparc-unknown-linux-gnu target.

On sparc there are 8-byte atomic loads and stores available in ISA
but not atomic increments. As a result linking fails as:

```
ld: src/libccache_lib.a(InodeCache.cpp.o):
    undefined reference to symbol '__atomic_fetch_add_8@@LIBATOMIC_1.0'
ld: sparc-unknown-linux-gnu/8.2.0/libatomic.so.1:
    error adding symbols: DSO missing from command line
```

The fix is to add increment into libatomic test.
tested on `sparc-unknown-linux-gnu` target.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
@jrosdahl jrosdahl added this to the 4.2.1 milestone Feb 17, 2021
@jrosdahl jrosdahl added build Affects building of Ccache itself portability Affects portability of building or using Ccache labels Feb 17, 2021
@jrosdahl jrosdahl merged commit d163134 into ccache:master Feb 17, 2021
@jrosdahl
Copy link
Member

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Affects building of Ccache itself portability Affects portability of building or using Ccache
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants