On riscv64, the compiler complained:
In file included from /usr/include/string.h:548,
from omxregister.c:42:
In function 'strncpy',
inlined from 'showComponentsList' at omxregister.c:110:3,
inlined from 'main' at omxregister.c:463:9:
/usr/include/bits/string_fortified.h:95:10: error: '__builtin_strncpy' destination unchanged after copying no bytes [-Werror=stringop-truncation]
95 | return __builtin___strncpy_chk (__dest, __src, __len,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
96 | __glibc_objsize (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
It seems that the -O optimization to generate arch assemblies
leads to different behavior between riscv and arm, x86.
Add -Wno-stringop-truncation CFLAGS to workaround the problem.