Debian wheezy: GCC 4.6 now default

GCC 4.6 is now the default compiler in wheezy. This is what gcc --version says:

% gcc --version
gcc (Debian 4.6.0-6) 4.6.1 20110428 (prerelease)

To celebrate the occasion, I did a quick (non-scientific!) benchmark, comparing old 4.5.2 and new 4.6.0 when compiling 2.6.38 kernel. Test compiles were run on a dual core CPU (make -j2). The old compiler took 1:58.48 to finish (real time), where the new one needed 2:02.47. So, the new one is only a bit (3.4%) slower. I also compared the resulting kernel size (vmlinux.bin) and it was almost the same 2122360 vs 2119448, meaning the new kernel produces a whopping 0.14% more tight code! I'm just kidding, of course. This was just a quick check. To learn more about the new compiler and where it's improvements are, you'd need to browse it's Changelog.

I also noticed that the new kernel is slightly more picky, producing some amount of noise like this during kernel compilation:

net/sched/sch_generic.c: In function ‘dev_graft_qdisc’:
net/sched/sch_generic.c:671:2: warning: the comparison will always evaluate as ‘true’ for the address of ‘noop_qdisc’ will never be NULL [-Waddress]
net/unix/af_unix.c: In function ‘unix_stream_sendmsg’:
net/unix/af_unix.c:1564:22: warning: variable ‘sunaddr’ set but not used [-Wunused-but-set-variable]

I suppose this stuff will be fixed, or appropriate command line switches used for compilation to silence the unwanted warnings.

Short entry today. I still miss properly labeled new packages in my package manager. :(

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

New version

This old news (Submitted by sid on Sun, 2011-05-01 18:47 )

Today (2013/01/17) an upgrade was made, and it reads:

#gcc --version
gcc (Debian 4.7.2-5) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#

How to get 4.6?

What did you do to get the 4.6 as your default for gcc? I had installed the package, but still I am stuck with 4.5...

It's as simple as installing

It's as simple as installing 'gcc' package:

% dpkg -p gcc
Package: gcc
Priority: optional
Section: devel
Installed-Size: 64
Maintainer: Debian GCC Maintainers
Architecture: i386
Source: gcc-defaults (1.104)
Version: 4:4.6.0-5
Provides: c-compiler
Depends: cpp (>= 4:4.6.0-5), gcc-4.6 (>= 4.6.0-1)
Recommends: libc6-dev | libc-dev
Suggests: gcc-multilib, make, manpages-dev, autoconf, automake1.9, libtool, flex, bison, gdb, gcc-doc
Conflicts: gcc-doc (<< 1:2.95.3)
Filename: pool/main/g/gcc-defaults/gcc_4.6.0-5_i386.deb
Size: 5018
MD5sum: 6d4ba1976ddfa474192a451a78505ed5
Description: The GNU C compiler

It depends on gcc-4.6 (>= 4.6.0-1), so gcc-4.6 gets pulled in. You can delete gcc-4.5, gcc-4.5-base etc... after that.

not for me...

Thanks for your reply. I think I must have kind of a messed up system. I had installed wheezy as a netinstall like a month ago, just if that adds information. This is what I got:

% cat /etc/debian_version
wheezy/sid

% cat /etc/apt/sources.list
deb http://ftp.uk.debian.org/debian/ wheezy main contrib non-free
# deb-src http://ftp.uk.debian.org/debian/ wheezy main contrib non-free

deb http://security.debian.org/ wheezy/updates main contrib non-free
# deb-src http://security.debian.org/ wheezy/updates main contrib non-free

# deb http://ftp.uk.debian.org/debian/ wheezy-proposed-updates main contrib non-free
# deb-src http://ftp.uk.debian.org/debian/ wheezy-proposed-updates main contrib non-free

% dpkg -p gcc
Package: gcc
Priority: optional
Section: devel
Installed-Size: 64
Maintainer: Debian GCC Maintainers
Architecture: i386
Source: gcc-defaults (1.99)
Version: 4:4.5.2-2
Provides: c-compiler
Depends: cpp (>= 4:4.5.2-2), gcc-4.5 (>= 4.5.2-3)
Recommends: libc6-dev | libc-dev
Suggests: gcc-multilib, make, manpages-dev, autoconf, automake1.9, libtool, flex, bison, gdb, gcc-doc
Conflicts: gcc-doc (<< 1:2.95.3)
Size: 4974
Description: The GNU C compiler
This is the GNU C compiler, a fairly portable optimizing compiler for C.
.
This is a dependency package providing the default GNU C compiler.

I had installed gcc-4.6-base packages, but after that, gcc still defaulted to gcc-4.5. Also, removal of gcc-4.5-base would cause removal of a whole bunch of packages, including banshee, brasero, eog, and installation of gcc-4.4-base.

Probably I am missing just a small thing, or messed up my system big time.

Is there an easy way to test the status and consistency of my package manager? I really would like to avvoid reinstalling my system from hand, and though I already had compiled gcc myself, I'd rather like to use the package.

Ah, I see what's goin' on.

Ah, I see what's goin' on. wheezy is actually testing, and I'm using sid aka unstable. They're both on the path to wheezy, it's just that new packages land first in unstable, and after some time also in testing. So, if you need new gcc right away, you'd need to use unstable. Or wait a little bit, until the packages find their way to testing.

Now it makes sense

Thanks a lot for the answer. That makes sense, especially since I could not find much info about gcc 4.6 in Debian testing, but never googled for sid, might have shown more then...

OK, I guess I'll just wait, or at some point will dare to try out how unstable unstable really is...