All answers are great! But ensure that you are using the latest cross-compiler 10.2.0
For setting up your environment see this .. Cross Compiler: Installation Instructions
GCC provides great documentation for ARM devices and which flags work best
Create a hello.c file for hello world and try this:
arm-linux-gnueabihf-gcc hello.c -march=...