From 04c5427acb6e74d2f372c929690e7b9323e2aab9 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Tue, 11 Jul 2023 00:55:17 +0200 Subject: [PATCH] depends: set CXX_STANDARD 17 --- contrib/depends/Makefile | 2 ++ contrib/depends/hosts/darwin.mk | 2 +- contrib/depends/hosts/linux.mk | 2 +- contrib/depends/hosts/mingw32.mk | 2 +- contrib/depends/packages/openssl.mk | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/contrib/depends/Makefile b/contrib/depends/Makefile index 7649953..8a2e88b 100644 --- a/contrib/depends/Makefile +++ b/contrib/depends/Makefile @@ -33,6 +33,8 @@ WORK_PATH = $(BASEDIR)/work BASE_CACHE ?= $(BASEDIR)/built FALLBACK_DOWNLOAD_PATH ?= https://featherwallet.org/files/sources +CXX_STANDARD ?= c++17 + BUILD = $(shell ./config.guess) HOST ?= $(BUILD) PATCHES_PATH = $(BASEDIR)/patches diff --git a/contrib/depends/hosts/darwin.mk b/contrib/depends/hosts/darwin.mk index 2b280bc..32ce7b7 100644 --- a/contrib/depends/hosts/darwin.mk +++ b/contrib/depends/hosts/darwin.mk @@ -76,7 +76,7 @@ darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \ $(clangxx_prog) $(darwin_CXX_) darwin_CFLAGS=-pipe -darwin_CXXFLAGS=$(darwin_CFLAGS) +darwin_CXXFLAGS=-pipe -std=$(CXX_STANDARD) darwin_ARFLAGS=cr darwin_release_CFLAGS=-O2 diff --git a/contrib/depends/hosts/linux.mk b/contrib/depends/hosts/linux.mk index a373325..0ef699b 100644 --- a/contrib/depends/hosts/linux.mk +++ b/contrib/depends/hosts/linux.mk @@ -1,5 +1,5 @@ linux_CFLAGS=-pipe -linux_CXXFLAGS=$(linux_CFLAGS) +linux_CXXFLAGS=-pipe -std=$(CXX_STANDARD) linux_ARFLAGS=cr linux_release_CFLAGS=-O2 diff --git a/contrib/depends/hosts/mingw32.mk b/contrib/depends/hosts/mingw32.mk index 1985f38..604a34d 100644 --- a/contrib/depends/hosts/mingw32.mk +++ b/contrib/depends/hosts/mingw32.mk @@ -3,7 +3,7 @@ mingw32_CXX := $(host)-g++-posix endif mingw32_CFLAGS=-pipe -mingw32_CXXFLAGS=$(mingw32_CFLAGS) +mingw32_CXXFLAGS=-pipe std=$(CXX_STANDARD) mingw32_ARFLAGS=cr mingw32_release_CFLAGS=-O2 diff --git a/contrib/depends/packages/openssl.mk b/contrib/depends/packages/openssl.mk index bdfb031..36089fe 100644 --- a/contrib/depends/packages/openssl.mk +++ b/contrib/depends/packages/openssl.mk @@ -27,7 +27,7 @@ $(package)_config_opts+=no-unit-test $(package)_config_opts+=no-weak-ssl-ciphers $(package)_config_opts+=no-zlib $(package)_config_opts+=no-zlib-dynamic -$(package)_config_opts+=$($(package)_cflags) $($(package)_cppflags) +$(package)_config_opts+=-pipe $(package)_config_opts_linux=-fPIC -Wa,--noexecstack $(package)_config_opts_freebsd=-fPIC -Wa,--noexecstack $(package)_config_opts_x86_64_linux=linux-x86_64