IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
3 replies Latest Post - ‏2014-08-19T19:57:03Z by sjmunroe
18 Posts

Pinned topic Which versions of GCC for Linux on Power are supported?

‏2014-08-19T12:53:54Z |
I have a query about which versions of gcc support the Power8 processors with Linux.
At present, the latest version of gcc in use in our build environment is 4.8.2.   When you look at the gcc 4.8.x manual it clearly shows options for the Power8 architecture (i.e., -mcpu=power8 -mtune=power8). However, the gcc 4.9.x documentation shows support for Power 8 as a new feature.
Just to add to the confusion, the IBM Advance Toolchain for PowerLinux 7.0-0 says that it includes gcc4.8.1 and defaults to mcpu=power7 ­mtune=power8.  This implies to me that the gcc 4.8.x support should be working.
In the context of Power8 support, can someone help us understand the differences between GCC in the distros, GCC in the community, and GCC with the Advance Toolchain?

Why does the Advance Toolchain 7.0-0 default to -mcpu=power7?


  • tuliom
    15 Posts

    Re: Which versions of GCC for Linux on Power are supported?

    ‏2014-08-19T13:32:10Z  in response to PowerLinuxFAQ

    The basic support for POWER8 in GCC has been added in November 2012, when 4.8 was still under development. This is when -mcpu=power8 became available.
    However a complete support to the POWER ISA 2.07 became available in GCC 4.9.0 and 4.8.3 as well as the support for little endian.

    It's important to mention the support of a new processor requires a collaboration of different projects, like GNU Binutils, glibc and Linux.

    The Advance Toolchain is based on different branches of the GCC repository, available under branches/ibm. These branches supported POWER8 since the beginning of version 4.8 and have been slowly updated in order to add more features.
    The Advance Toolchain defaults to -mcpu=power7 in order to ensure the applications will run on POWER7. If that's changed to -mcpu=power8 it would mean all the programs built with AT wouldn't run on POWER7 by default as the compiler would start using POWER8 instructions.

    The official GCC releases are maintained by the FSF (Free Software Foundation) in their SVN. Every distributor of the GCC (including distros and AT) take that code and modify it. That's necessary in order to fix bugs that have not yet been fixed in the FSF code or in order to add features that are still under review by the community.

  • Bill_Buros
    151 Posts

    Re: Which versions of GCC for Linux on Power are supported?

    ‏2014-08-19T14:01:45Z  in response to PowerLinuxFAQ

    In general, we recommend using the Advance Toolchain packages for the level of GCC that you want.

    Recently, Advance Toolchain 7.0-5 was announced as an update.

    In addition, Advance Toolchain 7.1-1 was also made available. 

    Advance Toolchain 7.1 provides support for ppc64le (for example, Ubuntu 14.04).  

    For more details on the Advance Toolchain, read this page.

  • sjmunroe
    8 Posts

    Re: Which versions of GCC for Linux on Power are supported?

    ‏2014-08-19T19:57:03Z  in response to PowerLinuxFAQ

    Tuliom explained it well.

    The LTC works directly with the FSF/Linux community to enable community toolchain components for POWER. All changes and features are submitted to the community package owners first. Once a patch or feature is accepted upstream we back-port to key supported/stable toolchains.

    But as Tulio explained, no one uses a straight (unpatched) FSF GCC in their production toolchain. Each Distro has their own set of patches that they think delivers correctness and stability across all the platforms they support. We work with our Linux Distribution Partners to get critical patches and features for POWER into the Distro toolchains. Each Distro makes the final decision on the GCC version they use and which patches they accept.

    We do something simular for the Advance Toolchain, Only we focus on enabling the latest POWER hardware while maximizing the perfomance and stability for POWER. We have the advantage of developing most of the POWER specific features in the first place.

    The other advance advantage of the Advance Toolchain is we track the GCC release schedule and product a new AT version for each major release of GCC (AT6.0 for GCC4.7, AT7.0 for GCC4.8, and AT8.0 for GCC4.9, ...). Also AT releases are independant of the Distro schedules and can release fixes and support new hardware features ahead of most distros.


    Updated on 2014-08-19T21:40:57Z at 2014-08-19T21:40:57Z by sjmunroe