All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Cercueil <paul@crapouillou.net>
To: buildroot@buildroot.org
Cc: Paul Cercueil <paul@crapouillou.net>
Subject: [Buildroot] [PATCH 1/1] package/boost: add option to force static build
Date: Mon, 20 Jun 2022 12:55:10 +0100	[thread overview]
Message-ID: <20220620115510.33792-1-paul@crapouillou.net> (raw)

This option can be useful when building for a system that
needs to somewhat maintain compatibility with previously built
software, as Boost is notorious for breaking ABI at every
single release.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 package/boost/Config.in | 11 +++++++++++
 package/boost/boost.mk  |  2 +-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/package/boost/Config.in b/package/boost/Config.in
index b99b01f22e..60eb83ff4c 100644
--- a/package/boost/Config.in
+++ b/package/boost/Config.in
@@ -16,6 +16,17 @@ config BR2_PACKAGE_BOOST
 
 if BR2_PACKAGE_BOOST
 
+config BR2_PACKAGE_BOOST_STATIC
+	bool "Build static libraries"
+	depends on BR2_SHARED_LIBS
+	help
+	  Build static Boost libraries.
+
+	  This option can be useful when building for a system that
+	  needs to somewhat maintain compatibility with previously built
+	  software, as Boost is notorious for breaking ABI at every
+	  single release.
+
 config BR2_PACKAGE_BOOST_ATOMIC
 	bool "boost-atomic"
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
diff --git a/package/boost/boost.mk b/package/boost/boost.mk
index f6e9a03220..162277b968 100644
--- a/package/boost/boost.mk
+++ b/package/boost/boost.mk
@@ -109,7 +109,7 @@ endif
 
 # By default, Boost build and installs both the shared and static
 # variants. Override that if we want static only or shared only.
-ifeq ($(BR2_STATIC_LIBS),y)
+ifeq ($(BR2_STATIC_LIBS)$(BR2_PACKAGE_BOOST_STATIC),y)
 BOOST_OPTS += link=static runtime-link=static
 else ifeq ($(BR2_SHARED_LIBS),y)
 BOOST_OPTS += link=shared runtime-link=shared
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

             reply	other threads:[~2022-06-20 12:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-20 11:55 Paul Cercueil [this message]
2022-07-27 15:06 ` [Buildroot] [PATCH 1/1] package/boost: add option to force static build Romain Naour
2022-07-27 15:42   ` Paul Cercueil
2022-07-27 15:57     ` Yann E. MORIN
2022-07-27 16:49       ` Paul Cercueil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220620115510.33792-1-paul@crapouillou.net \
    --to=paul@crapouillou.net \
    --cc=buildroot@buildroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.