diff --git a/modules/core/src/system.cpp b/modules/core/src/system.cpp index c61fd67a19..c29b97f880 100644 --- a/modules/core/src/system.cpp +++ b/modules/core/src/system.cpp @@ -120,11 +120,15 @@ void* allocSingletonNewBuffer(size_t size) { return malloc(size); } #include // std::abort #endif -#if defined __ANDROID__ || defined __unix__ || defined __FreeBSD__ || defined __OpenBSD__ || defined __HAIKU__ || defined __Fuchsia__ +#if defined __ANDROID__ || defined __unix__ || defined __FreeBSD__ || defined __OpenBSD__ || defined __HAIKU__ || defined __Fuchsia__ || defined __QNX__ # include # include #if defined __QNX__ # include +# include +using Elf64_auxv_t = auxv64_t; +# include +constexpr decltype(auto) AT_HWCAP = NT_GNU_HWCAP; #else # include #endif @@ -581,10 +585,12 @@ struct HWFeatures have[CV_CPU_NEON_DOTPROD] = (auxv.a_un.a_val & (1 << 20)) != 0; // HWCAP_ASIMDDP have[CV_CPU_NEON_FP16] = (auxv.a_un.a_val & (1 << 10)) != 0; // HWCAP_ASIMDHP } +#if defined(AT_HWCAP2) else if (auxv.a_type == AT_HWCAP2) { have[CV_CPU_NEON_BF16] = (auxv.a_un.a_val & (1 << 14)) != 0; // HWCAP2_BF16 } +#endif } close(cpufile); diff --git a/modules/ts/CMakeLists.txt b/modules/ts/CMakeLists.txt index c1d249ea14..63edae1e67 100644 --- a/modules/ts/CMakeLists.txt +++ b/modules/ts/CMakeLists.txt @@ -47,3 +47,7 @@ if(OPENCV_DISABLE_THREAD_SUPPORT) # described in `ts_gtest.h`. ocv_target_compile_definitions(${the_module} PUBLIC GTEST_HAS_PTHREAD=0) endif() + +if(CMAKE_SYSTEM_NAME STREQUAL "QNX") + ocv_target_link_libraries(${the_module} PUBLIC regex) +endif() \ No newline at end of file