Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 592972 - sys-devel/crossdev: add cross-toolchain for ppc64le platform
Summary: sys-devel/crossdev: add cross-toolchain for ppc64le platform
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Crossdev team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: crossdev-bugs
  Show dependency tree
 
Reported: 2016-09-06 05:23 UTC by Leno Hou
Modified: 2017-12-28 17:56 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leno Hou 2016-09-06 05:23:16 UTC
sys-devel/crossdev does not support working on x86 to cross-toolchain for ppc64le platform.

Reproducible: Always

Steps to Reproduce:
1.  emerge crossdev
2.  crossdev -t powerpc64le-unknown-linux-gnu
3.  unknown platform and can't build cross-toolchain for ppc64le platform
Actual Results:  
unable to build cross-toolchain for ppc64le platform

Expected Results:  
crossdev -t powerpc64le-unknown-linux-gnu success build cross-toolchain for ppc64le platform
Comment 1 Mike Gilbert gentoo-dev 2016-09-07 15:59:21 UTC
What version of crossdev? What error occurs?

Please attach logs.
Comment 2 Lu Bin 2016-09-08 08:05:02 UTC
(In reply to Mike Gilbert from comment #1)
> What version of crossdev? What error occurs?
> 
> Please attach logs.

Hi Mike,
I have review the source code of crossdev and also I have tested crossdev in x86/ppc64le for target of ppc64le.
such as: crossdev -t powerpc64le-cros-linux-gnu
 or crossdev -t powerpc64le-unknown-linux-gnu

The generated toolchain works well.
We can use the generated toolchain to comile the c/c++ files. And the output files can be work well in ppc64le platform.

My conclusion is: the main function of crossdev for ppc64le works well.
And we should add some little features for it,like:
1, optimize the help info in /usr/bin/crossdev. 
2, maybe we should add new architecture of 'ppc64le' for ${TARCH} 
3, the version of glibc should be >= 2.23, so maybe we should add this information in /etc/portage/package.accept_keywords

By the way, my testing environment is:
docker create -v /usr/portage --name portage gentoo/portage
docker run --volumes-from portage --name gentoo -it gentoo/stage3-amd64 /bin/bash
Comment 3 Leno Hou 2016-09-09 03:06:21 UTC
> 1, optimize the help info in /usr/bin/crossdev. 
> 2, maybe we should add new architecture of 'ppc64le' for ${TARCH} 

Hi Bin,

Could you sent the draft patch that cover above comments ? Thanks
Comment 4 R030t1 2017-09-10 19:50:21 UTC
Hello,

Sorry, I am not sure how the existing comments correspond to fixing crossdev. What I can say however is that the CHOST parsing in crossdev is not very precise, which leads to sporadic errors in builds if it is partially detected.

In this case the addition of "le" seems to make it fail the checks in parse_target(). I had a similar issue with armv7me; I had to call it armv7e or armv7. At this point I had to switch to an alternative build script to support OSless hosts for ARM.

With RAP, I must select a profile that sets a CHOST of powerpc64. powerpc64le remains undetected.

Having looked at crossdev I am not entirely sure what fails. In any case, having talked to GCC developers I think crossdev is not building GCC properly, and the various stages may not be entirely necessary.

Please refer to https://github.com/FreddieChopin/bleeding-edge-toolchain.

Cheers,
     R0b0t1
Comment 5 R030t1 2017-09-10 19:53:12 UTC
C.f. bug 564752, bug 583400. Likely similar cause.
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2017-12-28 17:56:11 UTC
As we have only >=glibc-2.25 unmasked crossdev should Just Work at last for powerpc64le-unknown-linux-gnu target.