It's used to create a variable which is only going to be used in certain phases, but it still seems wrong to define this in global scope, no?
But it's not called in global scope? It's just plain text that's going to evaluated during phases. Note the =''
Same goes for KV_OUT_DIR which isn't even usable yet in global scope, these are meant to go through "eval" later. BUILD_PARAMS='V=1 LD="$(tc-getLD)" KERNEL_SOURCE_DIR="${KV_OUT_DIR}"'
I suppose this is the same as the PATCHES question -- if a variable isn't going to be evaluated, it's fine. I was thinking about whether it's legal for a package manager to evaluate them ahead of time if it wanted to. I guess not?
I might add that even if I moved this to pkg_setup, it wouldn't remove the UnusedInherit pkgcheck as pkgcheck recognize it as plain text rather than function usage. On that topic, I feel linux-mod consumers should be more careful with BUILD_PARAMS, that it's going to be ran through "eval" is often overlooked and all sort of things are pre-expanded.