On 02/03/11 18:09, Matthias Klose wrote:
On 02.03.2011 19:02, Andrew Stubbs wrote:
On 02/03/11 17:52, Nicolas Pitre wrote:
Building a cross-compiler is already a challenge in itself. Would be better to build a version that can be installed anywhere like the CodeSourcery releases and offer that as a tar download.
Binaries that can be run anywhere are challenging. You either have to static link (and even then you need to be careful what syscalls you use), or you have to build them against some ancient libraries, and static link the less ubiquitous dependencies (such as mpfr, ppl, etc.).
I didn't try this, so I don't know if it's feasible.
- build packages in a PPA, say, for an "old" release, e.g. hardy, including mpfr, ppl, and other dependencies.
- unpack a set of deb's with dpkg -x
- relocate to /usr/local, or /opt/linaro. The toolchain itself should be relocatable
- pack a tarball.
Again, not tried, but this way you would end up with exactly the same binaries that you provide in a PPA.
Well, that process is fine for Debian/Ubuntu users, but not-so-good for Suse/Redhat/Centos/Fedora/Arch/etc. I think it would be better if they worked anywhere (including Windows).
The toolchain *is* relocatable, but you need to be careful about the search paths and such. By default GCC will search for binaries and libraries relative to itself first, then in the location it was configured to be installed, and then in the standard places (IIRC, ICBW). Whatever, there can be a few interesting gotchas if you aren't careful.
Andrew