summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Zacarias <gustavo@zacarias.com.ar>2013-12-02 13:00:11 (GMT)
committer Peter Korsgaard <peter@korsgaard.com>2013-12-08 19:58:22 (GMT)
commit429ffbd22530318462ff6600adf0f20310681531 (patch)
tree9e3d7ce7674afe1ce197e3af7eaf7db3d8c35cbe
parent5325b6c1d855c7b6a4122071f0d9ca786269b6f5 (diff)
downloadbuildroot-429ffbd22530318462ff6600adf0f20310681531.tar.gz
buildroot-429ffbd22530318462ff6600adf0f20310681531.tar.bz2
boost: add host variant
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rw-r--r--package/boost/boost.mk33
1 files changed, 33 insertions, 0 deletions
diff --git a/package/boost/boost.mk b/package/boost/boost.mk
index b0b3352..b97d12b 100644
--- a/package/boost/boost.mk
+++ b/package/boost/boost.mk
@@ -11,11 +11,19 @@ BOOST_SITE = http://downloads.sourceforge.net/project/boost/boost/$(BOOST_VERSIO
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+
@@ -54,6 +62,9 @@ ifeq ($(BR2_PACKAGE_BOOST_IOSTREAMS),y)
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) \
@@ -78,6 +89,12 @@ define BOOST_CONFIGURE_CMDS
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 \
@@ -86,6 +103,21 @@ define BOOST_INSTALL_TARGET_CMDS
--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 \
@@ -95,3 +127,4 @@ define BOOST_INSTALL_STAGING_CMDS
endef
$(eval $(generic-package))
+$(eval $(host-generic-package))