Nicolas Williams <Nicolas.Williams at sun.com> wrote:

> On Tue, Mar 11, 2008 at 03:24:13PM +0100, Joerg Schilling wrote:

> > The problem with crosss compilations is that it does not really work if the 
> > software uses dynamic autoconfiguration for portability.
>
> That doesn't make cross-compilation useless.

I don't like to say this, but it makes cross compilation harder than people may 
expect. Many people believe that cross compilation is easy because the GNU 
autoconf documentation incorrectly claims this is something that works by 
default. In fact, GNU autoconf provides some basic fallback definitions that 
apply for Linux and that may allow to compile a piece of software on a 
different 
Linux platform. If you like or need to go beyond this, you start hand crafting 
the "autoconf results".


> > You would first need to hand craft _all_ autoconfiguration results for the 
> > target platform.
>
> Not in the ON consolidation, for example, but yes in SFW (which really
> means that SFW might well never cross-build).

This is no longer true for ON since ON contains ksh93 and if more software that 
uses dynamic configuration is added to ON, things become even harder. 

Note that you cannot create a non-portable (static) variants from ksh93, star, 
cdrtools, ... for Solaris because nobody would pay for this unneeded fork.

In order to avoid confusion: ksh93 creates static include files for the ISAs 
that are already supported in native compile mode. New platforms need new 
include files. 

> This case will help third parties who want to cross-build using GCC but
> cross-link with the Solaris linker.  So there are worthy use cases, even
> though they won't generalize to all developers.  If we can also leverage
> this in any OpenSolaris consolidations, all the better, and if not, oh
> well.

It is worth to do (in special as the GNU ld also does it) but the pitfalls 
should be documented.

J?rg

-- 
 EMail:joerg at schily.isdn.cs.tu-berlin.de (home) J?rg Schilling D-13353 Berlin
       js at cs.tu-berlin.de                (uni)  
       schilling at fokus.fraunhofer.de     (work) Blog: 
http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily

Reply via email to