package/tbb: new package
Intel Threading Building Blocks (TBB), is a C++ library to help developers write highly parallelized applications. OpenCV uses it to accelerate some of it's more heavy weight procedures. Signed-off-by: bradford barr <bradford@density.io> Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com> [Arnout: - add LICENSE hash; - replace patch with explicit passing of CPLUS, CONLY, CXXFLAGS; - rework handling of arch and add comment about it.] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
parent
8f3cfe4196
commit
c114c9e8ce
@ -970,6 +970,7 @@ F: package/odhcploc/
|
||||
|
||||
N: Francis Laniel <flaniel@linux.microsoft.com>
|
||||
F: package/pahole/
|
||||
F: package/tbb/
|
||||
|
||||
N: Francisco Gonzalez <gzmorell@gmail.com>
|
||||
F: package/ser2net/
|
||||
|
@ -2044,6 +2044,7 @@ endif
|
||||
source "package/skalibs/Config.in"
|
||||
source "package/sphinxbase/Config.in"
|
||||
source "package/startup-notification/Config.in"
|
||||
source "package/tbb/Config.in"
|
||||
source "package/tinycbor/Config.in"
|
||||
source "package/tz/Config.in"
|
||||
source "package/tzdata/Config.in"
|
||||
|
16
package/tbb/Config.in
Normal file
16
package/tbb/Config.in
Normal file
@ -0,0 +1,16 @@
|
||||
config BR2_PACKAGE_TBB
|
||||
bool "tbb"
|
||||
depends on BR2_TOOLCHAIN_USES_GLIBC
|
||||
depends on !BR2_STATIC_LIBS
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
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 glibc toolchain w/ dynamic library, threads, C++"
|
||||
depends on !BR2_TOOLCHAIN_USES_GLIBC || BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP
|
3
package/tbb/tbb.hash
Normal file
3
package/tbb/tbb.hash
Normal file
@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 b8dbab5aea2b70cf07844f86fa413e549e099aa3205b6a04059ca92ead93a372 tbb-2018_U5.tar.gz
|
||||
sha256 c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 LICENSE
|
53
package/tbb/tbb.mk
Normal file
53
package/tbb/tbb.mk
Normal file
@ -0,0 +1,53 @@
|
||||
################################################################################
|
||||
#
|
||||
# tbb
|
||||
#
|
||||
################################################################################
|
||||
|
||||
TBB_VERSION = 2018_U5
|
||||
TBB_SITE = $(call github,01org,tbb,$(TBB_VERSION))
|
||||
TBB_INSTALL_STAGING = YES
|
||||
TBB_LICENSE = Apache-2.0
|
||||
TBB_LICENSE_FILES = LICENSE
|
||||
|
||||
TBB_SO_VERSION = 2
|
||||
TBB_LIBS = libtbb libtbbmalloc libtbbmalloc_proxy
|
||||
TBB_BIN_PATH = $(@D)/build/linux_*
|
||||
|
||||
# arch is normally set based on uname -m with some conversions. However,
|
||||
# it is not really used for much:
|
||||
# - to decide between 32 or 64-bit files (based on '64' in the name)
|
||||
# - to decide on some arch-specific CFLAGS like -m32, which we don't actually want
|
||||
# - to set DO_ITT_NOTIFY if it's x86 (32 or 64 bit)
|
||||
# - to include assembler source, but it only exists for ia64
|
||||
# The only thing we actually want from the above is the 32/64-bit, and
|
||||
# DO_ITT_NOTIFY. Therefore, set arch to a fixed value which is unknown to
|
||||
# the tbb build system, and set DO_ITT_NOTIFY explicitly.
|
||||
TBB_ARCH = $(if $(BR2_ARCH_IS_64),buildroot64,buildroot32)
|
||||
TBB_ITT_NOTIFY = $(if $(BR2_i386)$(BR2_x86_64),-DDO_ITT_NOTIFY)
|
||||
TBB_CXXFLAGS = $(TARGET_CXXFLAGS) $(TBB_ITT_NOTIFY)
|
||||
|
||||
define TBB_BUILD_CMDS
|
||||
$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) arch=$(TBB_ARCH) \
|
||||
CPLUS="$(TARGET_CXX)" CONLY="$(TARGET_CC)" CXXFLAGS="$(TBB_CXXFLAGS)"
|
||||
endef
|
||||
|
||||
define TBB_INSTALL_LIBS
|
||||
$(foreach lib,$(TBB_LIBS),
|
||||
$(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
|
||||
|
||||
define TBB_INSTALL_STAGING_CMDS
|
||||
mkdir -p $(STAGING_DIR)/usr/include/
|
||||
cp -a $(@D)/include/* $(STAGING_DIR)/usr/include/
|
||||
$(call TBB_INSTALL_LIBS,$(STAGING_DIR))
|
||||
endef
|
||||
|
||||
define TBB_INSTALL_TARGET_CMDS
|
||||
$(call TBB_INSTALL_LIBS,$(TARGET_DIR))
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
Loading…
Reference in New Issue
Block a user