On 26/04/17 14:16, fauno wrote:
Luke Shumaker <[email protected]> writes:

On Tue, 25 Apr 2017 13:26:32 -0400,
fauno wrote:
it would be awesome if libretools could cross-build packages without the
need of a native board, like openwrt does.

It can.  Install 'binfmt-qemu-static' and specify '-A armv7h' when
creating the chroot.

(ok, this uses qemu to run ARM binaries on x86, while openwrt uses a
cross toolchain and doesn't run ARM binaries during the build)

he, i meant the latter :P

AFAIK, cross-compiling all packages is almost impossible anyway. There are some programs that require snippets to be run on the host architecture in order to compile them. Distros like openwrt, LibreCMC don't have as many packages, partly because of this (and partly because they use a different libc ... both cause complications, even though cross-compiling is preferable).

That's not to say it may be possible to cross compile a subset, or even the majority in this way. It's just the remaining may be stubborn.

Part of the problem with using qemu to build packages though, is that it requires python to build. And last time I looked, python 2 needed to be patched in order to cross compile. So it kind of creates a chicken and egg problem, if you want to cross-compile up to the minimum required to build all packages (which probably includes qemu), you may have to mess about patching certain programs in order to do so, and if you do that, they will no longer match the generic sources.

But regardless, a good start would be aiming to cross-compile the build environment, so it can be bootstrapped, then the other additional packages can be built on top of this system. If this were to happen, it would make reproducible builds easier, mean less reliance on upstream, help with build server(s), help for porting to new architectures, and help maintain the existing architectures within parabola.

So it would be good if libretools were to be modified to allow for this, as suggested.
_______________________________________________
Dev mailing list
[email protected]
https://lists.parabola.nu/mailman/listinfo/dev

Reply via email to