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?

Darth Vader
  • 4,206
  • 24
  • 45
  • 69
kun
  • 461
  • 1
  • 4
  • 5

3 Answers3

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.

Steve
  • 1,431
  • 10
  • 8
  • https://stackoverflow.com/questions/76668304/confusion-regarding-arm-architecture-used-in-raspberry-pi-4-model-b/77732274#77732274 – Ershan Dec 29 '23 at 13:39
5

Have you tried the uname command? Specifically uname -a

STEJ
  • 321
  • 2
  • 5
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