Cross compile for raspberry pi 4B

I am having trouble cross-compiling tensorflow lite for use on a raspberry pi 4B. I am using the instructions at

and

but they appear to be either incomplete or incorrect for my situation. Running the cmake command

ARMCC_FLAGS="-march=armv7-a -mfpu=neon-vfpv4 -funsafe-math-optimizations -mfp16-format=ieee"
ARMCC_PREFIX=${HOME}/toolchains/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
cmake -DCMAKE_C_COMPILER=${ARMCC_PREFIX}gcc
-DCMAKE_CXX_COMPILER=${ARMCC_PREFIX}g++
-DCMAKE_C_FLAGS="${ARMCC_FLAGS}"
-DCMAKE_CXX_FLAGS="${ARMCC_FLAGS}"
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
-DCMAKE_SYSTEM_NAME=Linux
-DCMAKE_SYSTEM_PROCESSOR=armv7
…/tensorflow/lite/

appears to run OK but when I try and build it using:

cmake --build . -j

I get these types of errors:

cc1: error: invalid feature modifier in ‘-march=armv8.2-a+bf16’
cc1: error: invalid feature modifier in ‘-march=armv8.2-a+bf16’
cc1: error: invalid feature modifier in ‘-march=armv8.2-a+bf16’

Does anyone know of a complete set of instructions on cross-compiling tensorflow-lite for raspberry pi 4B?

Hi, @bakerjizzay

Have you solved the problem?
I got the same issue.

Sincerely,

Just (re)solved this issue myself. You can find an answer in Cross-compilation for RPi3 (armv7) fails on assembly · Issue #1465 · google/XNNPACK · GitHub