so build/generic/configure:5025: has this code (in couple of places) CFLAGS=`echo $CFLAGS | sed s,"-mcpu","-mtune",g` and it replaces valid -mcpu with -mtune which does not support all same options on arm64 it's perfectly legal to specify CPU crypto extention support like this -mcpu=cortex-a72.cortex-a53+crypto but xvid replaces -mcpu with -tune where it's not legal cc1: error: unknown value 'cortex-a72.cortex-a53+crypto' for '-mtune' ; did you mean 'cortex-a72.cortex-a53'? so basically it bails out if it sees the +crypto part. source is here http://websvn.xvid.org/cvs/viewvc.cgi/tags/release-1_3_7/xvidcore/build/generic/configure.in?view=markup maybe let's just rip it out?
I have a fix in my personal overlay: https://github.com/bassdr/gentoo-local-overlay/tree/master/media-libs/xvid I remove the mcpu -> mtunes replacement completely, and it just works.