Specify compiler in kernel's snapcraft.yaml

How can we specify compiler in kernel’s snapcraft.yaml just like we did in gadget’s?

build: |
    CROSS_COMPILE=${ROOT}/arm-linux-gnueabihf- make

What are you building there? Can you give some more context?

when building bootloaders or kernels for the sunxi (allwinner) architecture you strictly need to use at least gcc6 because there is assembler code in use in these trees that only gcc6 and newer can handle … (i tend to build my kernel and uboot snaps in an artful chroot to achieve that, but being able to simply use an external gcc6 build would work around this)

Note that this could indeed be achieved by using a “prepare:” snippet that downloads gcc6 externally (from linaro or so) and puts it into place … you can then point to it from the “build:” scriptlet …