Hello, Not long ago I found myself in need of setting an Solaris 11 (or to be precise, OpenIndiana) cross-compiler on my Gentoo box. Unsurprisingly I was not the first person to want to do this and I found the following: https://www.virtualbox.org/wiki/SolarisCrossCompiler https://www.cis.upenn.edu/~milom/cross-compile.html In a nutshell, regardless of the target hardware architecture (i386 in my case) the tricky bit about this particular configuration is that there is (currently?) no libc one can emerge on the Linux box; it is instead necessary to copy the necessary header files from an OpenIndiana machine. Having done so, with the destination in /usr/i386-pc-solaris2.11, I succesfully manually compiled binutils-2.25.1 and gcc-4.6.4, which were subsequently able to produce an OpenIndiana-compatible "Hello world" binary from C++ sources. Afterwards I tried to install binutils and gcc using crossdev, and unfortunately that is when problems started. Specifically, stage 0 (i.e. binutils) completed without a hitch but during stage 1: - installation of linux-headers caused several collisions with header files already present in the sysroot; worked around by temporarily setting FEATURES="-collision-protect" and restoring overwritten files afterwards; - compilation of minimal gcc failed due to allegedly missing pthread.h, even though the header file in question *has* been downloaded from the Solaris box; my guess is that it couldn't be found because unlike binutils, the gcc ebuild doesn't pass the --with-sysroot option to configure. Anyway, it seems that Solaris targets in crossdev need some work in order to become usable. Unfortunately I know next to nothing about crossdev internals so at least so far I have been unable to contribute anything like that myself, I shall however be happy to provide any information which might be useful in resolving the issue.
the hard part is creating the ebuilds to package up the OS/libc headers. adding the package selection to crossdev itself is dirt simple. i have no problem doing the latter, but i don't have interest in the former currently.
Unfortunately neither have I, especially given that the "copy the whole /usr/lib from a Solaris box" has in the end worked for me. The part I'm mostly interested in is fixing the gcc compilation error - it does build correctly by hand with --with-sysroot set.
What about some (framework to support) target specific scripts to collect the target's libs+headers, using the target's package manager to identify the really necessary files rather than "copying whole /usr/lib"?
Between how long this ticket has been open and the fact I haven't got access to Solaris machines any more, I think it's safe to close it.