Specify the kernel cross-compiler

I’m making a cross-compiled snap with

snapcraft --target-arch=armhf

which automatically results in


which is not fine on my case.

Can the cross-compiler be specified in the snapcraft.yaml file?

1 Like

No it cannot, your mechanism here to override that is to work on a custom plugin, you can do that by copying in the original and making modifications as needed or usual inheritance of classes.

A quick reference on custom plugins can be found at https://docs.snapcraft.io/build-snaps/plugins

alternatively you can indeed just download the linaro toolchain from a scriptlet hack like i do in:


(that would indeed require to not use the kernel plugin at all and do all bits (configure, make, make modules) from that scriptlet)