mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 03:47:29 -03:00
build: add and use CXX_STANDARD in depends
This commit is contained in:
parent
7e7b3e42fa
commit
f7595f1354
11 changed files with 9 additions and 8 deletions
|
@ -46,6 +46,7 @@ LTO ?=
|
||||||
FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources
|
FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources
|
||||||
|
|
||||||
C_STANDARD ?= c11
|
C_STANDARD ?= c11
|
||||||
|
CXX_STANDARD ?= c++17
|
||||||
|
|
||||||
BUILD = $(shell ./config.guess)
|
BUILD = $(shell ./config.guess)
|
||||||
HOST ?= $(BUILD)
|
HOST ?= $(BUILD)
|
||||||
|
|
|
@ -97,6 +97,7 @@ The following can be set when running make: `make FOO=bar`
|
||||||
- `SDK_PATH`: Path where SDKs can be found (used by macOS)
|
- `SDK_PATH`: Path where SDKs can be found (used by macOS)
|
||||||
- `FALLBACK_DOWNLOAD_PATH`: If a source file can't be fetched, try here before giving up
|
- `FALLBACK_DOWNLOAD_PATH`: If a source file can't be fetched, try here before giving up
|
||||||
- `C_STANDARD`: Set the C standard version used. Defaults to `c11`.
|
- `C_STANDARD`: Set the C standard version used. Defaults to `c11`.
|
||||||
|
- `CXX_STANDARD`: Set the C++ standard version used. Defaults to `c++17`.
|
||||||
- `NO_QT`: Don't download/build/cache Qt and its dependencies
|
- `NO_QT`: Don't download/build/cache Qt and its dependencies
|
||||||
- `NO_QR`: Don't download/build/cache packages needed for enabling qrencode
|
- `NO_QR`: Don't download/build/cache packages needed for enabling qrencode
|
||||||
- `NO_ZMQ`: Don't download/build/cache packages needed for enabling ZeroMQ
|
- `NO_ZMQ`: Don't download/build/cache packages needed for enabling ZeroMQ
|
||||||
|
|
|
@ -7,6 +7,7 @@ android_CC=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)$(ANDROID_API_LEVEL)-clang
|
||||||
endif
|
endif
|
||||||
|
|
||||||
android_CFLAGS=-std=$(C_STANDARD)
|
android_CFLAGS=-std=$(C_STANDARD)
|
||||||
|
android_CXXFLAGS=-std=$(CXX_STANDARD)
|
||||||
|
|
||||||
ifneq ($(LTO),)
|
ifneq ($(LTO),)
|
||||||
android_CFLAGS += -flto
|
android_CFLAGS += -flto
|
||||||
|
|
|
@ -110,7 +110,7 @@ darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
|
||||||
-Xclang -internal-externc-isystem$(OSX_SDK)/usr/include
|
-Xclang -internal-externc-isystem$(OSX_SDK)/usr/include
|
||||||
|
|
||||||
darwin_CFLAGS=-pipe -std=$(C_STANDARD)
|
darwin_CFLAGS=-pipe -std=$(C_STANDARD)
|
||||||
darwin_CXXFLAGS=-pipe
|
darwin_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
|
||||||
|
|
||||||
ifneq ($(LTO),)
|
ifneq ($(LTO),)
|
||||||
darwin_CFLAGS += -flto
|
darwin_CFLAGS += -flto
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
freebsd_CFLAGS=-pipe -std=$(C_STANDARD)
|
freebsd_CFLAGS=-pipe -std=$(C_STANDARD)
|
||||||
freebsd_CXXFLAGS=-pipe
|
freebsd_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
|
||||||
|
|
||||||
ifneq ($(LTO),)
|
ifneq ($(LTO),)
|
||||||
freebsd_CFLAGS += -flto
|
freebsd_CFLAGS += -flto
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
linux_CFLAGS=-pipe -std=$(C_STANDARD)
|
linux_CFLAGS=-pipe -std=$(C_STANDARD)
|
||||||
linux_CXXFLAGS=-pipe
|
linux_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
|
||||||
|
|
||||||
ifneq ($(LTO),)
|
ifneq ($(LTO),)
|
||||||
linux_CFLAGS += -flto
|
linux_CFLAGS += -flto
|
||||||
|
|
|
@ -3,7 +3,7 @@ mingw32_CXX := $(host)-g++-posix
|
||||||
endif
|
endif
|
||||||
|
|
||||||
mingw32_CFLAGS=-pipe -std=$(C_STANDARD)
|
mingw32_CFLAGS=-pipe -std=$(C_STANDARD)
|
||||||
mingw32_CXXFLAGS=-pipe
|
mingw32_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
|
||||||
|
|
||||||
ifneq ($(LTO),)
|
ifneq ($(LTO),)
|
||||||
mingw32_CFLAGS += -flto
|
mingw32_CFLAGS += -flto
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
netbsd_CFLAGS=-pipe -std=$(C_STANDARD)
|
netbsd_CFLAGS=-pipe -std=$(C_STANDARD)
|
||||||
netbsd_CXXFLAGS=-pipe
|
netbsd_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
|
||||||
|
|
||||||
ifneq ($(LTO),)
|
ifneq ($(LTO),)
|
||||||
netbsd_CFLAGS += -flto
|
netbsd_CFLAGS += -flto
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
openbsd_CFLAGS=-pipe -std=$(C_STANDARD)
|
openbsd_CFLAGS=-pipe -std=$(C_STANDARD)
|
||||||
openbsd_CXXFLAGS=-pipe
|
openbsd_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
|
||||||
|
|
||||||
ifneq ($(LTO),)
|
ifneq ($(LTO),)
|
||||||
openbsd_CFLAGS += -flto
|
openbsd_CFLAGS += -flto
|
||||||
|
|
|
@ -15,7 +15,6 @@ $(package)_config_opts_netbsd=--with-pic
|
||||||
$(package)_config_opts_openbsd=--with-pic
|
$(package)_config_opts_openbsd=--with-pic
|
||||||
$(package)_config_opts_android=--with-pic
|
$(package)_config_opts_android=--with-pic
|
||||||
$(package)_cflags+=-Wno-error=implicit-function-declaration
|
$(package)_cflags+=-Wno-error=implicit-function-declaration
|
||||||
$(package)_cxxflags+=-std=c++17
|
|
||||||
$(package)_cppflags_mingw32=-DUNICODE -D_UNICODE
|
$(package)_cppflags_mingw32=-DUNICODE -D_UNICODE
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,6 @@ define $(package)_set_vars
|
||||||
$(package)_config_opts_netbsd=--with-pic
|
$(package)_config_opts_netbsd=--with-pic
|
||||||
$(package)_config_opts_openbsd=--with-pic
|
$(package)_config_opts_openbsd=--with-pic
|
||||||
$(package)_config_opts_android=--with-pic
|
$(package)_config_opts_android=--with-pic
|
||||||
$(package)_cxxflags+=-std=c++17
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_preprocess_cmds
|
define $(package)_preprocess_cmds
|
||||||
|
|
Loading…
Reference in a new issue