I’m making a cross-compiled snap with
snapcraft --target-arch=armhf
which automatically results in
CROSS_COMPILE=arm-linux-gnueabihf-
which is not fine on my case.
Can the cross-compiler be specified in the snapcraft.yaml file?
I’m making a cross-compiled snap with
snapcraft --target-arch=armhf
which automatically results in
CROSS_COMPILE=arm-linux-gnueabihf-
which is not fine on my case.
Can the cross-compiler be specified in the snapcraft.yaml file?
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:
https://github.com/ogra1/nanopi-neo-gadget/blob/master/snapcraft.yaml#L21
(that would indeed require to not use the kernel plugin at all and do all bits (configure, make, make modules) from that scriptlet)