xcode – How to compile FFmpeg for arm64e – clang is unable to create an executable file
I have met the same issue, and after checked, I found the parameter “–cpu” is incorrect for arm64. The original is “–cpu=arm64-v8a”. The correct one is “–cpu=armv8-a”. The “–cpu” parameter must be start with “armv”, you can find the clue in the FFMPEG configure file like below:
case $cpu in
armv*)
cpuflags="-march=$cpu"
subarch=$(echo $cpu | sed 's/[^a-z0-9]//g')
;;
*)
cpuflags="-mcpu=$cpu"
case $cpu in
cortex-a*) subarch=armv7a ;;
cortex-r*) subarch=armv7r ;;
cortex-m*) enable thumb; subarch=armv7m ;;
arm11*) subarch=armv6 ;;
arm[79]*e*|arm9[24]6*|arm96*|arm102[26]) subarch=armv5te ;;
armv4*|arm7*|arm9[24]*) subarch=armv4 ;;
*) subarch=$(probe_arm_arch) ;;
esac
;;
esac
Read more here: Source link