Tichun
Posts: 71
Joined: Wed Jul 06, 2016 1:36 pm

GCC in Stretch

Tue Aug 22, 2017 12:13 pm

Why do we have both the GCC 4.9 and the GCC 6?
Correct me if I'm wrong but the older one seems as if it was the default.
Which one should I rather choose when compiling things myself?

User avatar
jahboater
Posts: 6537
Joined: Wed Feb 04, 2015 6:38 pm
Location: Wonderful West Dorset

Re: GCC in Stretch

Tue Aug 22, 2017 12:41 pm

Tichun wrote:
Tue Aug 22, 2017 12:13 pm
Why do we have both the GCC 4.9 and the GCC 6?
Correct me if I'm wrong but the older one seems as if it was the default.
Which one should I rather choose when compiling things myself?
For me "gcc -v" returned 6.3 so I think it is the default.
Taking a look, we have various versions:-

Code: Select all

pi@raspberrypi:~ $ dpkg -l | grep gcc
ii  gcc                             4:6.3.0-4                    armhf        GNU C compiler
ii  gcc-4.6-base:armhf              4.6.4-5+rpi1                 armhf        GCC, the GNU Compiler Collection (base package)
ii  gcc-4.7-base:armhf              4.7.3-11+rpi1                armhf        GCC, the GNU Compiler Collection (base package)
ii  gcc-4.8-base:armhf              4.8.5-4                      armhf        GCC, the GNU Compiler Collection (base package)
ii  gcc-4.9-base:armhf              4.9.3-14                     armhf        GCC, the GNU Compiler Collection (base package)
ii  gcc-5-base:armhf                5.4.1-4                      armhf        GCC, the GNU Compiler Collection (base package)
ii  gcc-6                           6.3.0-18+rpi1                armhf        GNU C compiler
ii  gcc-6-base:armhf                6.3.0-18+rpi1                armhf        GCC, the GNU Compiler Collection (base package)

Strongly suggest using the latest version of the compiler, especially on ARM.

I immediately replace it with gcc 7.2 anyway!

Return to “C/C++”