Bug 693356

Summary: cross-compiling ghostscript
Product: Ghostscript Reporter: Frederic Devernay <frederic.devernay>
Component: Build ProcessAssignee: Chris Liddell (chrisl) <chris.liddell>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P4    
Version: master   
Hardware: PC   
OS: All   
Customer: Word Size: ---
Attachments: make configure be cross-compiler friendly
a small patch to cross.mak: a cross-compiled echogs cannot be executed
a few architecture-specific definitions. these covers most existing architectures gs is being built for

Description Frederic Devernay 2012-09-24 20:25:56 UTC
Created attachment 8967 [details]
make configure be cross-compiler friendly

Here are a few patches for cross compiling gs

The first patch updates the configure.in to make it cross-compiler friendly
Comment 1 Frederic Devernay 2012-09-24 20:28:14 UTC
Created attachment 8968 [details]
a small patch to cross.mak: a cross-compiled echogs cannot be executed
Comment 2 Frederic Devernay 2012-09-24 20:31:00 UTC
Created attachment 8969 [details]
a few architecture-specific definitions. these covers most existing architectures gs is being built for

the two last patches were downloaded from ​http://repository.timesys.com/buildsources/g/ghostscript/ghostscript-9.05/ and work fine for cross-compiling on my mac (see macports ticket https://trac.macports.org/ticket/34962 ).

There are similar patches available on various places (e.g. ​http://git.yoctoproject.org/cgit.cgi/poky-contrib/tree/meta/recipes-extended/ghostscript ).
Comment 3 Chris Liddell (chrisl) 2013-05-07 15:43:26 UTC
A few problems with these patches:

The reason for writing the explicit endian check is because AC_C_BIGENDIAN() has proven buggy and unreliable. Unless those problems have been addressed, I would prefer the idea of adding an endian configure option to override the explicit test.


"cross.mak" is not a file of ours. The solution we have is that you can specify a different AUX_CC used to build the utilities (genconf, genarch, echogs and mkromfs). AUX_CC should be the natve host compiler, rather than the cross compiler.



As of a couple of releases ago, genarch can now pull the architecture definition from the "arch" directory, rather than generating it itself - this was specifically added for cross-compiling.



So it seems to me that, other than the endian check, the other changes are catered for already, though in slightly different ways.

I'll do some digging about the AC_C_BIGENDIAN() problems.
Comment 4 Chris Liddell (chrisl) 2013-06-21 13:25:26 UTC
No response, closing.