mirror of
https://github.com/monero-project/monero.git
synced 2025-03-12 09:28:28 +00:00
depends: explicitely set C/CXX standard for all packages
This commit is contained in:
parent
941ecefab2
commit
08efdf1eec
11 changed files with 25 additions and 27 deletions
|
@ -8,6 +8,9 @@ SOURCES_PATH ?= $(BASEDIR)/sources
|
|||
BASE_CACHE ?= $(BASEDIR)/built
|
||||
FALLBACK_DOWNLOAD_PATH ?= https://downloads.getmonero.org/depends-sources
|
||||
|
||||
C_STANDARD ?= gnu11
|
||||
CXX_STANDARD ?= c++17
|
||||
|
||||
BUILD = $(shell ./config.guess)
|
||||
HOST ?= $(BUILD)
|
||||
PATCHES_PATH = $(BASEDIR)/patches
|
||||
|
|
|
@ -8,8 +8,8 @@ android_CC=$(host_toolchain)clang
|
|||
android_CXX=$(host_toolchain)clang++
|
||||
android_RANLIB=:
|
||||
|
||||
android_CFLAGS=-pipe
|
||||
android_CXXFLAGS=$(android_CFLAGS)
|
||||
android_CFLAGS=-pipe -std=$(C_STANDARD)
|
||||
android_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
|
||||
android_ARFLAGS=crsD
|
||||
|
||||
android_release_CFLAGS=-O2
|
||||
|
|
|
@ -52,8 +52,8 @@ darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
|
|||
-iwithsysroot/usr/include/c++/v1 \
|
||||
-iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks
|
||||
|
||||
darwin_CFLAGS=-pipe
|
||||
darwin_CXXFLAGS=$(darwin_CFLAGS)
|
||||
darwin_CFLAGS=-pipe -std=$(C_STANDARD)
|
||||
darwin_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
|
||||
darwin_ARFLAGS=cr
|
||||
|
||||
darwin_release_CFLAGS=-O2
|
||||
|
|
|
@ -13,8 +13,8 @@ freebsd_AR=ar
|
|||
freebsd_RANLIB=ranlib
|
||||
freebsd_NM=nm
|
||||
|
||||
freebsd_CFLAGS=-pipe
|
||||
freebsd_CXXFLAGS=$(freebsd_CFLAGS)
|
||||
freebsd_CFLAGS=-pipe -std=$(C_STANDARD)
|
||||
freebsd_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
|
||||
freebsd_ARFLAGS=cr
|
||||
|
||||
freebsd_release_CFLAGS=-O2
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
linux_CFLAGS=-pipe
|
||||
linux_CXXFLAGS=$(linux_CFLAGS)
|
||||
linux_CFLAGS=-pipe -std=$(C_STANDARD)
|
||||
linux_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
|
||||
linux_ARFLAGS=cr
|
||||
|
||||
linux_release_CFLAGS=-O2
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
mingw32_CFLAGS=-pipe
|
||||
mingw32_CXXFLAGS=$(mingw32_CFLAGS)
|
||||
mingw32_CFLAGS=-pipe -std=$(C_STANDARD)
|
||||
mingw32_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
|
||||
mingw32_ARFLAGS=cr
|
||||
|
||||
mingw32_release_CFLAGS=-O2
|
||||
|
|
|
@ -23,7 +23,6 @@ $(package)_toolset_darwin=darwin
|
|||
$(package)_archiver_darwin=$($(package)_libtool)
|
||||
$(package)_config_libraries_$(host_os)="chrono,filesystem,program_options,system,thread,test,date_time,regex,serialization"
|
||||
$(package)_config_libraries_mingw32="chrono,filesystem,program_options,system,thread,test,date_time,regex,serialization,locale"
|
||||
$(package)_cxxflags+=-std=c++11
|
||||
$(package)_cxxflags_linux+=-fPIC
|
||||
$(package)_cxxflags_freebsd+=-fPIC
|
||||
$(package)_cxxflags_darwin+=-ffile-prefix-map=$($(package)_extract_dir)=/usr
|
||||
|
|
|
@ -4,7 +4,6 @@ $(package)_version_protobuf_cpp=3.21.12
|
|||
$(package)_download_path=https://github.com/protocolbuffers/protobuf/releases/download/v$($(package)_version)/
|
||||
$(package)_file_name=protobuf-cpp-$($(package)_version_protobuf_cpp).tar.gz
|
||||
$(package)_sha256_hash=4eab9b524aa5913c6fffb20b2a8abf5ef7f95a80bc0701f3a6dbb4c607f73460
|
||||
$(package)_cxxflags=-std=c++11
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-shared --prefix=$(build_prefix)
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
package=openssl
|
||||
$(package)_version=3.0.13
|
||||
$(package)_download_path=https://www.openssl.org/source
|
||||
$(package)_version=3.4.0
|
||||
$(package)_download_path=https://github.com/openssl/openssl/releases/download/openssl-$($(package)_version)
|
||||
$(package)_file_name=$(package)-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=88525753f79d3bec27d2fa7c66aa0b92b3aa9498dafd93d7cfa4b3780cdae313
|
||||
|
||||
# The bundled ranlib in Android NDK 18b inserts timestamps by default.
|
||||
# To prevent reproducibility issues, we must enable [D]eterministic mode.
|
||||
$(package)_sha256_hash=e15dda82fe2fe8139dc2ac21a36d4ca01d5313c75f99f46c4e8a27709b7294bf
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)"
|
||||
$(package)_config_env_android=ANDROID_NDK_ROOT="$(host_prefix)/native" PATH="$(host_prefix)/native/bin" CC=clang AR=ar RANLIB="ranlib -D"
|
||||
$(package)_config_env=AR="$($(package)_ar)" ARFLAGS=$($(package)_arflags) RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)"
|
||||
$(package)_config_env_android=ANDROID_NDK_ROOT="$(host_prefix)/native" PATH="$(host_prefix)/native/bin" CC=clang AR=ar RANLIB=ranlib
|
||||
$(package)_build_env_android=ANDROID_NDK_ROOT="$(host_prefix)/native"
|
||||
$(package)_config_opts=--prefix=$(host_prefix) --openssldir=$(host_prefix)/etc/openssl --libdir=$(host_prefix)/lib
|
||||
$(package)_config_opts+=no-apps
|
||||
$(package)_config_opts+=no-capieng
|
||||
$(package)_config_opts+=no-dso
|
||||
$(package)_config_opts+=no-dtls1
|
||||
|
@ -28,9 +26,10 @@ $(package)_config_opts+=no-ssl3
|
|||
$(package)_config_opts+=no-tests
|
||||
$(package)_config_opts+=no-unit-test
|
||||
$(package)_config_opts+=no-weak-ssl-ciphers
|
||||
$(package)_config_opts+=no-winstore
|
||||
$(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
|
||||
|
@ -40,8 +39,7 @@ $(package)_config_opts_aarch64_linux=linux-generic64
|
|||
$(package)_config_opts_arm_android=--static android-arm
|
||||
$(package)_config_opts_aarch64_android=--static android-arm64
|
||||
$(package)_config_opts_aarch64_darwin=darwin64-arm64-cc
|
||||
$(package)_config_opts_riscv64_linux=linux-generic64
|
||||
$(package)_config_opts_loongarch64_linux=linux-generic64
|
||||
$(package)_config_opts_riscv64_linux=linux64-riscv64
|
||||
$(package)_config_opts_mipsel_linux=linux-generic32
|
||||
$(package)_config_opts_mips_linux=linux-generic32
|
||||
$(package)_config_opts_powerpc_linux=linux-generic32
|
||||
|
@ -52,11 +50,12 @@ $(package)_config_opts_x86_64_freebsd=BSD-x86_64
|
|||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
sed -i.old 's|crypto ssl apps util tools fuzz providers doc|crypto ssl util tools providers|' build.info
|
||||
sed -i.old 's|crypto ssl apps util tools fuzz providers doc|crypto ssl util tools providers|' build.info &&\
|
||||
rm -rf doc demos apps test
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
./Configure $($(package)_config_opts) ARFLAGS=$($(package)_arflags)
|
||||
./Configure $($(package)_config_opts)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
|
|
|
@ -5,7 +5,6 @@ $(package)_download_path=$(native_$(package)_download_path)
|
|||
$(package)_file_name=$(native_$(package)_file_name)
|
||||
$(package)_sha256_hash=$(native_$(package)_sha256_hash)
|
||||
$(package)_dependencies=native_$(package)
|
||||
$(package)_cxxflags=-std=c++11
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts=--disable-shared --with-protoc=$(build_prefix)/bin/protoc
|
||||
|
|
|
@ -8,7 +8,6 @@ define $(package)_set_vars
|
|||
$(package)_config_opts=--without-documentation --disable-shared --without-libsodium --disable-curve
|
||||
$(package)_config_opts_linux=--with-pic
|
||||
$(package)_config_opts_freebsd=--with-pic
|
||||
$(package)_cxxflags=-std=c++11
|
||||
endef
|
||||
|
||||
define $(package)_config_cmds
|
||||
|
|
Loading…
Reference in a new issue