All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] boost: build a standalone boost.build
@ 2020-10-06 11:14 Ross Burton
  2020-10-06 11:14 ` [PATCH 2/3] boost: don't specify gcc version Ross Burton
  2020-10-06 11:14 ` [PATCH 3/3] boost: consolidate and update library list Ross Burton
  0 siblings, 2 replies; 7+ messages in thread
From: Ross Burton @ 2020-10-06 11:14 UTC (permalink / raw)
  To: openembedded-core

Boost is a huge unirepo made from multiple submodules. To bootstrap it we
need boost.build (previously bjam) which is also available as a solo
repository. This smaller repository can unpack/build/package faster than
the Boost unirepo can unpack.

Rename the recipe to the current name of Boost.Build that installs a b2
binary, use the solo repository, and update the Boost recipe to use
the b2 binary instead of bjam.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/conf/distro/include/maintainers.inc      |  2 +-
 .../boost/bjam-native_1.74.0.bb               | 18 ---------------
 .../boost/boost-build-native_4.3.0.bb         | 23 +++++++++++++++++++
 meta/recipes-support/boost/boost.inc          |  8 +++----
 4 files changed, 28 insertions(+), 23 deletions(-)
 delete mode 100644 meta/recipes-support/boost/bjam-native_1.74.0.bb
 create mode 100644 meta/recipes-support/boost/boost-build-native_4.3.0.bb

diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index 5a3f913b0f..7935f968c7 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -70,12 +70,12 @@ RECIPE_MAINTAINER_pn-binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "Khem R
 RECIPE_MAINTAINER_pn-binutils-cross-testsuite = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-binutils-crosssdk-${SDK_SYS} = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-bison = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-bjam-native = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-blktool = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER_pn-blktrace = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-bluez5 = "Anuj Mittal <anuj.mittal@intel.com>"
 RECIPE_MAINTAINER_pn-bmap-tools = "Anuj Mittal <anuj.mittal@intel.com>"
 RECIPE_MAINTAINER_pn-boost = "Alexander Kanavin <alex.kanavin@gmail.com>"
+RECIPE_MAINTAINER_pn-boost-build-native = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-bootchart2 = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER_pn-bsd-headers = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER_pn-btrfs-tools = "Wang Mingyu <wangmy@cn.fujitsu.com>"
diff --git a/meta/recipes-support/boost/bjam-native_1.74.0.bb b/meta/recipes-support/boost/bjam-native_1.74.0.bb
deleted file mode 100644
index c0eeed60b0..0000000000
--- a/meta/recipes-support/boost/bjam-native_1.74.0.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require boost-${PV}.inc
-
-SUMMARY = "Portable Boost.Jam build tool for boost"
-SECTION = "devel"
-
-inherit native
-
-do_compile() {
-    ./bootstrap.sh --with-toolset=gcc
-}
-
-do_install() {
-    install -d ${D}${bindir}/
-    install b2 ${D}${bindir}/bjam
-}
-
-# The build is either release mode (pre-stripped) or debug (-O0).
-INSANE_SKIP_${PN} = "already-stripped"
diff --git a/meta/recipes-support/boost/boost-build-native_4.3.0.bb b/meta/recipes-support/boost/boost-build-native_4.3.0.bb
new file mode 100644
index 0000000000..d8096de5af
--- /dev/null
+++ b/meta/recipes-support/boost/boost-build-native_4.3.0.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Boost.Build"
+SECTION = "devel"
+
+LICENSE = "BSL-1.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
+
+SRC_URI = "git://github.com/boostorg/build;protocol=https"
+SRCREV = "632ea768f3eb225b4472c5ed6d20afee708724ad"
+
+inherit native
+
+S = "${WORKDIR}/git"
+
+do_compile() {
+    ./bootstrap.sh
+}
+
+do_install() {
+    ./b2 install --prefix=${prefix} staging-prefix=${D}${prefix}
+}
+
+# The build is either release mode (pre-stripped) or debug (-O0).
+INSANE_SKIP_${PN} = "already-stripped"
diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc
index ea1bc123b8..e74c7d6f7d 100644
--- a/meta/recipes-support/boost/boost.inc
+++ b/meta/recipes-support/boost/boost.inc
@@ -1,6 +1,6 @@
 SUMMARY = "Free peer-reviewed portable C++ source libraries"
 SECTION = "libs"
-DEPENDS = "bjam-native zlib bzip2"
+DEPENDS = "boost-build-native zlib bzip2"
 
 CVE_PRODUCT = "boost:boost"
 
