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
build: fix 'threadsafe' feature detection for older gcc #12127
Conversation
I don't know how to easily get cmake going on this ancient FreeBSD, but I tested the autoconf version but it didn't work. The problem is that |
8373a27
to
4585c67
Compare
That is confusing because it is supposed to be defined when pthreads is used isn't it? Lines 3741 to 3744 in d755a5f
Thanks I have incorporated your feedback. Please try the most recently pushed version. I updated both conditionals to prepend the x but I notice in the file it's done both ways. When is one more appropriate than the other? If I understand correctly |
That is confusing because it is supposed to be defined when pthreads is used
isn't it?
Those definitions live in a different namespace and aren't available later in
the configure script. I'll try your change tomorrow.
|
I tested the update patch with autotools and it works fine. I simulated a missing stdatomic.h in a cmake build on another system and that worked as well. |
Just noticed the |
- Add 'threadsafe' to the feature list shown during build if POSIX threads are being used. This is a follow-up to 5adb600 which added support for building a thread-safe libcurl with older versions of gcc where atomic is not available but pthread is. Reported-by: Dan Fandrich Fixes curl#12125 Closes #xxxx
4585c67
to
2e4a545
Compare
Thanks. I have added your change, please take another look. |
I mis-parsed the statement. It's fine as-is since the shell spawns a second test for the second test clause, but it would avoid a fork if |
Yes, that's exactly what I was thinking. |
W.r.t. the x's in the |
This is a follow-up to 5adb600 which added support for building a thread-safe libcurl with older versions of gcc where atomic is not available but pthread is.
Reported-by: Dan Fandrich
Fixes #12125
Closes #xxxx