Opentracing-cpp: new package
v6 cover Opentracing-cpp: new package
From: Jan Heylen <[email protected]>
Hi,
V6 of "this adds opentracing-cpp package as a logging library package."
added a patch for m68k cf toolchains suffering from BR2_TOOLCHAIN_HAS_GCC_BUG_64735
br,
Jan
Jan Heylen (4):
rabbitmq-c: BUILD_SHARED_LIBS is handled in pkg-cmake.mk
pkg-cmake: add note on BUILD_STATIC_LIBS
m68k_cf5208: suffers from gcc 64735
opentracing-cpp: new package
DEVELOPERS | 3 + package/Config.in | 1 + ...shared-static-target-a-configurable-optio.patch | 74 ++++++++++++++++++++++ package/opentracing-cpp/Config.in | 15 +++++ package/opentracing-cpp/opentracing-cpp.hash | 3 + package/opentracing-cpp/opentracing-cpp.mk | 25 ++++++++ package/pkg-cmake.mk | 9 +++ package/rabbitmq-c/rabbitmq-c.mk | 7 +- toolchain/toolchain-common.in | 1 + 9 files changed, 135 insertions(+), 3 deletions(-) create mode 100644 package/opentracing-cpp/0001-CMake-make-shared-static-target-a-configurable-optio.patch create mode 100644 package/opentracing-cpp/Config.in create mode 100644 package/opentracing-cpp/opentracing-cpp.hash create mode 100644 package/opentracing-cpp/opentracing-cpp.mk
Signature · 1 line
2.7.4
PATCH v6 1/4 rabbitmq-c: BUILD_SHARED_LIBS is handled in pkg-cmake.mk
From: Jan Heylen <[email protected]>
--- package/rabbitmq-c/rabbitmq-c.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
package/rabbitmq-c/rabbitmq-c.mk +4 -3
@@ -13,12 +13,13 @@ RABBITMQ_C_CONF_OPTS = \ -DBUILD_API_DOCS=OFF \ -DBUILD_TOOLS_DOCS=OFF +# BUILD_SHARED_LIBS is handled in pkg-cmake.mk as it is a generic cmake variable ifeq ($(BR2_STATIC_LIBS),y) -RABBITMQ_C_CONF_OPTS += -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON +RABBITMQ_C_CONF_OPTS += -DBUILD_STATIC_LIBS=ON else ifeq ($(BR2_SHARED_STATIC_LIBS),y) -RABBITMQ_C_CONF_OPTS += -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON +RABBITMQ_C_CONF_OPTS += -DBUILD_STATIC_LIBS=ON else ifeq ($(BR2_SHARED_LIBS),y) -RABBITMQ_C_CONF_OPTS += -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF +RABBITMQ_C_CONF_OPTS += -DBUILD_STATIC_LIBS=OFF endif # CMake OpenSSL detection is buggy, and doesn't properly use
Signature · 1 line
2.7.4
PATCH v6 1/4 rabbitmq-c: BUILD_SHARED_LIBS is handled in pkg-cmake.mk
Hello,
Quoted 3 lines · Jan Heylen
From: Jan Heylen <[email protected]>
Signed-off-by Jan Heylen <[email protected]>
I've applied, after tweaking a bit the commit title and commit log:
rabbitmq-c: don't pass BUILD_SHARED_LIBS
The BUILD_SHARED_LIBS option is already handled by the cmake-package infrastructure, so there is no need to pass it at the package level.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH v6 2/4 pkg-cmake: add note on BUILD_STATIC_LIBS
In reply to Jan HeylenFrom: Jan Heylen <[email protected]>
as BUILD_STATIC_LIBS is not a standard cmake variable (while BUILD_SHARED_LIBS is) we shouldn't add it in pkg-cmake.mk, although for some packages that would make sense. Therefore, add a note so we don't forget about this abnormality.
see: https://cmake.org/cmake/help/v3.8/manual/cmake-variables.7.html#variables-that-change-behavior
--- package/pkg-cmake.mk | 9 +++++++++ 1 file changed, 9 insertions(+)
package/pkg-cmake.mk +9 -0
@@ -80,6 +80,15 @@ ifndef $(2)_CONFIGURE_CMDS ifeq ($(4),target) # Configure package for target +# +# Note: +# BUILD_SHARED_LIBS is a cmake internal variable, +# BUILD_STATIC_LIBS is not standard in any way, which means some +# projects may choose another name for a similar option and there is not +# much we can do about this. +# see: https://cmake.org/cmake/help/v3.8/manual/cmake-variables.7.html#variables-that-change-behavior +# +# So: we handle BUILD_SHARED_LIBS here, but BUILD_STATIC_LIBS must be handled per package define $(2)_CONFIGURE_CMDS (mkdir -p $$($$(PKG)_BUILDDIR) && \ cd $$($$(PKG)_BUILDDIR) && \
Signature · 1 line
2.7.4
PATCH v6 2/4 pkg-cmake: add note on BUILD_STATIC_LIBS
Hello,
package/pkg-cmake.mk ifndef $(2)_CONFIGURE_CMDS · line 90
Quoted 8 lines · Jan Heylen
package/pkg-cmake.mk +8
-0+# +# Note: +# BUILD_SHARED_LIBS is a cmake internal variable, +# BUILD_STATIC_LIBS is not standard in any way, which means some +# projects may choose another name for a similar option and there is not +# much we can do about this. +# see: https://cmake.org/cmake/help/v3.8/manual/cmake-variables.7.html#variables-that-change-behavior +#
I've applied, after rewording this a bit differently:
+#
+# - We are passing BUILD_SHARED_LIBS because it is documented as a
+# standard CMake variable to control the build of shared libraries
+# (see https://cmake.org/cmake/help/v3.8/manual/cmake-variables.7.html#variables-that-change-behavior)
+# - We are not passing BUILD_STATIC_LIBS because it is *not*
+# documented as a standard CMake variable. If a package supports it,
+# it must handle it explicitly.
+#
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH v6 3/4 m68k_cf5208: suffers from gcc 64735
In reply to Jan HeylenFrom: Jan Heylen <[email protected]>
so add it to the list of BR2_TOOLCHAIN_HAS_GCC_BUG_64735
Identified experimentally by using exception_ptr with m68k_cf5208 and looking at the value of ATOMIC_INT_LOCK_FREE. ATOMIC_INT_LOCK_FREE = 1, so the issue is present. Also verified that gcc 7.x fixed it also for cf5208.
--- toolchain/toolchain-common.in | 1 + 1 file changed, 1 insertion(+)
toolchain/toolchain-common.in +1 -0
@@ -22,6 +22,7 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_64735 default y if BR2_ARM_CPU_ARMV4 default y if BR2_ARM_CPU_ARMV5 default y if BR2_sparc_v8 + default y if BR2_m68k_cf5208 depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7 config BR2_TOOLCHAIN_HAS_NATIVE_RPC
Signature · 1 line
2.7.4
PATCH v6 3/4 m68k_cf5208: suffers from gcc 64735
Hello,
Quoted 9 lines · Jan Heylen
From: Jan Heylen <[email protected]>
so add it to the list of
BR2_TOOLCHAIN_HAS_GCC_BUG_64735Identified experimentally by using
exception_ptrwithm68k_cf5208and looking at the value ofATOMIC_INT_LOCK_FREE.ATOMIC_INT_LOCK_FREE= 1, so the issue is present. Also verified that gcc 7.x fixed it also for cf5208.Signed-off-by Jan Heylen <[email protected]>
I've applied, after slightly tweaking the commit log:
toolchain: m68k coldfire is also affected by gcc bug 64735
Verified experimentally by using exception_ptr with m68k_cf5208 and looking at the value of ATOMIC_INT_LOCK_FREE. ATOMIC_INT_LOCK_FREE=1, so the issue is present. Also verified that gcc 7.x fixed it also for cf5208.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH v6 3/4 m68k_cf5208: suffers from gcc 64735
In reply to Jan HeylenQuoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Jan" == Jan Heylen <[email protected]> writes:
From: Jan Heylen <[email protected]>
so add it to the list ofBR2_TOOLCHAIN_HAS_GCC_BUG_64735Identified experimentally by using
exception_ptrwithm68k_cf5208and looking at the value ofATOMIC_INT_LOCK_FREE.ATOMIC_INT_LOCK_FREE= 1, so the issue is present. Also verified that gcc 7.x fixed it also for cf5208.Signed-off-by Jan Heylen <[email protected]>
Committed to 2017.11.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v6 4/4 opentracing-cpp: new package
In reply to Jan HeylenFrom: Jan Heylen <[email protected]>
---
test-pkg passes
Changes v5 -> v6:
- removed BR2_m68k_cf dependency, moved it to separate and generic BR2_TOOLCHAIN_HAS_GCC_BUG_64735 patch
- fixed comment on toolchain requirement
Changes v4 -> v5:
- added static switch again, as pck-cmake can only handle shared libs variable part
Changes v3 -> v4:
- remove shared/static switch in mk file as that is handled in pkg-cmake.mk now
Changes v2 -> v3:
- Fix another indendation typo
- Add DEVELOPERS file change
- Signoff opetracing-cpp patch
- run test-pkg and include various dependencies (toolchain bug & m68k cf)
- add comments in Config.in on the dependencies
Changes v1 -> v2:
- Fix indendation typo
- Add licence hash
- remove INTALL_TARGET=yes as that is default
--- DEVELOPERS | 3 + package/Config.in | 1 + ...shared-static-target-a-configurable-optio.patch | 74 ++++++++++++++++++++++ package/opentracing-cpp/Config.in | 15 +++++ package/opentracing-cpp/opentracing-cpp.hash | 3 + package/opentracing-cpp/opentracing-cpp.mk | 25 ++++++++ 6 files changed, 121 insertions(+) create mode 100644 package/opentracing-cpp/0001-CMake-make-shared-static-target-a-configurable-optio.patch create mode 100644 package/opentracing-cpp/Config.in create mode 100644 package/opentracing-cpp/opentracing-cpp.hash create mode 100644 package/opentracing-cpp/opentracing-cpp.mk
DEVELOPERS +3 -0
@@ -790,6 +790,9 @@ F: package/pangomm/ F: package/rpm/ F: package/yad/ +N: Jan Heylen <[email protected]> +F: package/opentracing-cpp/ + N: Jan Kraval <[email protected]> F: board/orangepi/orangepi-lite F: configs/orangepi_lite_defconfig
package/Config.in +1 -0
@@ -1288,6 +1288,7 @@ menu "Logging" source "package/log4cplus/Config.in" source "package/log4cpp/Config.in" source "package/log4cxx/Config.in" + source "package/opentracing-cpp/Config.in" source "package/zlog/Config.in" endmenu
package/opentracing-cpp/0001-CMake-make-shared-static-target-a-configurable-optio.patch new file +74 -0
74 lines not on this page · raw message
package/opentracing-cpp/Config.in new file +15 -0
@@ -0,0 +1,15 @@ +config BR2_PACKAGE_OPENTRACING_CPP + bool "opentracing-cpp" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # exception_ptr + help + OpenTracing API for C++ + + http://opentracing.io + +comment "opentracing-cpp needs a toolchain w/ C++, gcc >= 4.8" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + +comment "opentracing-cpp needs exception_ptr" + depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
package/opentracing-cpp/opentracing-cpp.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally calculated +sha256 c77041cb2f147ac81b2b0702abfced5565a9cebc318d045c060a4c3e074009ee opentracing-cpp-v1.2.0.tar.gz +sha256 b80bffcfee825a69645f7ca97ddba48714031ea5c845198d184714d5490798b6 COPYING
package/opentracing-cpp/opentracing-cpp.mk new file +25 -0
@@ -0,0 +1,25 @@ +################################################################################ +# +# opentracing-cpp +# +################################################################################ + +OPENTRACING_CPP_VERSION = v1.2.0 +OPENTRACING_CPP_SITE = $(call github,opentracing,opentracing-cpp,$(OPENTRACING_CPP_VERSION)) +OPENTRACING_CPP_LICENSE = MIT +OPENTRACING_CPP_LICENSE_FILES = COPYING + +OPENTRACING_CPP_INSTALL_STAGING = YES + +# BUILD_SHARED_LIBS is handled in pkg-cmake.mk as it is a generic cmake variable +# although BUILD_STATIC_LIBS=ON is default, make it explicit, +# cmake and static/shared libs is confusing enough already. +ifeq ($(BR2_STATIC_LIBS),y) +OPENTRACING_CPP_CONF_OPTS += -DBUILD_STATIC_LIBS=ON +else ifeq ($(BR2_SHARED_STATIC_LIBS),y) +OPENTRACING_CPP_CONF_OPTS += -DBUILD_STATIC_LIBS=ON +else ifeq ($(BR2_SHARED_LIBS),y) +OPENTRACING_CPP_CONF_OPTS += -DBUILD_STATIC_LIBS=OFF +endif + +$(eval $(cmake-package))
Signature · 1 line
2.7.4
Thomas Petazzoni
AppliedPATCH v6 4/4 opentracing-cpp: new package
Hello,
Quoted 5 lines · Jan Heylen
From: Jan Heylen <[email protected]>
Signed-off-by Jan Heylen <[email protected]>---
test-pkg passes
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com