Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 582652 - sys-devel/crossdev: support i386-pc-solaris2.11
Summary: sys-devel/crossdev: support i386-pc-solaris2.11
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-10 13:57 UTC by Marek Szuba
Modified: 2020-07-02 14:53 UTC (History)
1 user (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 Marek Szuba archtester gentoo-dev 2016-05-10 13:57:40 UTC
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.
Comment 1 SpanKY gentoo-dev 2016-05-17 16:12:30 UTC
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.
Comment 2 Marek Szuba archtester gentoo-dev 2016-08-15 08:08:39 UTC
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.
Comment 3 Michael Haubenwallner (RETIRED) gentoo-dev 2016-08-17 07:34:00 UTC
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"?
Comment 4 Marek Szuba archtester gentoo-dev 2020-07-02 14:53:25 UTC
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.