1

I would like to try out Gentoo and I started a Pygoscelis Papua instance on Amazon EC2.

How do I install the latest version of gcc to compile my programs?

I tried

emerge -u gcc
gcc-config -l

as it says in "Upgrading GCC" section of Gentoo wiki, but it only shows one option of gcc 4.7.3; I'd like to use 4.9.0 or 4.9.1.

  • First of all, Pygoscelis Papua rather sound like describing Ubuntu. To your problem: GCC is not officially supported by Gentoo, yet, and it's not advisable to mess around with a toolchain's core util if you're new to Gentoo (it's over all no good idea). – Andreas Wiese May 16 '14 at 17:08
  • @Andreas oh, really? Does Gentoo use clang as a main compiler? I didn't think gcc is not supported, because I saw it was available. And wiki entry for Clang tells me that "not all packages build correctly with it". – Nickolai Leschov May 16 '14 at 17:23
  • Well, sorry! I forgot one important thing: GCC 4.9 is not (yet) supported. Gentoo uses GCC, but since everything usually is built from the end-user and thus has to work more or less out-of-the-box (more being better), transition to a more recent version of core components like compiler, libc, etc. usually takes a bit longer with Gentoo. – Andreas Wiese May 17 '14 at 0:34
0

I trayed Gentoo with gcc-4.9.0. It works very good.
It has compiled only cairo and firefox with gcc-4.8.3.

My flags march=ivybridge -O2(3) -mfpmath=sse -mavx -mmmx -pipe.

Sometimes I used -ffast-math -ftree-vectorize -funroll-loop (scientific).
Some packages compile only with ~amd64.

  • Hi noob, welcome on unix.stackexchange: the question seems to ask how to install gcc more than the always useful information about which flags produce better results. If you mind improve your answer editing it with this link – Hastur Jul 20 '14 at 20:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.