Try enabling LTO. Test built for me on armv7h but not on aarch64. While
it didn't error out, it did simply stop:
...
INSTALL build/kodi-rpi-git/src/kodi-build/build/ffmpeg/src/ffmpeg/libavutil/tx.h
INSTALL build/kodi-rpi-git/src/kodi-build/build/ffmpeg/src/ffmpeg/libavutil/film_grain_params.h
INSTALL libavutil/avconfig.h
INSTALL libavutil/ffversion.h
INSTALL libavutil/libavutil.pc
(no further output after the above line)