Skip to content

Commit

Permalink
Merge #71: cmake: Backport check whether -latomic needed
Browse files Browse the repository at this point in the history
80b1ab6 fixup! cmake: Check system symbols (Hennadii Stepanov)

Pull request description:

  This PR mirrors changes from bitcoin#29177.

ACKs for top commit:
  TheCharlatan:
    ACK 80b1ab6

Tree-SHA512: b29f0a4872f1093af7157767fff77ff5dcc42a45f0f3cbe62c5e53a054890e969ee8bcdca6cbbc93e04dbde49203500f6f657223a7d56a68bbb6f1c54a7e57a6
  • Loading branch information
hebasto committed Jan 9, 2024
2 parents d128e8a + 80b1ab6 commit bfc9375
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmake/module/TestAppendRequiredLibraries.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function(test_append_socket_library target)
endif()
endfunction()

# Clang prior to version 15, when building for 32-bit,
# Clang, when building for 32-bit,
# and linking against libstdc++, requires linking with
# -latomic if using the C++ atomic library.
# Can be tested with: clang++ test.cpp -m32
Expand All @@ -53,6 +53,8 @@ function(test_append_atomic_library target)
std::atomic<std::chrono::seconds> t{0s};
t.store(2s);
auto t1 = t.load();
t.compare_exchange_strong(t1, 3s);
std::atomic<int64_t> a{};
Expand Down

0 comments on commit bfc9375

Please sign in to comment.