From ee10eb77db775c5080826eb8e7dd2621675088c1 Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Wed, 9 Oct 2019 11:12:55 -0400 Subject: [PATCH 01/15] build: Add variable printing target to Makefiles I kept finding myself needing these to debug our build system, since they are innocuous and are very helpful they probably belong in the codebase. Source: John Graham-Cumming https://www.cmcrossroads.com/article/printing-value-makefile-variable --- Makefile.am | 4 ++++ depends/Makefile | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Makefile.am b/Makefile.am index be3baaf41..0cbef9ee5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,6 +4,10 @@ # Distributed under the MIT software license, see the accompanying # file COPYING or https://www.opensource.org/licenses/mit-license.php . +# Pattern rule to print variables, e.g. make print-top_srcdir +print-%: + @echo $* = $($*) + ACLOCAL_AMFLAGS = -I build-aux/m4 SUBDIRS = src if ENABLE_MAN diff --git a/depends/Makefile b/depends/Makefile index 1a69d3e66..4abc1151b 100644 --- a/depends/Makefile +++ b/depends/Makefile @@ -1,5 +1,9 @@ .NOTPARALLEL : +# Pattern rule to print variables, e.g. make print-top_srcdir +print-%: + @echo $* = $($*) + SOURCES_PATH ?= $(BASEDIR)/sources BASE_CACHE ?= $(BASEDIR)/built SDK_PATH ?= $(BASEDIR)/SDKs From d64205350ddc23afad20778956ce60736e9a2939 Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Wed, 23 Oct 2019 11:45:11 -0400 Subject: [PATCH 02/15] depends: fix boost mac cross build with clang 9+ The ancient "darwin-4.9.1" profile has long been used to match against clang, which prior to version 9, reported 4.9.1 as its version when invoking "clang++ -dumpversion". Presumably this was a historical compatibility quirk related to Apple's switch from gcc to clang. This was "fixed" in clang 9.0, so that -dumpversion reports the real version. Unfortunately that had the side-effect of breaking the (brittle) boost compiler detection. Move to the seemingly more-correct "clang-darwin" profile, which passes the checks and builds correctly. Also switch to using ar rather than libtool for archiving, as it's what the clang-darwin profile expects to be using. Note that because this is using a different profile, some of the final command-line arguments end up changing. The changes look sane at a glance. --- depends/packages/boost.mk | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index 5ac5e31b0..4f2e1b397 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -15,15 +15,14 @@ $(package)_config_opts=--layout=system $(package)_config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1 $(package)_config_opts_linux=threadapi=pthread runtime-link=shared $(package)_config_opts_freebsd=cxxflags=-fPIC -$(package)_config_opts_darwin=--toolset=darwin-4.2.1 runtime-link=shared +$(package)_config_opts_darwin=--toolset=clang-darwin runtime-link=shared $(package)_config_opts_mingw32=binary-format=pe target-os=windows threadapi=win32 runtime-link=static $(package)_config_opts_x86_64_mingw32=address-model=64 $(package)_config_opts_i686_mingw32=address-model=32 $(package)_config_opts_i686_linux=address-model=32 architecture=x86 $(package)_toolset_$(host_os)=clang $(package)_archiver_$(host_os)=$($(package)_ar) -$(package)_toolset_darwin=darwin -$(package)_archiver_darwin=$($(package)_libtool) +$(package)_toolset_darwin=clang-darwin $(package)_config_libraries=chrono,filesystem,program_options,system,thread,test $(package)_cxxflags+=-std=c++17 -fvisibility=hidden $(package)_cxxflags_linux=-fPIC From 0226ea4647f9dd227c4889ce592092e4ac21398d Mon Sep 17 00:00:00 2001 From: Peter Bushnell Date: Thu, 16 Jan 2020 13:23:02 +0000 Subject: [PATCH 03/15] depends: Consistent use of package variable All other mk files use the package variable consistently except for the two instances here, which have always been here, since depends was introduced in 0.10. --- depends/packages/boost.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index 4f2e1b397..96404ed01 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -38,7 +38,7 @@ endef define $(package)_config_cmds ./bootstrap.sh --without-icu --with-libraries=$($(package)_config_libraries) && \ - sed -i -e "s|using gcc ;|using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : \"$($(package)_cxxflags) $($(package)_cppflags)\" \"$($(package)_ldflags)\" \"$(boost_archiver_$(host_os))\" \"$(host_STRIP)\" \"$(host_RANLIB)\" \"$(host_WINDRES)\" : ;|" project-config.jam + sed -i -e "s|using gcc ;|using $($(package)_toolset_$(host_os)) : : $($(package)_cxx) : \"$($(package)_cxxflags) $($(package)_cppflags)\" \"$($(package)_ldflags)\" \"$($(package)_archiver_$(host_os))\" \"$(host_STRIP)\" \"$(host_RANLIB)\" \"$(host_WINDRES)\" : ;|" project-config.jam endef define $(package)_build_cmds From 2c1c82f59a6228f7d599e5cc34f5e2813045d6be Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Wed, 29 Apr 2020 16:30:40 -0400 Subject: [PATCH 04/15] depends: Propagate well-known vars into depends For example, doing: make CC=clang CXX=clang++ Should now propagate these settings down to depends packages --- depends/hosts/default.mk | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/depends/hosts/default.mk b/depends/hosts/default.mk index a6f0f3a56..ec9ca3e63 100644 --- a/depends/hosts/default.mk +++ b/depends/hosts/default.mk @@ -19,9 +19,18 @@ $(host_os)_native_binutils?=native_clang $(host_os)_native_toolchain?=native_clang define add_host_tool_func +ifneq ($(filter $(origin $1),undefined default),) +# Do not consider the well-known var $1 if it is undefined or is taking a value +# that is predefined by "make" (e.g. the make variable "CC" has a predefined +# value of "cc") $(host_os)_$1?=$$(default_host_$1) $(host_arch)_$(host_os)_$1?=$$($(host_os)_$1) $(host_arch)_$(host_os)_$(release_type)_$1?=$$($(host_os)_$1) +else +$(host_os)_$1=$(or $($1),$($(host_os)_$1),$(default_host_$1)) +$(host_arch)_$(host_os)_$1=$(or $($1),$($(host_arch)_$(host_os)_$1),$$($(host_os)_$1)) +$(host_arch)_$(host_os)_$(release_type)_$1=$(or $($1),$($(host_arch)_$(host_os)_$(release_type)_$1),$$($(host_os)_$1)) +endif host_$1=$$($(host_arch)_$(host_os)_$1) endef From b3fe7d336e7107187e23ccccce3d8f9547351e66 Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Wed, 29 Apr 2020 16:32:20 -0400 Subject: [PATCH 05/15] depends: boost: Specify toolset to bootstrap.sh b2 will pickup our user-config.jam just fine, however, bootstrap.sh has its own toolset autodetect mechanism, which doesn't GAF about our user-config.jam Zcash: This also reverts b6d0996cecc15adb590241053e0b79bf33f2ecb4 which fixes a PIE linking error, but likely breaks FreeBSD build support. --- depends/packages/boost.mk | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index 96404ed01..a0702759f 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -11,7 +11,7 @@ endif define $(package)_set_vars $(package)_config_opts_release=variant=release $(package)_config_opts_debug=variant=debug -$(package)_config_opts=--layout=system +$(package)_config_opts=--layout=system --user-config=user-config.jam $(package)_config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1 $(package)_config_opts_linux=threadapi=pthread runtime-link=shared $(package)_config_opts_freebsd=cxxflags=-fPIC @@ -36,9 +36,12 @@ endif endef +define $(package)_preprocess_cmds + echo "using $($(package)_toolset_$(host_os)) : : $($(package)_cxx) : \"$($(package)_cxxflags) $($(package)_cppflags)\" \"$($(package)_ldflags)\" \"$($(package)_archiver_$(host_os))\" \"$(host_STRIP)\" \"$(host_RANLIB)\" \"$(host_WINDRES)\" : ;" > user-config.jam +endef + define $(package)_config_cmds - ./bootstrap.sh --without-icu --with-libraries=$($(package)_config_libraries) && \ - sed -i -e "s|using gcc ;|using $($(package)_toolset_$(host_os)) : : $($(package)_cxx) : \"$($(package)_cxxflags) $($(package)_cppflags)\" \"$($(package)_ldflags)\" \"$($(package)_archiver_$(host_os))\" \"$(host_STRIP)\" \"$(host_RANLIB)\" \"$(host_WINDRES)\" : ;|" project-config.jam + ./bootstrap.sh --without-icu --with-libraries=$($(package)_config_libraries) --with-toolset=$($(package)_toolset_$(host_os)) endef define $(package)_build_cmds From 96cf6da5b67fbc831fecfd78cb1aec520786416e Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Fri, 22 May 2020 17:00:53 -0400 Subject: [PATCH 06/15] depends: boost: Split target-os from toolset Previously, we specified the target-os in the toolset (and sometimes used the wrong command line flags), now we have a clear separation, which is favored by ./bootstrap.sh and ./b2. This means that all supported OSes will specify the correct target-os= and toolset= on the command line. --- depends/packages/boost.mk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index a0702759f..5f048c35a 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -13,16 +13,16 @@ $(package)_config_opts_release=variant=release $(package)_config_opts_debug=variant=debug $(package)_config_opts=--layout=system --user-config=user-config.jam $(package)_config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1 -$(package)_config_opts_linux=threadapi=pthread runtime-link=shared +$(package)_config_opts_linux=target-os=linux threadapi=pthread runtime-link=shared $(package)_config_opts_freebsd=cxxflags=-fPIC -$(package)_config_opts_darwin=--toolset=clang-darwin runtime-link=shared -$(package)_config_opts_mingw32=binary-format=pe target-os=windows threadapi=win32 runtime-link=static +$(package)_config_opts_darwin=target-os=darwin runtime-link=shared +$(package)_config_opts_mingw32=target-os=windows binary-format=pe threadapi=win32 runtime-link=static $(package)_config_opts_x86_64_mingw32=address-model=64 $(package)_config_opts_i686_mingw32=address-model=32 $(package)_config_opts_i686_linux=address-model=32 architecture=x86 $(package)_toolset_$(host_os)=clang +$(package)_toolset_darwin=clang $(package)_archiver_$(host_os)=$($(package)_ar) -$(package)_toolset_darwin=clang-darwin $(package)_config_libraries=chrono,filesystem,program_options,system,thread,test $(package)_cxxflags+=-std=c++17 -fvisibility=hidden $(package)_cxxflags_linux=-fPIC @@ -45,11 +45,11 @@ define $(package)_config_cmds endef define $(package)_build_cmds - ./b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) stage + ./b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) toolset=$($(package)_toolset_$(host_os)) stage endef define $(package)_stage_cmds - ./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) install + ./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) toolset=$($(package)_toolset_$(host_os)) install endef # Boost uses the MSVC convention of libboost_foo.lib as the naming pattern when From 9e997afd8478c9061c56d67e06b2733011358462 Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Fri, 22 May 2020 17:03:46 -0400 Subject: [PATCH 07/15] depends: boost: Use clang toolset if clang in CXX --- depends/packages/boost.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index 5f048c35a..6e8efc703 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -22,6 +22,9 @@ $(package)_config_opts_i686_mingw32=address-model=32 $(package)_config_opts_i686_linux=address-model=32 architecture=x86 $(package)_toolset_$(host_os)=clang $(package)_toolset_darwin=clang +ifneq (,$(findstring clang,$($(package)_cxx))) + $(package)_toolset_$(host_os)=clang +endif $(package)_archiver_$(host_os)=$($(package)_ar) $(package)_config_libraries=chrono,filesystem,program_options,system,thread,test $(package)_cxxflags+=-std=c++17 -fvisibility=hidden From 5c03db098392e84840cbaec8f11a966ea88af366 Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Wed, 27 May 2020 17:03:46 -0400 Subject: [PATCH 08/15] depends: Propagate only specific CLI variables to sub-makes We want to supply well-known vars to ./configure scripts to do with as they please. However, we do _not_ want to override these well-known vars at make-time as certain build systems expect a self-mangled version of these well-known vars. For example, freetype and bdb will prepend `libtool --mode=compile' to CC and CXX, which, if we override CC on the command line at make-time, will break the build. --- depends/Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/depends/Makefile b/depends/Makefile index 4abc1151b..85401b502 100644 --- a/depends/Makefile +++ b/depends/Makefile @@ -4,6 +4,30 @@ print-%: @echo $* = $($*) +# When invoking a sub-make, keep only the command line variable definitions +# matching the pattern in the filter function. +# +# e.g. invoking: +# $ make A=1 C=1 print-MAKEOVERRIDES print-MAKEFLAGS +# +# with the following in the Makefile: +# MAKEOVERRIDES := $(filter A=% B=%,$(MAKEOVERRIDES)) +# +# will print: +# MAKEOVERRIDES = A=1 +# MAKEFLAGS = -- A=1 +# +# this is because as the GNU make manual says: +# The command line variable definitions really appear in the variable +# MAKEOVERRIDES, and MAKEFLAGS contains a reference to this variable. +# +# and since the GNU make manual also says: +# variables defined on the command line are passed to the sub-make through +# MAKEFLAGS +# +# this means that sub-makes will be invoked as if: +# $(MAKE) A=1 blah blah +MAKEOVERRIDES := $(filter V=%,$(MAKEOVERRIDES)) SOURCES_PATH ?= $(BASEDIR)/sources BASE_CACHE ?= $(BASEDIR)/built SDK_PATH ?= $(BASEDIR)/SDKs From 63390e503c16f40f802ba736bbc49b74423c8da2 Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Sat, 8 Aug 2020 16:02:00 -0400 Subject: [PATCH 09/15] depends: boost: Refer to version in URL --- depends/packages/boost.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index 6e8efc703..c320567c9 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -1,6 +1,6 @@ package=boost $(package)_version=1_75_0 -$(package)_download_path=https://dl.bintray.com/boostorg/release/1.75.0/source +$(package)_download_path=https://dl.bintray.com/boostorg/release/$(subst _,.,$($(package)_version))/source/ $(package)_file_name=$(package)_$($(package)_version).tar.bz2 $(package)_sha256_hash=953db31e016db7bb207f11432bef7df100516eeb746843fa0486a222e3fd49cb From d5dfbe016d183df8d2783ac2dda92931da33dae6 Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Sat, 8 Aug 2020 16:23:14 -0400 Subject: [PATCH 10/15] depends: boost: Split into non-/native packages --- depends/packages/boost.mk | 11 ++++++----- depends/packages/native_b2.mk | 20 ++++++++++++++++++++ depends/packages/packages.mk | 2 ++ 3 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 depends/packages/native_b2.mk diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index c320567c9..3e4c74c81 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -1,11 +1,12 @@ package=boost $(package)_version=1_75_0 $(package)_download_path=https://dl.bintray.com/boostorg/release/$(subst _,.,$($(package)_version))/source/ -$(package)_file_name=$(package)_$($(package)_version).tar.bz2 +$(package)_file_name=boost_$($(package)_version).tar.bz2 $(package)_sha256_hash=953db31e016db7bb207f11432bef7df100516eeb746843fa0486a222e3fd49cb +$(package)_dependencies=native_b2 ifneq ($(host_os),darwin) -$(package)_dependencies=libcxx +$(package)_dependencies+=libcxx endif define $(package)_set_vars @@ -44,15 +45,15 @@ define $(package)_preprocess_cmds endef define $(package)_config_cmds - ./bootstrap.sh --without-icu --with-libraries=$($(package)_config_libraries) --with-toolset=$($(package)_toolset_$(host_os)) + ./bootstrap.sh --without-icu --with-libraries=$($(package)_config_libraries) --with-toolset=$($(package)_toolset_$(host_os)) --with-bjam=b2 endef define $(package)_build_cmds - ./b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) toolset=$($(package)_toolset_$(host_os)) stage + b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) toolset=$($(package)_toolset_$(host_os)) stage endef define $(package)_stage_cmds - ./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) toolset=$($(package)_toolset_$(host_os)) install + b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) toolset=$($(package)_toolset_$(host_os)) install endef # Boost uses the MSVC convention of libboost_foo.lib as the naming pattern when diff --git a/depends/packages/native_b2.mk b/depends/packages/native_b2.mk new file mode 100644 index 000000000..aaa37cdcf --- /dev/null +++ b/depends/packages/native_b2.mk @@ -0,0 +1,20 @@ +package=native_b2 +$(package)_version=$(boost_version) +$(package)_download_path=$(boost_download_path) +$(package)_file_name=$(boost_file_name) +$(package)_sha256_hash=$(boost_sha256_hash) +$(package)_build_subdir=tools/build/src/engine +ifneq (,$(findstring clang,$($(package)_cxx))) +$(package)_toolset_$(host_os)=clang +else +$(package)_toolset_$(host_os)=gcc +endif + +define $(package)_build_cmds + CXX="$($(package)_cxx)" CXXFLAGS="$($(package)_cxxflags)" ./build.sh "$($(package)_toolset_$(host_os))" +endef + +define $(package)_stage_cmds + mkdir -p "$($(package)_staging_prefix_dir)"/bin/ && \ + cp b2 "$($(package)_staging_prefix_dir)"/bin/ +endef diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk index 3ab9925c7..b7407c861 100644 --- a/depends/packages/packages.mk +++ b/depends/packages/packages.mk @@ -4,6 +4,8 @@ native_packages := native_clang native_ccache native_rust wallet_packages=bdb +$(host_arch)_$(host_os)_native_packages += native_b2 + ifneq ($(build_os),darwin) darwin_native_packages=native_cctools endif From 44f95d404394dabe315b3a656a511bdc4622288f Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Sat, 8 Aug 2020 17:30:59 -0400 Subject: [PATCH 11/15] depends: boost: Disable all compression --- depends/packages/boost.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index 3e4c74c81..97ce09017 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -13,7 +13,7 @@ define $(package)_set_vars $(package)_config_opts_release=variant=release $(package)_config_opts_debug=variant=debug $(package)_config_opts=--layout=system --user-config=user-config.jam -$(package)_config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1 +$(package)_config_opts+=threading=multi link=static -sNO_COMPRESSION=1 $(package)_config_opts_linux=target-os=linux threadapi=pthread runtime-link=shared $(package)_config_opts_freebsd=cxxflags=-fPIC $(package)_config_opts_darwin=target-os=darwin runtime-link=shared From 7f1598ad114cd3f8edff2909e21704c7522f3044 Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Sat, 8 Aug 2020 17:31:58 -0400 Subject: [PATCH 12/15] depends: boost: Cleanup architecture/address-model --- depends/packages/boost.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index 97ce09017..3fd240317 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -18,11 +18,12 @@ $(package)_config_opts_linux=target-os=linux threadapi=pthread runtime-link=shar $(package)_config_opts_freebsd=cxxflags=-fPIC $(package)_config_opts_darwin=target-os=darwin runtime-link=shared $(package)_config_opts_mingw32=target-os=windows binary-format=pe threadapi=win32 runtime-link=static -$(package)_config_opts_x86_64_mingw32=address-model=64 -$(package)_config_opts_i686_mingw32=address-model=32 -$(package)_config_opts_i686_linux=address-model=32 architecture=x86 $(package)_toolset_$(host_os)=clang $(package)_toolset_darwin=clang +$(package)_config_opts_x86_64=architecture=x86 address-model=64 +$(package)_config_opts_i686=architecture=x86 address-model=32 +$(package)_config_opts_aarch64=address-model=64 +$(package)_config_opts_armv7a=address-model=32 ifneq (,$(findstring clang,$($(package)_cxx))) $(package)_toolset_$(host_os)=clang endif From 80205dcad5081bb28e5c64558a8815fd10880ca1 Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Sat, 8 Aug 2020 17:32:37 -0400 Subject: [PATCH 13/15] depends: boost: Cleanup toolset selection --- depends/packages/boost.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index 3fd240317..5782a84fd 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -18,14 +18,14 @@ $(package)_config_opts_linux=target-os=linux threadapi=pthread runtime-link=shar $(package)_config_opts_freebsd=cxxflags=-fPIC $(package)_config_opts_darwin=target-os=darwin runtime-link=shared $(package)_config_opts_mingw32=target-os=windows binary-format=pe threadapi=win32 runtime-link=static -$(package)_toolset_$(host_os)=clang -$(package)_toolset_darwin=clang $(package)_config_opts_x86_64=architecture=x86 address-model=64 $(package)_config_opts_i686=architecture=x86 address-model=32 $(package)_config_opts_aarch64=address-model=64 $(package)_config_opts_armv7a=address-model=32 ifneq (,$(findstring clang,$($(package)_cxx))) - $(package)_toolset_$(host_os)=clang +$(package)_toolset_$(host_os)=clang +else +$(package)_toolset_$(host_os)=gcc endif $(package)_archiver_$(host_os)=$($(package)_ar) $(package)_config_libraries=chrono,filesystem,program_options,system,thread,test From cf70d2eb5c0fcad4fc35634a6b629e32d109d7e5 Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Sat, 8 Aug 2020 17:33:07 -0400 Subject: [PATCH 14/15] depends: boost: Remove unnecessary _archiver_ We already have $(package)_ar, so just use that instead --- depends/packages/boost.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index 5782a84fd..ee7c0e1fc 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -27,7 +27,6 @@ $(package)_toolset_$(host_os)=clang else $(package)_toolset_$(host_os)=gcc endif -$(package)_archiver_$(host_os)=$($(package)_ar) $(package)_config_libraries=chrono,filesystem,program_options,system,thread,test $(package)_cxxflags+=-std=c++17 -fvisibility=hidden $(package)_cxxflags_linux=-fPIC @@ -42,7 +41,7 @@ endif endef define $(package)_preprocess_cmds - echo "using $($(package)_toolset_$(host_os)) : : $($(package)_cxx) : \"$($(package)_cxxflags) $($(package)_cppflags)\" \"$($(package)_ldflags)\" \"$($(package)_archiver_$(host_os))\" \"$(host_STRIP)\" \"$(host_RANLIB)\" \"$(host_WINDRES)\" : ;" > user-config.jam + echo "using $($(package)_toolset_$(host_os)) : : $($(package)_cxx) : \"$($(package)_cxxflags) $($(package)_cppflags)\" \"$($(package)_ldflags)\" \"$($(package)_ar)\" \"$(host_STRIP)\" \"$(host_RANLIB)\" \"$(host_WINDRES)\" : ;" > user-config.jam endef define $(package)_config_cmds From 98ce8f838dcee3efa9389763bb13b89f20ee953d Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Sat, 8 Aug 2020 17:33:57 -0400 Subject: [PATCH 15/15] depends: boost: Specify cflags+compileflags --- depends/packages/boost.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index ee7c0e1fc..68bfe952c 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -41,7 +41,7 @@ endif endef define $(package)_preprocess_cmds - echo "using $($(package)_toolset_$(host_os)) : : $($(package)_cxx) : \"$($(package)_cxxflags) $($(package)_cppflags)\" \"$($(package)_ldflags)\" \"$($(package)_ar)\" \"$(host_STRIP)\" \"$(host_RANLIB)\" \"$(host_WINDRES)\" : ;" > user-config.jam + echo "using $($(package)_toolset_$(host_os)) : : $($(package)_cxx) : \"$($(package)_cflags)\" \"$($(package)_cxxflags)\" \"$($(package)_cppflags)\" \"$($(package)_ldflags)\" \"$($(package)_ar)\" \"$(host_STRIP)\" \"$(host_RANLIB)\" \"$(host_WINDRES)\" : ;" > user-config.jam endef define $(package)_config_cmds