From patchwork Tue Jan 15 10:45:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 212086 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 8AB6A2C00A6 for ; Tue, 15 Jan 2013 21:45:48 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 744FFA0186; Tue, 15 Jan 2013 10:45:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Yi4svPDr-XO5; Tue, 15 Jan 2013 10:45:40 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 914ACA0154; Tue, 15 Jan 2013 10:45:38 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 6C5188F79A for ; Tue, 15 Jan 2013 10:45:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id EF3122020B for ; Tue, 15 Jan 2013 10:45:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vGivNeofSmdi for ; Tue, 15 Jan 2013 10:45:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (mail.free-electrons.com [94.23.35.102]) by silver.osuosl.org (Postfix) with ESMTP id 4A1F6201FA for ; Tue, 15 Jan 2013 10:45:32 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id 7BBC85EEF; Tue, 15 Jan 2013 11:45:30 +0100 (CET) Received: from localhost (humanoidz.org [82.247.183.72]) by mail.free-electrons.com (Postfix) with ESMTPSA id C7C8D2932 for ; Tue, 15 Jan 2013 11:45:29 +0100 (CET) From: Thomas Petazzoni To: buildroot@uclibc.org Date: Tue, 15 Jan 2013 11:45:26 +0100 Message-Id: <1358246728-5141-1-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 1.7.9.5 Subject: [Buildroot] [PATCH 1/3] boost: fix build problem by always building a threaded version X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Boost normally allows to build a non-threaded variant by passing threading=single or a multi-threaded variant by passing threading=multi. Unfortunately, the build of threading=single doesn't seem to work any more, due to bizarre things in the build system. We get "duplicate target" errors, that according to http://lists.boost.org/boost-build/2012/11/26582.php should appear if we ask for both threading=single,multi. But it seems to happen even in the threading=single case. Since Boost is such a big C++ beast, it probably doesn't make much sense to try to support it on toolchains that don't have thread support. So, we make the boost package depend on thread support. If someone cares enough in getting Boost to work in a non-threaded environment, then we can always revert back. Note that the boost package has no reverse dependencies in Buildroot, so we don't need to propagate this new dependency anywhere. Fixes: http://autobuild.buildroot.org/results/439e72ac74c8058f30977e6abc39acd6379a17d3/build-end.log Signed-off-by: Thomas Petazzoni --- package/boost/Config.in | 15 ++++++--------- package/boost/boost.mk | 4 ++-- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/package/boost/Config.in b/package/boost/Config.in index fb5360e..19dcc60 100644 --- a/package/boost/Config.in +++ b/package/boost/Config.in @@ -1,10 +1,14 @@ -comment "boost requires a toolchain with C++ and large file support enabled" - depends on !BR2_INSTALL_LIBSTDCPP || !BR2_LARGEFILE +comment "boost requires a toolchain with C++, large file and thread support enabled" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS config BR2_PACKAGE_BOOST bool "boost" depends on BR2_INSTALL_LIBSTDCPP depends on BR2_LARGEFILE + # Boost could theorically be built with threading=single, but + # that unfortunately doesn't work. Until someone fixes that, + # let's depend on threads. + depends on BR2_TOOLCHAIN_HAS_THREADS select BR2_PACKAGE_BZIP2 select BR2_PACKAGE_ZLIB help @@ -14,12 +18,6 @@ config BR2_PACKAGE_BOOST if BR2_PACKAGE_BOOST -config BR2_PACKAGE_BOOST_MULTITHREADED - depends on BR2_TOOLCHAIN_HAS_THREADS - bool "boost-multithreaded" - help - Build the boost libraries as multithreaded - config BR2_PACKAGE_BOOST_CHRONO bool "boost-chrono" @@ -76,7 +74,6 @@ config BR2_PACKAGE_BOOST_TEST bool "boost-test" config BR2_PACKAGE_BOOST_THREAD - depends on BR2_TOOLCHAIN_HAS_THREADS bool "boost-thread" config BR2_PACKAGE_BOOST_TIMER diff --git a/package/boost/boost.mk b/package/boost/boost.mk index 005c7ca..62226ba 100644 --- a/package/boost/boost.mk +++ b/package/boost/boost.mk @@ -46,10 +46,10 @@ BOOST_FLAGS += --without-icu endif BOOST_OPT += toolset=gcc \ + threading=multi \ variant=$(if $(BR2_ENABLE_DEBUG),debug,release) \ link=$(if $(BR2_PREFER_STATIC_LIB),static,shared) \ - runtime-link=$(if $(BR2_PREFER_STATIC_LIB),static,shared) \ - threading=$(if $(BR2_PACKAGE_BOOST_MULTITHREADED),multi,single) + runtime-link=$(if $(BR2_PREFER_STATIC_LIB),static,shared) ifeq ($(BR2_PACKAGE_BOOST_LOCALE),y) ifeq ($(BR2_TOOLCHAIN_BUILDROOT)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC)$(BR2_TOOLCHAIN_CTNG_uClibc),y)