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
What version of crossdev? What error occurs? Please attach logs.
(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
> 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
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
C.f. bug 564752, bug 583400. Likely similar cause.
As we have only >=glibc-2.25 unmasked crossdev should Just Work at last for powerpc64le-unknown-linux-gnu target.