Cross-compiling a flatpak

Simon McVittie smcv at collabora.com
Mon Mar 26 10:58:06 UTC 2018


On Fri, 23 Mar 2018 at 14:59:34 -0700, Christian Hergert wrote:
> Relying on qemu-user-static for binary-translation is a great "worst
> case", but most definitely a terrible "best-case".
...
> I think we want to continue to use the cross-architecture runtime with
> qemu-user-static but then add SDK extensions for the native
> cross-compiler. That has the benefit of continuing to work should we
> come across things we didn't think about cross-compiling.

So you end up with something a bit analogous to (a much better version
of) the old Scratchbox environment, where things that are known to be
a performance bottleneck (cross-compilers, architecture-independent build
tools like make and documentation toolchains, etc.) are native x86_64
binaries, but the default is for miscellanous/unknown binaries to be
aarch64 (or whatever) and run via qemu-user-static?

(This is "inside out" if compared with a more traditional cross
environment with the cross-compiler being a native x86_64 binary in the
"real" system, and all aarch64 bits in a sysroot. I think what Corentin
initially had in mind was an x86_64 runtime containing an aarch64
sysroot, which is the same "shape" as a traditional cross environment,
and arguably better for software that already cross-compiles nicely,
but worse for software that makes faulty assumptions about build = host.)

    smcv


More information about the Flatpak mailing list