home ~ # crossdev -t sparc-unknown-linux-gnu ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- * Host Portage ARCH: amd64 * Target Portage ARCH: sparc * Target System: sparc-unknown-linux-gnu * Stage: 4 (C/C++ compiler) * binutils: binutils-[latest] * gcc: gcc-[latest] * headers: linux-headers-[latest] * libc: glibc-[latest] * PORTDIR_OVERLAY: /usr/local/portage * PORT_LOGDIR: /var/log/portage * PKGDIR: /usr/portage/packages/cross/sparc-unknown-linux-gnu * PORTAGE_TMPDIR: /var/tmp/cross/sparc-unknown-linux-gnu _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ * Forcing the latest versions of {binutils,gcc}-config/gnuconfig ... [ ok ] * Log: /var/log/portage/cross-sparc-unknown-linux-gnu-binutils.log * Emerging cross-binutils ... [ ok ] * Log: /var/log/portage/cross-sparc-unknown-linux-gnu-linux-headers-quick.log * Emerging cross-linux-headers-quick ... [ ok ] * Log: /var/log/portage/cross-sparc-unknown-linux-gnu-glibc-headers.log * Emerging cross-glibc-headers ... [ ok ] * Log: /var/log/portage/cross-sparc-unknown-linux-gnu-gcc-stage1.log * Emerging cross-gcc-stage1 ... [ ok ] * Log: /var/log/portage/cross-sparc-unknown-linux-gnu-linux-headers.log * Emerging cross-linux-headers ... [ ok ] * Log: /var/log/portage/cross-sparc-unknown-linux-gnu-glibc.log * Emerging cross-glibc ... [ ok ] * Log: /var/log/portage/cross-sparc-unknown-linux-gnu-gcc-stage2.log * Emerging cross-gcc-stage2 ... * gcc failed :( * If you file a bug, please attach the following logfiles: * /var/log/portage/cross-sparc-unknown-linux-gnu-info.log * /var/log/portage/cross-sparc-unknown-linux-gnu-gcc-stage2.log I will attach those files also
Created attachment 184673 [details] 1
Created attachment 184674 [details] 2
It's got something to do with sparc multilib, #233130 are some remarks and more.
Continues to fail with sys-libs/glibc-2.8_p20080602-r1 and sys-devel/gcc-4.3.2-r3. It wants to include a file gnu/stubs-64.h. This means it is trying to build for 64-bit userland, but that is quite wrong for sparc. What cross-sparc-unknown-linux-gnu/glibc installed is stubs-32.h.
Created attachment 188099 [details, diff] toolchain.eclass.patch Can you try to patch your /usr/portage/eclass/toolchain.eclass with the attached patch and see if it works?
Created attachment 188101 [details, diff] toolchain.eclass.patch ups wrong patch, this one's the correct one
I had exactly the same problem and your toolchain-patch fixes the problem! Thanks :) With the patch from #233130: ln -s lib32 /usr/sparc-unknown-linux-gnu/lib ln -s lib32 /usr/sparc-unknown-linux-gnu/usr/lib the crosscompile (Host amd64, Target sparc, Stage 4) process works just fine :)
(In reply to comment #7) > I had exactly the same problem and your toolchain-patch fixes the problem! > Thanks :) > > With the patch from #233130: > ln -s lib32 /usr/sparc-unknown-linux-gnu/lib > ln -s lib32 /usr/sparc-unknown-linux-gnu/usr/lib > > the crosscompile (Host amd64, Target sparc, Stage 4) process works just fine :) > Yes, this works for me, too. Thanks.
Fixed.