boost.mk: allow building both static and shared
PATCH 1/1 boost.mk: allow building both static and shared
From: Jonathan Ben Avraham <[email protected]>
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.
--- package/boost/boost.mk | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
package/boost/boost.mk +8 -2
@@ -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)
Signature · 1 line
1.7.9.5
Thomas Petazzoni
AppliedPATCH 1/1 boost.mk: allow building both static and shared
Dear Jonathan Ben-Avraham,
Quoted 10 lines · Jonathan Ben-Avraham
From: Jonathan Ben Avraham <[email protected]>
Use
BR2_SHARED_STATIC_LIBSfor 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 <[email protected]>--- 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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com