mung
Posts: 506
Joined: Fri Nov 18, 2011 10:49 am

Compiling for rpi2

Mon Mar 02, 2015 5:19 pm

I think some of this may have been covered, I have not done extensive research so thought I would post what I have found and ask if anyone has further advice or info on what will be happening to improve rpi2 support.

I have heard gcc does not yet have good support for armv7 and linaro is the better compiler, will there be a version of the linaro compiler that runs on the rpi2?.

I get the feeling raspbian defaults to gcc-4.5 so try 'apt-get install gcc.4.6' or 'apt-get install gcc.4.8'

compile with 'make -j4 CC=gcc-4.8 -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard'

Anyone have any other tips on getting the best from the new hardware?

Will there be a way to get ARMv7 optimized libraries on raspbian with apt-get?

Heater
Posts: 16091
Joined: Tue Jul 17, 2012 3:02 pm

Re: Compiling for rpi2

Mon Mar 02, 2015 5:36 pm

The "Linaro" compiler is gcc, as used on the Pi.

Do you have any particular requirement for the gcc supplied with Raspbian to be any newer version than it is? If so what?

Benchmarks I have seen indicate it's doing pretty well.

Raspian cannot be expected to use by default or be built with any version of GCC that is not used by Debian as far as I can tell. Mostly no reason to.
Memory in C++ is a leaky abstraction .

Return to “General discussion”