All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] boost.mk: allow building both static and shared
@ 2015-10-25  9:52 Jonathan Ben-Avraham
  2015-10-26  6:29 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Ben-Avraham @ 2015-10-25  9:52 UTC (permalink / raw)
  To: buildroot

From: Jonathan Ben Avraham <yba@tkos.co.il>

Use BR2_SHARED_STATIC_LIBS for building both static and shared boost libs.
The static libs are copied to the staging directory. Only the shared libs are
copied to the rootfs image.

Signed-off-by: Jonathan Ben Avraham <yba@tkos.co.il>
---
 package/boost/boost.mk |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/package/boost/boost.mk b/package/boost/boost.mk
index 8159ed5..40a030b 100644
--- a/package/boost/boost.mk
+++ b/package/boost/boost.mk
@@ -90,8 +90,14 @@ BOOST_OPTS += toolset=gcc \
 	     threading=multi \
 	     abi=$(BOOST_ABI) \
 	     variant=$(if $(BR2_ENABLE_DEBUG),debug,release) \
-	     link=$(if $(BR2_STATIC_LIBS),static,shared) \
-	     runtime-link=$(if $(BR2_STATIC_LIBS),static,shared)
+
+ifeq ($(BR2_STATIC_LIBS),y)
+BOOST_OPTS += link=static runtime-link=static
+else ifeq ($(BR2_SHARED_LIBS),y)
+BOOST_OPTS += link=shared runtime-link=shared
+else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
+# no additional BOOST_OPTS
+endif
 
 ifeq ($(BR2_PACKAGE_BOOST_LOCALE),y)
 ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH 1/1] boost.mk: allow building both static and shared
  2015-10-25  9:52 [Buildroot] [PATCH 1/1] boost.mk: allow building both static and shared Jonathan Ben-Avraham
@ 2015-10-26  6:29 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2015-10-26  6:29 UTC (permalink / raw)
  To: buildroot

Dear Jonathan Ben-Avraham,

On Sun, 25 Oct 2015 11:52:53 +0200, Jonathan Ben-Avraham wrote:
> From: Jonathan Ben Avraham <yba@tkos.co.il>
> 
> Use BR2_SHARED_STATIC_LIBS for building both static and shared boost libs.
> The static libs are copied to the staging directory. Only the shared libs are
> copied to the rootfs image.
> 
> Signed-off-by: Jonathan Ben Avraham <yba@tkos.co.il>
> ---
>  package/boost/boost.mk |   10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)

Applied, with some slight changes:

    [Thomas:
     - remove empty else clause, and instead add a comment that explains
       why we're doing something only for the BR2_STATIC_LIBS=y and
       BR2_SHARED_LIBS=y.
     - remove trailing backslash at the end of the BOOST_CONF_OPTS
       definition.]

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-26  6:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-25  9:52 [Buildroot] [PATCH 1/1] boost.mk: allow building both static and shared Jonathan Ben-Avraham
2015-10-26  6:29 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.