testing/onnxruntime: fix and enable check()
Fix several build errors of onnxruntime when check() is enabled.
0001-Remove-MATH_NO_EXCEPT-macro.patch
fixes the build error reported on upstream.
It is caused by type mismatch. Definitions of cmath functions (sin, sinf, ...) include noexcept
on Alpine build, but the template expects the type without noexcept
for non-libcxx environments.
0002-prevent-object-destruction-compile-error-16134.patch
fixes the errors caused by -Werror=dangling-reference
.
It is already fixed on upstream (but not released), so just import the patch.
Also, system.patch
is updated because test build requires cmake function onnxruntime_protobuf_generate
defined at protobuf_function.cmake
.
All errors seem to be resolved, so finally enable check().