opencv: Tend for the compiler --param option rename in gcc10
PATCH 1/5 opencv: Tend for the compiler --param option rename in gcc10
Signed-off-by Khem Raj <[email protected]>
--- ...-ipcp-unit-growth-with-ipa-cp-unit-g.patch | 55 +++++++++++++++++++ .../recipes-support/opencv/opencv_4.1.0.bb | 1 + 2 files changed, 56 insertions(+) create mode 100644 meta-oe/recipes-support/opencv/opencv/0001-carotene-Replace-ipcp-unit-growth-with-ipa-cp-unit-g.patch
meta-oe/recipes-support/opencv/opencv/0001-carotene-Replace-ipcp-unit-growth-with-ipa-cp-unit-g.patch new file +55 -0
@@ -0,0 +1,55 @@ +From 1edc925ecd7fb54d2dc78452069084475fbe2a70 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Thu, 16 Jan 2020 08:52:00 -0800 +Subject: [PATCH] carotene: Replace ipcp-unit-growth with ipa-cp-unit-growth on gcc >= 10 + +gcc 10+ has renamed this option, therefore check for gcc version before +deciding which name to use for opt parameter + +Upstream-Status: Submitted [https://github.com/opencv/opencv/pull/16369] +Signed-off-by: Khem Raj <[email protected]> +--- + 3rdparty/carotene/CMakeLists.txt | 8 ++++++-- + 3rdparty/carotene/hal/CMakeLists.txt | 7 ++++++- + 2 files changed, 12 insertions(+), 3 deletions(-) + +diff --git a/3rdparty/carotene/CMakeLists.txt b/3rdparty/carotene/CMakeLists.txt +index bfa9368d79..1c43b85b28 100644 +--- a/3rdparty/carotene/CMakeLists.txt ++++ b/3rdparty/carotene/CMakeLists.txt +@@ -20,8 +20,12 @@ if(CMAKE_COMPILER_IS_GNUCC) + # - matchTemplate about 5-10% + # - goodFeaturesToTrack 10-20% + # - cornerHarris 30% for some cases +- +- set_source_files_properties(${carotene_sources} COMPILE_FLAGS "--param ipcp-unit-growth=100000 --param inline-unit-growth=100000 --param large-stack-frame-growth=5000") ++ set_source_files_properties(${carotene_sources} COMPILE_FLAGS "--param inline-unit-growth=100000 --param large-stack-frame-growth=5000") ++ if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10.0.0") ++ set_source_files_properties(${carotene_sources} COMPILE_FLAGS "--param ipcp-unit-growth=100000 ${COMPILE_FLAGS}") ++ else() ++ set_source_files_properties(${carotene_sources} COMPILE_FLAGS "--param ipa-cp-unit-growth=100000 ${COMPILE_FLAGS}") ++ endif() + endif() + + add_library(carotene_objs OBJECT +diff --git a/3rdparty/carotene/hal/CMakeLists.txt b/3rdparty/carotene/hal/CMakeLists.txt +index c4b9acaedd..bbc5b11a80 100644 +--- a/3rdparty/carotene/hal/CMakeLists.txt ++++ b/3rdparty/carotene/hal/CMakeLists.txt +@@ -90,7 +90,12 @@ set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS ${carotene_defs}) + # matchTemplate about 5-10% + # goodFeaturesToTrack 10-20% + # cornerHarris 30% for some cases +- set_source_files_properties(impl.cpp $<TARGET_OBJECTS:carotene_objs> COMPILE_FLAGS "--param ipcp-unit-growth=100000 --param inline-unit-growth=100000 --param large-stack-frame-growth=5000") ++ set_source_files_properties(impl.cpp $<TARGET_OBJECTS:carotene_objs> COMPILE_FLAGS "--param inline-unit-growth=100000 --param large-stack-frame-growth=5000") ++ if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10.0.0") ++ set_source_files_properties(impl.cpp $<TARGET_OBJECTS:carotene_objs> COMPILE_FLAGS "--param ipcp-unit-growth=100000 ${COMPILE_FLAGS}") ++ else() ++ set_source_files_properties(impl.cpp $<TARGET_OBJECTS:carotene_objs> COMPILE_FLAGS "--param ipa-cp-unit-growth=100000 ${COMPILE_FLAGS}") ++ endif() + # set_source_files_properties(impl.cpp $<TARGET_OBJECTS:carotene_objs> COMPILE_FLAGS "--param ipcp-unit-growth=100000 --param inline-unit-growth=100000 --param large-stack-frame-growth=5000") + endif() + +-- +2.25.0 +
meta-oe/recipes-support/opencv/opencv_4.1.0.bb +1 -0
@@ -48,6 +48,7 @@ SRC_URI = "git://github.com/opencv/opencv.git;name=opencv \ file://0003-To-fix-errors-as-following.patch \ file://0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch \ file://0001-Dont-use-isystem.patch \ + file://0001-carotene-Replace-ipcp-unit-growth-with-ipa-cp-unit-g.patch \ file://download.patch \ " PV = "4.1.0"
Signature · 1 line
2.25.0
PATCH 2/5 grpc: Link with libatomic on powerpc
Signed-off-by Khem Raj <[email protected]>
--- meta-networking/recipes-devtools/grpc/grpc_1.24.3.bb | 4 ++++ 1 file changed, 4 insertions(+)
meta-networking/recipes-devtools/grpc/grpc_1.24.3.bb +4 -0
@@ -44,6 +44,10 @@ do_configure_prepend_mipsarch() { sed -i -e "s/set(_gRPC_ALLTARGETS_LIBRARIES \${CMAKE_DL_LIBS} rt m pthread)/set(_gRPC_ALLTARGETS_LIBRARIES \${CMAKE_DL_LIBS} atomic rt m pthread)/g" ${S}/CMakeLists.txt } +do_configure_prepend_powerpc() { + sed -i -e "s/set(_gRPC_ALLTARGETS_LIBRARIES \${CMAKE_DL_LIBS} rt m pthread)/set(_gRPC_ALLTARGETS_LIBRARIES \${CMAKE_DL_LIBS} atomic rt m pthread)/g" ${S}/CMakeLists.txt +} + do_configure_prepend_toolchain-clang_x86() { sed -i -e "s/set(_gRPC_ALLTARGETS_LIBRARIES \${CMAKE_DL_LIBS} rt m pthread)/set(_gRPC_ALLTARGETS_LIBRARIES \${CMAKE_DL_LIBS} atomic rt m pthread)/g" ${S}/CMakeLists.txt }
Signature · 1 line
2.25.0
PATCH 3/5 ssiapi: Needs boost/ppc support
In reply to Khem RajInternal boost headers are missing ppc support
ssiapi.1.3.0/lib/boost/smart_ptr/detail/sp_counted_base.hpp:66:11: fatal error: boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp: No such file or directory
Signed-off-by Khem Raj <[email protected]>
--- meta-oe/recipes-support/ssiapi/ssiapi_1.3.0.bb | 2 ++ 1 file changed, 2 insertions(+)
meta-oe/recipes-support/ssiapi/ssiapi_1.3.0.bb +2 -0
@@ -34,3 +34,5 @@ do_configure_prepend(){ } RDEPENDS_${PN} += "mdadm" + +COMPATIBLE_HOST_powerpc = 'null'
Signature · 1 line
2.25.0
PATCH 4/5 fluentbit: Fix build on powerpc
In reply to Khem RajSigned-off-by Khem Raj <[email protected]>
--- ...-ppc-Fix-signature-for-co_create-API.patch | 38 +++++++++++++++++++ .../fluentbit/fluentbit_1.3.5.bb | 1 + 2 files changed, 39 insertions(+) create mode 100644 meta-oe/recipes-extended/fluentbit/fluentbit/0001-ppc-Fix-signature-for-co_create-API.patch
meta-oe/recipes-extended/fluentbit/fluentbit/0001-ppc-Fix-signature-for-co_create-API.patch new file +38 -0
@@ -0,0 +1,38 @@ +From be4032079c931704f52e29f5da5c01cde24ac842 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Thu, 16 Jan 2020 10:44:58 -0800 +Subject: [PATCH] ppc: Fix signature for co_create API + +Upstream-Status: Submitted [https://github.com/fluent/fluent-bit/pull/1886] +Signed-off-by: Khem Raj <[email protected]> +--- + lib/flb_libco/ppc.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/lib/flb_libco/ppc.c b/lib/flb_libco/ppc.c +index e6536d56..533256b3 100644 +--- a/lib/flb_libco/ppc.c ++++ b/lib/flb_libco/ppc.c +@@ -279,7 +279,9 @@ static uint32_t* co_create_(unsigned size, uintptr_t entry) { + return t; + } + +-cothread_t co_create(unsigned int size, void (*entry_)(void)) { ++cothread_t co_create(unsigned int size, void (*entry_)(void), ++ size_t *out_size) { ++ + uintptr_t entry = (uintptr_t)entry_; + uint32_t* t = 0; + +@@ -325,7 +327,7 @@ cothread_t co_create(unsigned int size, void (*entry_)(void)) { + t[10] = (uint32_t)(sp >> shift >> shift); + t[11] = (uint32_t)sp; + } +- ++ *out_size = size; + return t; + } + +-- +2.25.0 +
meta-oe/recipes-extended/fluentbit/fluentbit_1.3.5.bb +1 -0
@@ -15,6 +15,7 @@ SRC_URI = "http://fluentbit.io/releases/1.3/fluent-bit-${PV}.tar.gz \ file://jemalloc.patch \ file://cross-build-init-system-detection.patch \ file://builtin-nan.patch \ + file://0001-ppc-Fix-signature-for-co_create-API.patch \ " SRC_URI[md5sum] = "6eae6dfd0a874e5dd270c36e9c68f747" SRC_URI[sha256sum] = "e037c76c89269c8dc4027a08e442fefd2751b0f1e0f9c38f9a4b12d781a9c789"
Signature · 1 line
2.25.0
PATCH 5/5 mozjs: extend --with-intl-api=build to ppc
In reply to Khem RajThis fixes mozjs crash, in launching js in qemu during gjs build
Fixes
|
| (process:606857): Gjs-ERROR **: 02:02:06.039: Could not initialize JavascriptSigned-off-by Khem Raj <[email protected]>
--- meta-oe/recipes-extended/mozjs/mozjs_60.5.2.bb | 1 + 1 file changed, 1 insertion(+)
meta-oe/recipes-extended/mozjs/mozjs_60.5.2.bb +1 -0
@@ -57,6 +57,7 @@ EXTRA_OECONF = " \ # Without this, JS_Init() will fail for mips64. EXTRA_OECONF_append_mipsarch = " --with-intl-api=build" +EXTRA_OECONF_append_powerpc = " --with-intl-api=build" EXTRA_OECONF_append_mipsarch = " --disable-ion" EXTRA_OECONF_append_riscv64 = " --disable-ion"
Signature · 1 line
2.25.0