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

Re: Autobuilding with cross-compiler to solve m68k woes?



Hi Brian,

>     Steve> What if we had the means of reliably determining which
>     Steve> packages could be cross-compiled, and which needed to be
>     Steve> compiled on a native system?  Would that make
>     Steve> cross-compiling a viable option?

> I don't think it is possible to reliably determine in a quick manner
> eg. trying the cross compilation, and checking for any errors might be
> a reliable way(?) of detecting any problems, but it wouldn't be very
> efficient.

I agree that it's not feasible to programmatically predetermine if a package can
be cross-compiled, but there could be other, more efficient ways.  I suspect
that most maintainers know enough about the structure of the software they're
packaging (just as you do) to know if it could be cross-compiled successfully. 
The maintainer has to be involved to a degree no matter what, to create a
package that supports cross-compiling (AFAIK, this isn't currently required of
debian/rules by policy).  So, the maintainer could also set a flag in the
control file that says whether it can be cross-built.  I think this would be a
fairly reliable solution; the maintainer has an incentive to make his packages
cross-buildable, because they can then be built on faster machines and get into
testing more quickly, and everyone else benefits as well, because the queue for
the native build daemon is shorter.  Everyone's happy, including those users
with slow architectures who would otherwise have to wait longer for packages (or
maybe see the port disappear altogether!)

> However, these programs are also used by for the compilation process,
> hence, it wouldn't work. I think fixing this would be difficult using
> current versions of automake (you would have to build to copies of the
> above executables, one native, and one cross compiled).

Yes, there are some packages that a cross-compiler just won't work on without a
lot of effort -- far more effort than it's worth.  But if a cross-compiling
build daemon became generally available, and if only a third of the packages in
Debian can be cross-compiled, then that's already enough to seriously lighten
the load on the native machines.

Steve Langasek
postmodern programmer



Reply to: