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?
to your account
Building curl-7.84.0 for 64-bit RISC-V Linux using GCC 12.1.0 fails for me:
ld: ../lib/.libs/libcurl.so: undefined reference to `__atomic_exchange_1'
This is because GCC 12 doesn't inline sub-word-sized atomic operations (although future versions may do), and the new code in easy_lock.h does an atomic exchange on a single-byte atomic_bool.
The proper fix would be to link with GCC's libatomic - maybe CURL_ATOMIC should check for this? Changing the type of curl_simple_lock to atomic_int also works as a workaround.
The text was updated successfully, but these errors were encountered:
easy_lock: switch to using atomic_int instead of bool
To work with more compilers without requiring separate libs to
link. Like with gcc-12 for RISC-V on Linux.
Reported-by: Adam Sampson
Successfully merging a pull request may close this issue.