Skip to content

Instantly share code, notes, and snippets.

@orfeomorello
Created October 20, 2017 15:35
Show Gist options
  • Save orfeomorello/20b41ac582b7589fb45189b175ffadb2 to your computer and use it in GitHub Desktop.
Save orfeomorello/20b41ac582b7589fb45189b175ffadb2 to your computer and use it in GitHub Desktop.
Best Compilation Flags for Raspberry
If you have Raspberry 2 (V1.1): Broadcom BCM2836 ARMv7 Quad Core 32bit Processor, running at 900MHz.
./configure CFLAGS="-Ofast -mtune=cortex-a7 -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -ffast-math" CXXFLAGS="-Ofast -mtune=cortex-a7 -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -ffast-math"
If you have Raspberry 3
./configure CFLAGS="-Ofast -mtune=cortex-a53 -mcpu=cortex-a53 -mfloat-abi=hard -mfpu=neon-fp-armv8 -mneon-for-64bits -ffast-math" CXXFLAGS="-Ofast -mtune=cortex-a53 -mcpu=cortex-a53 -mfloat-abi=hard -mfpu=neon-fp-armv8 -mneon-for-64bits -ffast-math"
Launch the "make" command to force the code to compile always
make --always-make
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment