This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Targetting Sparc/Solaris


Sam Brightman wrote:
> Nathan Kidd wrote:
>> If you want your binary to run on Solaris 2.9 you can't link with a
>> libc from e.g. 2.11.  Newer libc symbols will get referenced in
>> your app that won't resolve on an older libc.
> 
> I realised that this may be an issue, but is it a show-stopper? Since
>  the whole idea is to cross-compile (i.e. could well be doing this
> from Linux/Cygwin), the 2.9 libraries won't be available natively.
> And Sun have said that they have no intention of open sourcing
> Solaris before version 10. That would suggest the only way to get the
> libraries may be to have the client send 200MB of files, probably not
> an option. Our app is quite simple by the way, only using C++
> standard libraries, no threading.

If you have no sparc box at all, then in my opinion, the only sane
approach is to go to ebay, pick up an older sparc box with solaris 9 for
a few hundred bucks and then you can a) get your native headers/libs and
b) actually be able to test!

Also note you can pickup Solaris 9 off ebay for $50 bucks new.

> If this is not possible, then further suggestions besides buying a
> 2.9 box are welcome... I'm still seeing the odd message or website
> that says Solaris/Linux ELF is generally a compatible format, and
> Solaris 9 started having Linux libraries (client has gcc and I think
> glibc). Wouldn't this make the original crosstools compiler feasible
> somehow?

I don't know about the Linux compatibility layer, but even if you got it
working how would you do QA? I think you've got to have a physical sparc
box.

> the /usr/lib/libc.so it was trying instead is of course the same one
> that should have been in the tree. So even after sorting out the
> library structure it was the same error. I tried the elflink.c patch
> I mentioned but still had the same problem. So either it is the
> 2.11/2.9 incompatibility you mentioned or else the wrong
> architecture? These libraries, being from my host, are Intel. I think
> that last command is trying to make something to do with libgcc,
> which presumably should be cross-compiled targetting Sparc. So maybe
> I need Sparc libs in the aforementioned directory? Sorry, there are
> so many stages and directories I'm pretty confused now.

If your host is Intel there's no way the libc is going to work for a
sparc compile!

> As in my previous post, it would be tricky to get the libs from the
> target machine. Is there any hope that compiling the earliest
> OpenSolaris ones from source would work somehow? I'm thinking maybe
> the process needs to do bootstrapping in some way like crosstools
> does.

If you're serious about supporting clients you really will need a native
sparc box. As I mentioned, even if you got OpenSolaris libs working
somehow, how would you know the binary works on Solaris 9 without having
a machine to test on ?

http://cgi.ebay.com/SUN-BLADE-100-ULTRA-SPARC-IIe-500MHZ-512MB-20GB-DVD-NIC_W0QQitemZ270138023631QQihZ017QQcategoryZ20328QQcmdZViewItem

Cheers,

-Nathan

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]