mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-09 11:27:28 -03:00
build: Bump minimum supported GCC to g++-9
Also, update the code to use constexpr, which does not work in g++-8. Also, drop the no longer needed build-aux/m4/l_filesystem.m4.
This commit is contained in:
parent
fa69955e74
commit
fa953f15bf
6 changed files with 5 additions and 47 deletions
|
@ -1,38 +0,0 @@
|
|||
dnl Copyright (c) 2022 The Bitcoin Core developers
|
||||
dnl Distributed under the MIT software license, see the accompanying
|
||||
dnl file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
# GCC 8.1 and earlier requires -lstdc++fs
|
||||
|
||||
m4_define([_CHECK_FILESYSTEM_testbody], [[
|
||||
#include <filesystem>
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
int main() {
|
||||
(void)fs::current_path().root_name();
|
||||
return 0;
|
||||
}
|
||||
]])
|
||||
|
||||
AC_DEFUN([CHECK_FILESYSTEM], [
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
|
||||
AC_MSG_CHECKING([whether std::filesystem can be used without link library])
|
||||
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_FILESYSTEM_testbody])],[
|
||||
AC_MSG_RESULT([yes])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
LIBS="$LIBS -lstdc++fs"
|
||||
AC_MSG_CHECKING([whether std::filesystem needs -lstdc++fs])
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_FILESYSTEM_testbody])],[
|
||||
AC_MSG_RESULT([yes])
|
||||
],[
|
||||
AC_MSG_FAILURE([cannot figure out how to use std::filesystem])
|
||||
])
|
||||
])
|
||||
|
||||
AC_LANG_POP
|
||||
])
|
|
@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8
|
|||
|
||||
export CONTAINER_NAME=ci_native_qt5
|
||||
export CI_IMAGE_NAME_TAG="ubuntu:20.04"
|
||||
# Use minimum supported python3.8 and gcc-8 (or best-effort gcc-9), see doc/dependencies.md
|
||||
# Use minimum supported python3.8 and gcc-9, see doc/dependencies.md
|
||||
export PACKAGES="gcc-9 g++-9 python3-zmq qtbase5-dev qttools5-dev-tools libdbus-1-dev libharfbuzz-dev"
|
||||
export DEP_OPTS="NO_QT=1 NO_UPNP=1 NO_NATPMP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1 CC=gcc-9 CXX=g++-9"
|
||||
export TEST_RUNNER_EXTRA="--previous-releases --coverage --extended --exclude feature_dbcrash" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash
|
||||
|
|
|
@ -115,9 +115,6 @@ else
|
|||
AX_CXX_COMPILE_STDCXX([20], [noext], [mandatory])
|
||||
fi
|
||||
|
||||
dnl check if additional link flags are required for std::filesystem
|
||||
CHECK_FILESYSTEM
|
||||
|
||||
dnl Unless the user specified OBJCXX, force it to be the same as CXX. This ensures
|
||||
dnl that we get the same -std flags for both.
|
||||
m4_ifdef([AC_PROG_OBJCXX],[
|
||||
|
|
|
@ -9,7 +9,7 @@ You can find installation instructions in the `build-*.md` file for your platfor
|
|||
| [Autoconf](https://www.gnu.org/software/autoconf/) | [2.69](https://github.com/bitcoin/bitcoin/pull/17769) |
|
||||
| [Automake](https://www.gnu.org/software/automake/) | [1.13](https://github.com/bitcoin/bitcoin/pull/18290) |
|
||||
| [Clang](https://clang.llvm.org) | [10.0](https://github.com/bitcoin/bitcoin/pull/27682) |
|
||||
| [GCC](https://gcc.gnu.org) | [8.1](https://github.com/bitcoin/bitcoin/pull/23060) |
|
||||
| [GCC](https://gcc.gnu.org) | [9.1](https://github.com/bitcoin/bitcoin/pull/27662) |
|
||||
| [Python](https://www.python.org) (scripts, tests) | [3.8](https://github.com/bitcoin/bitcoin/pull/27483) |
|
||||
| [systemtap](https://sourceware.org/systemtap/) ([tracing](tracing.md))| N/A |
|
||||
|
||||
|
|
|
@ -53,15 +53,14 @@ struct AddressTableEntryLessThan
|
|||
};
|
||||
|
||||
/* Determine address type from address purpose */
|
||||
static AddressTableEntry::Type translateTransactionType(wallet::AddressPurpose purpose, bool isMine)
|
||||
constexpr AddressTableEntry::Type translateTransactionType(wallet::AddressPurpose purpose, bool isMine)
|
||||
{
|
||||
// "refund" addresses aren't shown, and change addresses aren't returned by getAddresses at all.
|
||||
switch (purpose) {
|
||||
case wallet::AddressPurpose::SEND: return AddressTableEntry::Sending;
|
||||
case wallet::AddressPurpose::RECEIVE: return AddressTableEntry::Receiving;
|
||||
case wallet::AddressPurpose::REFUND: return AddressTableEntry::Hidden;
|
||||
// No default case to allow for compiler to warn
|
||||
}
|
||||
} // no default case, so the compiler can warn about missing cases
|
||||
assert(false);
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ struct Announcement {
|
|||
const bool m_is_wtxid : 1;
|
||||
|
||||
/** What state this announcement is in.
|
||||
* This is a uint8_t instead of a State to silence a GCC warning in versions prior to 8.4 and 9.3.
|
||||
* This is a uint8_t instead of a State to silence a GCC warning in versions prior to 9.3.
|
||||
* See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61414 */
|
||||
uint8_t m_state : 3;
|
||||
|
||||
|
|
Loading…
Reference in a new issue