Cross compiler for a RHEL ppc64le target

1.5k Views Asked by At

I've attempted to use crosstool-ng to make a cross compiler for RHEL7.1 power which means:

  • ppc64le (powerpc 64bit little endian)
  • glibc 2.17
  • kernel 3.10

I feel I'm missing some essential patch because I get the message

[INFO ]  =================================================================
[INFO ]  Installing C library headers & start files
[INFO ]    =================================================================
[INFO ]    Building for multilib 1/1: ''
[EXTRA]      Configuring C library
[ERROR]      checking sysdep dirs... configure: error: The powerpc64le is not supported.

Any help appreciated

2

There are 2 best solutions below

0
On

You can try the IBM Advanced Toolchain, it has a good ppc64le cross compiler built for x86-64 processors.

Check out the docs here: https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/W51a7ffcf4dfd_4b40_9d82_446ebc23c550/page/IBM%20Advance%20Toolchain%20for%20PowerLinux%20Documentation?section=cross_compiler

2
On

Which GCC version do you use? The Red Hat Enterprise Linux 7 system compiler is GCC 4.8, but the ppc64le support in it is a custom backport. Upstream GCC support only landed in version 4.9. Furthermore, glibc support for ppc64le was added upstream in version 2.19, retroactively versioned to 2.17.

If you want to build a ppc64le toolchain from scratch that is compatible with Red Hat Enterprise Linux 7, you'll have to retrace these backports and construct something similar. (Using newer versions will not result in ABI compatibility with Red Hat Enterprise Linux 7, only with distributions which ship at least these versions as a baseline.)

If you do not absolutely need a cross compiler, starting with the Developer Toolset software collection might be easier. Asking Red Hat support about DTS on ppc64le could make sense as well.