opencl-cts: Suppress -Wfree-nonheap-object compiler warning
PATCH 1/1 opencl-cts: Suppress -Wfree-nonheap-object compiler warning
From: Antonios Christidis <[email protected]>
Suppress warnings from -Wfree-nonheap-object check. The warning occurs during std::vector cleanup when deallocating memory with offset pointers for test "compare_pointers" only on 32 bit platforms.
/recipe-sysroot/usr/include/c++/16.1.0/bits/new_allocator.h:183:66: error: 'void operator delete(void*, std::size_t)' called on pointer '__result' with nonzero offset 24 [-Werror=free-nonheap-object]
183 | _GLIBCXX_OPERATOR_DELETE(_GLIBCXX_SIZED_DEALLOC(__p, __n));
| ^
/test_conformance/generic_address_space/basic_tests.cpp: In function 'int test_compare_pointers(cl_device_id, cl_context, cl_command_queue, int)':
/test_common/harness/testHarness.h:151:9: note: declared here
151 | int test_##name(cl_device_id device, cl_context context, \
| ^~~~~
/test_common/harness/testHarness.h:154:29: note: in expansion of macro 'REGISTER_TEST_VERSION'
154 | #define REGISTER_TEST(name) REGISTER_TEST_VERSION(name, Version(1, 2))
| ^~~~~~~~~~~~~~~~~~~~~
/test_conformance/generic_address_space/basic_tests.cpp:776:1: note: in expansion of macro 'REGISTER_TEST'
776 | REGISTER_TEST(compare_pointers)
| ^~~~~~~~~~~~~--- meta-oe/recipes-core/opencl/opencl-cts_2026.06.18.bb | 2 ++ 1 file changed, 2 insertions(+)
meta-oe/recipes-core/opencl/opencl-cts_2026.06.18.bb +2 -0
@@ -22,6 +22,8 @@ SRCREV = "8d8f3d272dbd3f0a84156be7890835c4b6deff8e" EXTRA_OECMAKE:append = " -DSPIRV_INCLUDE_DIR=${STAGING_EXECPREFIXDIR} -DCL_INCLUDE_DIR=${STAGING_INCDIR} -DCL_LIB_DIR=${STAGING_LIBDIR} -DOPENCL_LIBRARIES=OpenCL" +SECURITY_STRINGFORMAT:append:arm = " -Wno-free-nonheap-object" + PACKAGECONFIG = " \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl gles', '', d)} \ ${@bb.utils.filter('DISTRO_FEATURES', 'vulkan', d)} \
Signature · 1 line
2.34.1