On Tue, Jul 20, 2021 at 02:54:35PM -0700, Linus Torvalds wrote: > But there are other things that stick around. In particular, I have > considered simply using git config variables for that. > > Something like this in the main Makefile: > > ARCH=$(shell git config build.arch) > CC=$(shell git config --default=gcc build.cc) > > would actually be optimal for what _I_ do. Then for my clang build tree, I'd do > > git config build.cc clang > > and it would stick in that tree. If you don't set the option, it would use gcc. > > Maybe that would be an acceptable model these days? We've used git > long enough that non-git worries aren't a big deal any more, and I > guess people could use the old-fashioned I still this only papers around the fact that the architecture is fundamentally part of the kernel config and should come from .config, and the toolchain probably as well. I for one do have a few different tree for different projects, but need to try cross compiles in each of them. And unfortunately sometimes with clang (nothing against clang itself [1], just that having to deal with multiple toolchains is a pain) [1] well, except for the sometimes idiotic diagnostics..