From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 1/2] tbb: new package
Date: Thu, 12 Oct 2017 22:45:26 +0200 [thread overview]
Message-ID: <20171012224526.132fc274@windsurf.home> (raw)
In-Reply-To: <20170928235043.31891-2-bradford@density.io>
Hello,
On Thu, 28 Sep 2017 19:50:42 -0400, Bradford Barr wrote:
> diff --git a/package/tbb/0001-cross-compile.patch b/package/tbb/0001-cross-compile.patch
> new file mode 100644
> index 0000000..7c57603
> --- /dev/null
> +++ b/package/tbb/0001-cross-compile.patch
> @@ -0,0 +1,41 @@
> +Author: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
This patch should be Git formatted and have a proper commit title and
description.
> diff --git a/package/tbb/Config.in b/package/tbb/Config.in
> new file mode 100644
> index 0000000..eda1f09
> --- /dev/null
> +++ b/package/tbb/Config.in
> @@ -0,0 +1,16 @@
> +config BR2_PACKAGE_TBB
> + bool "tbb"
> + depends on !BR2_STATIC_LIBS
> + depends on BR2_INSTALL_LIBSTDCPP
> + depends on BR2_TOOLCHAIN_HAS_THREADS
> + depends on BR2_TOOLCHAIN_USES_GLIBC
> + help
> + Intel(R) Threading Building Blocks (Intel(R) TBB) lets you
> + easily write parallel C++ programs that take full advantage
> + of multicore performance, that are portable, composable and
> + have future-proof scalability.
> +
> + https://www.threadingbuildingblocks.org/
> +
> +comment "tbb needs a toolchain w/ threads"
> + depends on !BR2_TOOLCHAIN_HAS_THREADS
This comment is not in sync with the dependencies of the package: C++,
dynamic library, glibc.
> +TBB_SO_VERSION = 2
> +TBB_LIBS = libtbb libtbbmalloc libtbbmalloc_proxy
> +
> +ifeq ($(BR2_ENABLE_DEBUG),y)
> +TBB_BIN_PATH = $(@D)/build/linux_*_debug
> +else
> +TBB_BIN_PATH = $(@D)/build/linux_*_release
> +endif
What is the difference between the debug and release builds? In
general, we don't want to special case BR2_ENABLE_DEBUG in packages, as
we only want this to enable building with debugging symbols, and
nothing else. We used to handle BR2_ENABLE_DEBUG in lots of packages
and got rid of that a while ago, so I don't want to get back to this.
> +define TBB_INSTALL_LIBS
> + $(foreach lib,$(TBB_LIBS),
> + $(if $(BR2_ENABLE_DEBUG),
> + $(INSTALL) -D -m 0755 $(TBB_BIN_PATH)/$(lib)_debug.so.$(TBB_SO_VERSION) \
> + $(1)/usr/lib/$(lib)_debug.so.$(TBB_SO_VERSION) ;
> + ln -sf $(lib)_debug.so.$(TBB_SO_VERSION) $(1)/usr/lib/$(lib)_debug.so
And this looks particularly painful here because the library doesn't
even have the same name on the filesystem depending on whether you're
doing a debug or a normal build. Clearly not good.
> + ,
> + $(INSTALL) -D -m 0755 $(TBB_BIN_PATH)/$(lib).so.$(TBB_SO_VERSION) \
> + $(1)/usr/lib/$(lib).so.$(TBB_SO_VERSION) ;
> + ln -sf $(lib).so.$(TBB_SO_VERSION) $(1)/usr/lib/$(lib).so
> + )
> + )
> +endef
So unless you need it, I'd say drop the support for BR2_ENABLE_DEBUG
altogether.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
next prev parent reply other threads:[~2017-10-12 20:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-28 23:50 [Buildroot] [PATCH v2 0/2] TBB and OpenCV3 Bradford Barr
2017-09-28 23:50 ` [Buildroot] [PATCH v2 1/2] tbb: new package Bradford Barr
2017-10-06 16:27 ` Yegor Yefremov
2017-10-12 20:45 ` Thomas Petazzoni [this message]
2017-10-12 21:12 ` Bradford Barr
2017-10-12 21:14 ` Bradford Barr
2017-10-12 21:21 ` Thomas Petazzoni
2017-09-28 23:50 ` [Buildroot] [PATCH v2 2/2] opencv3: add support for tbb Bradford Barr
2017-10-12 20:46 ` Thomas Petazzoni
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=20171012224526.132fc274@windsurf.home \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox