* [PATCHv3 141/141] boost-asio: Add recipe
@ 2026-08-28 11:53 Gustav Lindberg
2026-08-29 5:54 ` [OE-core] " Mathieu Dubois-Briand
0 siblings, 1 reply; 3+ messages in thread
From: Gustav Lindberg @ 2026-08-28 11:53 UTC (permalink / raw)
To: openembedded-core; +Cc: Gustav Lindberg
This is needed to build boost asio as a shared library rather than a
header-only library, which is needed to save memory.
Signed-off-by: Gustav Lindberg <gustali@axis.com>
---
.../boost/boost-asio/boost_asio.cpp | 1 +
.../boost/boost-asio_1.90.0.bb | 31 +++++++++++++++++++
2 files changed, 32 insertions(+)
create mode 100644 meta/recipes-support/boost/boost-asio/boost_asio.cpp
create mode 100644 meta/recipes-support/boost/boost-asio_1.90.0.bb
diff --git a/meta/recipes-support/boost/boost-asio/boost_asio.cpp b/meta/recipes-support/boost/boost-asio/boost_asio.cpp
new file mode 100644
index 0000000000..bf00c8ff26
--- /dev/null
+++ b/meta/recipes-support/boost/boost-asio/boost_asio.cpp
@@ -0,0 +1 @@
+#include <boost/asio/impl/src.hpp>
diff --git a/meta/recipes-support/boost/boost-asio_1.90.0.bb b/meta/recipes-support/boost/boost-asio_1.90.0.bb
new file mode 100644
index 0000000000..9630d99e42
--- /dev/null
+++ b/meta/recipes-support/boost/boost-asio_1.90.0.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Boost.Asio shared library shim"
+DESCRIPTION = "Builds libboost_asio as a shared library from boost/asio/impl/src.hpp"
+HOMEPAGE = "https://www.boost.org/doc/libs/1_90_0/doc/html/boost_asio.html"
+
+DEPENDS = "boost"
+
+# Reuse Boost source and licensing metadata.
+require recipes-support/boost/boost-${PV}.inc
+
+SRC_URI += " file://boost_asio.cpp"
+
+do_compile() {
+ ${CXX} ${CPPFLAGS} ${CXXFLAGS} \
+ -std=c++23 \
+ -DBOOST_ASIO_DYN_LINK=1 \
+ -fPIC \
+ -shared \
+ -Wl,-soname,libboost_asio.so.1 \
+ ${UNPACKDIR}/boost_asio.cpp \
+ ${LDFLAGS} \
+ -o ${B}/libboost_asio.so.${PV}
+}
+
+do_install() {
+ install -d ${D}${libdir}
+ install -m 0755 ${B}/libboost_asio.so.${PV} ${D}${libdir}/
+ ln -sf libboost_asio.so.${PV} ${D}${libdir}/libboost_asio.so.1
+ ln -sf libboost_asio.so.${@oe.utils.trim_version("${PV}", 1)} ${D}${libdir}/libboost_asio.so
+}
+
+BBCLASSEXTEND = "native"
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCHv3 141/141] boost-asio: Add recipe
2026-08-28 11:53 [PATCHv3 141/141] boost-asio: Add recipe Gustav Lindberg
@ 2026-08-29 5:54 ` Mathieu Dubois-Briand
0 siblings, 0 replies; 3+ messages in thread
From: Mathieu Dubois-Briand @ 2026-08-29 5:54 UTC (permalink / raw)
To: gustali, openembedded-core
Hi Gustav,
On Fri Aug 28, 2026 at 1:53 PM CEST, Gustav Lindberg via lists.openembedded.org wrote:
> This is needed to build boost asio as a shared library rather than a
> header-only library, which is needed to save memory.
>
> Signed-off-by: Gustav Lindberg <gustali@axis.com>
> ---
> .../boost/boost-asio/boost_asio.cpp | 1 +
> .../boost/boost-asio_1.90.0.bb | 31 +++++++++++++++++++
> 2 files changed, 32 insertions(+)
> create mode 100644 meta/recipes-support/boost/boost-asio/boost_asio.cpp
> create mode 100644 meta/recipes-support/boost/boost-asio_1.90.0.bb
>
> diff --git a/meta/recipes-support/boost/boost-asio/boost_asio.cpp b/meta/recipes-support/boost/boost-asio/boost_asio.cpp
> new file mode 100644
> index 0000000000..bf00c8ff26
> --- /dev/null
> +++ b/meta/recipes-support/boost/boost-asio/boost_asio.cpp
> @@ -0,0 +1 @@
> +#include <boost/asio/impl/src.hpp>
> diff --git a/meta/recipes-support/boost/boost-asio_1.90.0.bb b/meta/recipes-support/boost/boost-asio_1.90.0.bb
> new file mode 100644
> index 0000000000..9630d99e42
> --- /dev/null
> +++ b/meta/recipes-support/boost/boost-asio_1.90.0.bb
> @@ -0,0 +1,31 @@
> +SUMMARY = "Boost.Asio shared library shim"
> +DESCRIPTION = "Builds libboost_asio as a shared library from boost/asio/impl/src.hpp"
> +HOMEPAGE = "https://www.boost.org/doc/libs/1_90_0/doc/html/boost_asio.html"
> +
> +DEPENDS = "boost"
> +
> +# Reuse Boost source and licensing metadata.
> +require recipes-support/boost/boost-${PV}.inc
Currently we have a boost-1.92.0.in file, so this will fail.
Thanks,
Mathieu
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCHv3 141/141] boost-asio: Add recipe
@ 2026-08-31 8:09 Gustav Lindberg
0 siblings, 0 replies; 3+ messages in thread
From: Gustav Lindberg @ 2026-08-31 8:09 UTC (permalink / raw)
To: openembedded-core; +Cc: Gustav Lindberg
This is needed to build boost asio as a shared library rather than a
header-only library, which is needed to save memory.
Signed-off-by: Gustav Lindberg <gustali@axis.com>
---
.../boost/boost-asio/boost_asio.cpp | 1 +
.../boost/boost-asio_1.90.0.bb | 31 +++++++++++++++++++
2 files changed, 32 insertions(+)
create mode 100644 meta/recipes-support/boost/boost-asio/boost_asio.cpp
create mode 100644 meta/recipes-support/boost/boost-asio_1.90.0.bb
diff --git a/meta/recipes-support/boost/boost-asio/boost_asio.cpp b/meta/recipes-support/boost/boost-asio/boost_asio.cpp
new file mode 100644
index 0000000000..bf00c8ff26
--- /dev/null
+++ b/meta/recipes-support/boost/boost-asio/boost_asio.cpp
@@ -0,0 +1 @@
+#include <boost/asio/impl/src.hpp>
diff --git a/meta/recipes-support/boost/boost-asio_1.90.0.bb b/meta/recipes-support/boost/boost-asio_1.90.0.bb
new file mode 100644
index 0000000000..9630d99e42
--- /dev/null
+++ b/meta/recipes-support/boost/boost-asio_1.90.0.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Boost.Asio shared library shim"
+DESCRIPTION = "Builds libboost_asio as a shared library from boost/asio/impl/src.hpp"
+HOMEPAGE = "https://www.boost.org/doc/libs/1_90_0/doc/html/boost_asio.html"
+
+DEPENDS = "boost"
+
+# Reuse Boost source and licensing metadata.
+require recipes-support/boost/boost-${PV}.inc
+
+SRC_URI += " file://boost_asio.cpp"
+
+do_compile() {
+ ${CXX} ${CPPFLAGS} ${CXXFLAGS} \
+ -std=c++23 \
+ -DBOOST_ASIO_DYN_LINK=1 \
+ -fPIC \
+ -shared \
+ -Wl,-soname,libboost_asio.so.1 \
+ ${UNPACKDIR}/boost_asio.cpp \
+ ${LDFLAGS} \
+ -o ${B}/libboost_asio.so.${PV}
+}
+
+do_install() {
+ install -d ${D}${libdir}
+ install -m 0755 ${B}/libboost_asio.so.${PV} ${D}${libdir}/
+ ln -sf libboost_asio.so.${PV} ${D}${libdir}/libboost_asio.so.1
+ ln -sf libboost_asio.so.${@oe.utils.trim_version("${PV}", 1)} ${D}${libdir}/libboost_asio.so
+}
+
+BBCLASSEXTEND = "native"
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-31 8:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-28 11:53 [PATCHv3 141/141] boost-asio: Add recipe Gustav Lindberg
2026-08-29 5:54 ` [OE-core] " Mathieu Dubois-Briand
-- strict thread matches above, loose matches on Subject: below --
2026-08-31 8:09 Gustav Lindberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox