[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Packaging a library that requires cross-compiled code



On Thu, Sep 27, 2007 at 02:59:16AM +0200, David Anderson wrote:
[how best to package a stub for which the cross-compiler isn't in Debian]

[possible solution 1]
> 1) Ship a built copy of the code in the package's .diff.gz, and DTRT
> at package creation time to move the .bin from debian/ to the right
> place in the staging tree. The source code for the .bin is in
> .orig.tar.gz, under a free license. Anyone is free to modify or
> rebuild the .bin, provided they obtain an arm7 cross-compiler by
> non-debian means (instructions provided). People who just want to
> rebuild the package can do so, without caring that there is
> cross-compiled code involved.
> 
> Pro: dead simple, the packaging problem goes away. Con: means shipping
> a binary blob in the source distribution, which appears to be frowned
> upon, regardless of whether the source is also freely available in the
> source distribution.

A slight variant on this would be to ship assembly source (the output of
gcc -S) instead of a binary blob, and cross-assemble that.  If the stub
is 136 bytes long, assembly isn't too bad, and it's a step away from a
binary blob.  This presumes that the cross-tools in Debian can correctly
assemble arm7, which I haven't verified.

But the binary-blob variant is probably simplest, and I'd recommend going
with that to get packaging done and the package in Debian.  Alternately,
check for the compiler, and use it if it's installed.  (And fall back to
the binary blob if it's not there.)

Jon Leonard



Reply to: