@@ -2717,6 +2717,9 @@ N: Sergey Matyukevich <sergey.matyukevich@synopsys.com>
F: board/synopsys/nsim/
F: configs/snps_arc700_nsim_defconfig
+N: Sergey Romanov <svromanov@salutedevices.com>
+F: package/ck/
+
N: Sergio Prado <sergio.prado@e-labworks.com>
F: board/toradex/apalis-imx6/
F: configs/toradex_apalis_imx6_defconfig
@@ -91,6 +91,7 @@ menu "Debugging, profiling and benchmark"
source "package/bonnie/Config.in"
source "package/bpftool/Config.in"
source "package/cache-calibrator/Config.in"
+ source "package/ck/Config.in"
source "package/clinfo/Config.in"
source "package/clpeak/Config.in"
source "package/coremark/Config.in"
new file mode 100644
@@ -0,0 +1,19 @@
+config BR2_PACKAGE_CK_ARCH_SUPPORTS
+ bool
+ default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5 && !BR2_ARM_CPU_ARMV7M
+ default y if BR2_aarch64
+ default y if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
+ default y if BR2_s390x
+ default y if BR2_sparc_v9
+ default y if BR2_i386
+ default y if BR2_x86_64
+
+config BR2_PACKAGE_CK
+ bool "concurrency kit"
+ depends on BR2_PACKAGE_CK_ARCH_SUPPORTS
+ help
+ Concurrency primitives, safe memory reclamation mechanisms
+ and non-blocking data structures for the research, design and
+ implementation of high performance concurrent systems.
+
+ https://github.com/concurrencykit/ck.git
new file mode 100644
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 97d2a21d5326ef79b4668be2e6eda6284ee77a64c0981b35fd9695c736c3d4ac ck-0.7.1.tar.gz
+sha256 21a861f554f8f97047815e63ff5cbd57707b4c53dc1dd1b0f2dd43e6ca193464 LICENSE
new file mode 100644
@@ -0,0 +1,71 @@
+################################################################################
+#
+# ck
+#
+################################################################################
+
+CK_VERSION = 0.7.1
+CK_SITE = $(call github,concurrencykit,ck,$(CK_VERSION))
+CK_LICENSE = Apache-2.0
+CK_LICENSE_FILES = LICENSE
+
+CK_INSTALL_STAGING = YES
+
+CK_CONF_OPTS = \
+ --platform=$(BR2_ARCH) \
+ --prefix="/usr"
+
+CK_LDFLAGS = -Wl,-soname,libck.so.0 -shared -fPIC
+CK_CFLAGS = $(TARGET_CFLAGS) -std=gnu99 -fPIC
+
+ifeq ($(BR2_arm)$(BR2_ARM_CPU_ARMV6),yy)
+CK_CONF_OPTS += --profile="arm"
+CK_CFLAGS += -march=armv6k
+else ifeq ($(BR2_arm)$(BR2_ARM_CPU_ARMV7A),yy)
+CK_CONF_OPTS += --profile="arm"
+CK_CFLAGS += -march=armv7-a
+else ifeq ($(BR2_arm),y)
+CK_CONF_OPTS += --profile="arm"
+else ifeq ($(BR2_aarch64),y)
+CK_CONF_OPTS += --profile="aarch64"
+else ifeq ($(BR2_powerpc),y)
+CK_CONF_OPTS += --profile="ppc"
+else ifeq ($(BR2_powerpc64)$(BR2_powerpc64le),y)
+CK_CONF_OPTS += --profile="ppc64"
+else ifeq ($(BR2_s390x),y)
+CK_CONF_OPTS += --profile="s390x"
+else ifeq ($(BR2_x86_64),y)
+CK_CONF_OPTS += --profile="x86_64"
+CK_LDFLAGS += -m64
+else ifeq ($(BR2_i386),y)
+CK_CONF_OPTS += --profile="x86"
+else ifeq ($(BR2_sparc_v9),y)
+CK_CONF_OPTS += --profile="sparcv9"
+endif
+
+define CK_CONFIGURE_CMDS
+ cd $(@D); \
+ $(TARGET_CONFIGURE_OPTS) \
+ LD=$(TARGET_CC) \
+ CC=$(TARGET_CC) \
+ LDFLAGS="$(CK_LDFLAGS)" \
+ CFLAGS="$(CK_CFLAGS)" \
+ ALL_LIBS="libck.so" \
+ INSTALL_LIBS="install-so" \
+ PTHREAD_CFLAGS="-pthread" \
+ ./configure $(CK_CONF_OPTS)
+endef
+
+define CK_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
+endef
+
+define CK_INSTALL_TARGET_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
+endef
+
+define CK_INSTALL_STAGING_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install
+endef
+
+$(eval $(generic-package))