10

When compiling a package for the Pi I came across a message like this:

CFLAGS += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp #-mcpu=cortex-a8
and 
CFLAGS += -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard

I know the difference between -march and -mtunu, but what is the difference between armv7-a and arm1176jzf-s? if I'm looking at a new Pi how do I know what flags and argument I should use?

24

At a command prompt, type

cat /proc/cpuinfo

to view CPU information.

The ARM11 chips use version 6 of the ARM instruction set, ARMv6. More recent chips from the ARM Cortex range like the Cortex A7, A8 etc all use the ARMv7 instruction set.

All Pi boards are shipped with an ARM11. The options on the second line look like a better fit for building software for the Pi. The first set of options appears to be for a newer generation of ARM chip.

1

Have you tried the uname command? Specifically uname -a

  • This is giving me the compatible version, not the hardware version (higher) – steampowered Oct 3 '18 at 16:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.