@@ -180,7 +180,7 @@ do_configure() {
 		echo "using mpi : : <find-shared-library>mpi ;" >> ${WORKDIR}/user-config.jam
 	fi
 
-	CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" ./bootstrap.sh --with-bjam=bjam --with-toolset=gcc
+	CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" ./bootstrap.sh --with-bjam=b2 --with-toolset=gcc
 
 	# Boost can't be trusted to find Python on it's own, so remove any mention
 	# of it from the boost configuration
@@ -189,7 +189,7 @@ do_configure() {
 
 do_compile() {
 	cd ${S}
-	bjam ${BJAM_OPTS} \
+	b2 ${BJAM_OPTS} \
 		--prefix=${prefix} \
 		--exec-prefix=${exec_prefix} \
 		--libdir=${libdir} \
@@ -199,7 +199,7 @@ do_compile() {
 
 do_install() {
 	cd ${S}
-	bjam ${BJAM_OPTS} \
+	b2 ${BJAM_OPTS} \
 		--libdir=${D}${libdir} \
 		--includedir=${D}${includedir} \
 		install
-- 
2.25.1


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

* [PATCH 2/3] boost: don't specify gcc version
  2020-10-06 11:14 [PATCH 1/3] boost: build a standalone boost.build Ross Burton
@ 2020-10-06 11:14 ` Ross Burton
  2020-10-06 16:13   ` [OE-core] " Khem Raj
  2020-10-06 11:14 ` [PATCH 3/3] boost: consolidate and update library list Ross Burton
  1 sibling, 1 reply; 7+ messages in thread
From: Ross Burton @ 2020-10-06 11:14 UTC (permalink / raw)
  To: openembedded-core

From: Ross Burton <ross.burton@intel.com>

There's no need to specify an ancient GCC version here as Boost will
probe it.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/recipes-support/boost/boost.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc
index e74c7d6f7d..89df754744 100644
--- a/meta/recipes-support/boost/boost.inc
+++ b/meta/recipes-support/boost/boost.inc
@@ -169,7 +169,7 @@ do_configure() {
 
 	# D2194:Fixing the failure of "error: duplicate initialization of gcc with the following parameters" during compilation.
 	rm -f ${WORKDIR}/user-config.jam
-	echo 'using gcc : 4.3.1 : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;' >> ${WORKDIR}/user-config.jam
+	echo 'using gcc : : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;' >> ${WORKDIR}/user-config.jam
 
 	# If we want Python then we need to tell Boost *exactly* where to find it
 	if ${@bb.utils.contains('BOOST_LIBS', 'python', 'true', 'false', d)}; then
-- 
2.25.1


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

* [PATCH 3/3] boost: consolidate and update library list
  2020-10-06 11:14 [PATCH 1/3] boost: build a standalone boost.build Ross Burton
  2020-10-06 11:14 ` [PATCH 2/3] boost: don't specify gcc version Ross Burton
@ 2020-10-06 11:14 ` Ross Burton
  1 sibling, 0 replies; 7+ messages in thread
From: Ross Burton @ 2020-10-06 11:14 UTC (permalink / raw)
  To: openembedded-core

Add some new libraries to the list (fiber, headers, type_erasure).

Move context/coroutine to the list instead of using overrides as it
builds everywhere I can test it.

Remove the mips16e override for wave as Boost fails so dramatically with
mips16e enabled that this isn't even close to a fix. Someone who cares
can fix this properly.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/recipes-support/boost/boost.inc | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc
index 89df754744..cbf9cad707 100644
--- a/meta/recipes-support/boost/boost.inc
+++ b/meta/recipes-support/boost/boost.inc
@@ -14,11 +14,15 @@ BOOST_LIBS = "\
 	atomic \
 	chrono \
 	container \
+	context \
 	contract \
+	coroutine \
 	date_time \
 	exception \
+	fiber \
 	filesystem \
 	graph \
+	headers \
 	iostreams \
 	log \
 	math \
@@ -27,23 +31,13 @@ BOOST_LIBS = "\
 	regex \
 	serialization \
 	system \
-	timer \
 	test \
 	thread \
+	timer \
+	type_erasure \
 	wave \
 	"
 
-# only supported by x86 and powerpc
-BOOST_LIBS_append_x86 = " context coroutine"
-BOOST_LIBS_append_x86-64 = " context coroutine"
-BOOST_LIBS_append_powerpc = " context coroutine"
-BOOST_LIBS_append_arm = " context coroutine"
-BOOST_LIBS_append_aarch64 = " context coroutine"
-# need consistent settings for native builds (x86 override not applied for native)
-BOOST_LIBS_remove_class-native = " context coroutine"
-# does not compile
-BOOST_LIBS_remove_mips16e = "wave"
-
 # optional libraries
 PACKAGECONFIG ??= "locale python"
 PACKAGECONFIG[locale] = ",,icu"
-- 
2.25.1


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

* Re: [OE-core] [PATCH 2/3] boost: don't specify gcc version
  2020-10-06 11:14 ` [PATCH 2/3] boost: don't specify gcc version Ross Burton
@ 2020-10-06 16:13   ` Khem Raj
  2020-10-06 19:45     ` Ross Burton
  0 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2020-10-06 16:13 UTC (permalink / raw)
  To: Ross Burton; +Cc: Patches and discussions about the oe-core layer

On Tue, Oct 6, 2020 at 4:14 AM Ross Burton <ross@burtonini.com> wrote:
>
> From: Ross Burton <ross.burton@intel.com>
>
> There's no need to specify an ancient GCC version here as Boost will
> probe it.
>
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
>  meta/recipes-support/boost/boost.inc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc
> index e74c7d6f7d..89df754744 100644
> --- a/meta/recipes-support/boost/boost.inc
> +++ b/meta/recipes-support/boost/boost.inc
> @@ -169,7 +169,7 @@ do_configure() {
>
>         # D2194:Fixing the failure of "error: duplicate initialization of gcc with the following parameters" during compilation.
>         rm -f ${WORKDIR}/user-config.jam
> -       echo 'using gcc : 4.3.1 : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;' >> ${WORKDIR}/user-config.jam
> +       echo 'using gcc : : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;' >> ${WORKDIR}/user-config.jam
>

does it probe the version from cross compiler now and not the host compiler ?

>         # If we want Python then we need to tell Boost *exactly* where to find it
>         if ${@bb.utils.contains('BOOST_LIBS', 'python', 'true', 'false', d)}; then
> --
> 2.25.1
>
>
> 
>

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

* Re: [OE-core] [PATCH 2/3] boost: don't specify gcc version
  2020-10-06 16:13   ` [OE-core] " Khem Raj
@ 2020-10-06 19:45     ` Ross Burton
  2020-10-08  8:31       ` Ross Burton
  0 siblings, 1 reply; 7+ messages in thread
From: Ross Burton @ 2020-10-06 19:45 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

On Tue, 6 Oct 2020 at 17:14, Khem Raj <raj.khem@gmail.com> wrote:
> does it probe the version from cross compiler now and not the host compiler ?

I shall triple check :)

Ross

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

* Re: [OE-core] [PATCH 2/3] boost: don't specify gcc version
  2020-10-06 19:45     ` Ross Burton
@ 2020-10-08  8:31       ` Ross Burton
  2020-10-08 16:06         ` Khem Raj
  0 siblings, 1 reply; 7+ messages in thread
From: Ross Burton @ 2020-10-08  8:31 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

From boost's log.do_compile:
notice: using rc compiler :: <toolset>gcc-10.2.0 :: as

On my host:
$ gcc --version
gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0

Ross

On Tue, 6 Oct 2020 at 20:45, Ross Burton <ross@burtonini.com> wrote:
>
> On Tue, 6 Oct 2020 at 17:14, Khem Raj <raj.khem@gmail.com> wrote:
> > does it probe the version from cross compiler now and not the host compiler ?
>
> I shall triple check :)
>
> Ross

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

* Re: [OE-core] [PATCH 2/3] boost: don't specify gcc version
  2020-10-08  8:31       ` Ross Burton
@ 2020-10-08 16:06         ` Khem Raj
  0 siblings, 0 replies; 7+ messages in thread
From: Khem Raj @ 2020-10-08 16:06 UTC (permalink / raw)
  To: Ross Burton; +Cc: Patches and discussions about the oe-core layer

Thanks should be good.

On Thu, Oct 8, 2020 at 1:32 AM Ross Burton <ross@burtonini.com> wrote:
>
> From boost's log.do_compile:
> notice: using rc compiler :: <toolset>gcc-10.2.0 :: as
>
> On my host:
> $ gcc --version
> gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0
>
> Ross
>
> On Tue, 6 Oct 2020 at 20:45, Ross Burton <ross@burtonini.com> wrote:
> >
> > On Tue, 6 Oct 2020 at 17:14, Khem Raj <raj.khem@gmail.com> wrote:
> > > does it probe the version from cross compiler now and not the host compiler ?
> >
> > I shall triple check :)
> >
> > Ross

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

end of thread, other threads:[~2020-10-08 16:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-06 11:14 [PATCH 1/3] boost: build a standalone boost.build Ross Burton
2020-10-06 11:14 ` [PATCH 2/3] boost: don't specify gcc version Ross Burton
2020-10-06 16:13   ` [OE-core] " Khem Raj
2020-10-06 19:45     ` Ross Burton
2020-10-08  8:31       ` Ross Burton
2020-10-08 16:06         ` Khem Raj
2020-10-06 11:14 ` [PATCH 3/3] boost: consolidate and update library list Ross Burton

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.