Bug 693356 - cross-compiling ghostscript
Summary: cross-compiling ghostscript
Status: RESOLVED WONTFIX
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Build Process (show other bugs)
Version: master
Hardware: PC All
: P4 normal
Assignee: Chris Liddell (chrisl)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-24 20:25 UTC by Frederic Devernay
Modified: 2013-06-21 13:25 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
make configure be cross-compiler friendly (712 bytes, application/octet-stream)
2012-09-24 20:25 UTC, Frederic Devernay
Details
a small patch to cross.mak: a cross-compiled echogs cannot be executed (450 bytes, patch)
2012-09-24 20:28 UTC, Frederic Devernay
Details | Diff
a few architecture-specific definitions. these covers most existing architectures gs is being built for (25.97 KB, patch)
2012-09-24 20:31 UTC, Frederic Devernay
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.