BOOST_INSTALL_STAGING = YES
TARGET_CC_VERSION = $(shell $(TARGET_CC) -dumpversion)
+HOST_CC_VERSION = $(shell $(HOSTCC) -dumpversion)
BOOST_DEPENDENCIES =
BOOST_FLAGS =
+# keep host variant as minimal as possible
+HOST_BOOST_FLAGS = --without-icu \
+ --without-libraries=$(subst $(space),$(comma),atomic chrono context \
+ coroutine date_time exception filesystem graph graph_parallel \
+ iostreams locale log math mpi program_options python random regex \
+ serialization signals system test thread timer wave)
+
# atomic library compile only with upstream version, wait for next release
# coroutine breaks on some weak toolchains and it's new for 1.54+
# log breaks with some toolchain combinations and it's new for 1.54+
BOOST_DEPENDENCIES += bzip2 zlib
endif
+HOST_BOOST_OPT += toolset=gcc threading=multi variant=release link=shared \
+ runtime-link=shared
+
BOOST_OPT += toolset=gcc \
threading=multi \
variant=$(if $(BR2_ENABLE_DEBUG),debug,release) \
echo "" >> $(@D)/user-config.jam
endef
+define HOST_BOOST_CONFIGURE_CMDS
+ (cd $(@D) && ./bootstrap.sh $(HOST_BOOST_FLAGS))
+ echo "using gcc : $(HOST_CC_VERSION) : $(HOSTCXX) : <cxxflags>\"$(HOST_CXXFLAGS)\" <linkflags>\"$(HOST_LDFLAGS)\" ;" > $(@D)/user-config.jam
+ echo "" >> $(@D)/user-config.jam
+endef
+
define BOOST_INSTALL_TARGET_CMDS
(cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q -d+1 \
--user-config=$(@D)/user-config.jam \
--layout=system install )
endef
+define HOST_BOOST_BUILD_CMDS
+ (cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q -d+1 \
+ --user-config=$(@D)/user-config.jam \
+ $(HOST_BOOST_OPT) \
+ --prefix=$(HOST_DIR)/usr )
+endef
+
+define HOST_BOOST_INSTALL_CMDS
+ (cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q -d+1 \
+ --user-config=$(@D)/user-config.jam \
+ $(HOST_BOOST_OPT) \
+ --prefix=$(HOST_DIR)/usr \
+ --layout=system install )
+endef
+
define BOOST_INSTALL_STAGING_CMDS
(cd $(@D) && ./bjam -j$(PARALLEL_JOBS) -d+1 \
--user-config=$(@D)/user-config.jam \
endef
$(eval $(generic-package))
+$(eval $(host-generic-package))