35

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?

3 Answers 3

58

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
5

Have you tried the uname command? Specifically uname -a

3
  • 1
    This is giving me the compatible version, not the hardware version (higher) Commented Oct 3, 2018 at 16:08
  • Yeah, this command only says aarch64... not that useful. Commented Mar 3, 2021 at 3:16
  • Very usefull, because it tells me the version! Thanks!
    – musbach
    Commented May 7, 2023 at 15:56
3

as STEJ's answer suggested, run uname -m.

If you have arm64 then it's 64bit and if you have armv7l, then it's 32bit

For more information: https://www.raspberrypi.org/forums/viewtopic.php?t=251721

1
  • armv7l is an armv7 instruction set 32 bit, arm64 is armv7 64 bit? Commented Oct 4, 2021 at 18:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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