Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #2786 - str4d:2074-build, r=str4d
Build system improvements Includes commits cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6978 - Only the first commit (second is for QT) - bitcoin/bitcoin#7059 - bitcoin/bitcoin#7603 - Only the first commit (without the `BITCOIN_QT_BIN` variable; the rest are for QT) - bitcoin/bitcoin#7954 - bitcoin/bitcoin#8314 - Only the second commit (first is for QT) - bitcoin/bitcoin#8504 - Only the first commit (second was undoing something we didn't have) - bitcoin/bitcoin#8520 - bitcoin/bitcoin#8563 - bitcoin/bitcoin#8249 - bitcoin/bitcoin#9156 - bitcoin/bitcoin#9831 - bitcoin/bitcoin#9789 - bitcoin/bitcoin#10766 Part of #2074. # Conflicts: # configure.ac # src/Makefile.am # src/Makefile.gtest.include # src/Makefile.test.include # zcutil/build.sh
- Loading branch information
Showing
12 changed files
with
229 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Some versions of gcc/libstdc++ require linking with -latomic if | ||
# using the C++ atomic library. | ||
# | ||
# Sourced from http://bugs.debian.org/797228 | ||
|
||
m4_define([_CHECK_ATOMIC_testbody], [[ | ||
#include <atomic> | ||
#include <cstdint> | ||
int main() { | ||
std::atomic<int64_t> a{}; | ||
int64_t v = 5; | ||
int64_t r = a.fetch_add(v); | ||
return static_cast<int>(r); | ||
} | ||
]]) | ||
|
||
AC_DEFUN([CHECK_ATOMIC], [ | ||
AC_LANG_PUSH(C++) | ||
AC_MSG_CHECKING([whether std::atomic can be used without link library]) | ||
AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_ATOMIC_testbody])],[ | ||
AC_MSG_RESULT([yes]) | ||
],[ | ||
AC_MSG_RESULT([no]) | ||
LIBS="$LIBS -latomic" | ||
AC_MSG_CHECKING([whether std::atomic needs -latomic]) | ||
AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_ATOMIC_testbody])],[ | ||
AC_MSG_RESULT([yes]) | ||
],[ | ||
AC_MSG_RESULT([no]) | ||
AC_MSG_FAILURE([cannot figure our how to use std::atomic]) | ||
]) | ||
]) | ||
AC_LANG_POP | ||
]) |
Oops, something went wrong.