Hi Lorenzo, > Date: 2026-09-15 17:47:59+0100 > From: "Lorenzo Stoakes (ARM)" > [...] > > From what I've seen, the kernel seems to use regular 'pattern rules' > > extensively. I wonder if moving to 'static pattern rules' would bring > > a benefit similar to the one we experience in the Linux man-pages > > project. > > Hmm intersting :) > > I think the kernel is complicated by a lot of 'flexibility' in the build > process. > > And probably simplifying it is difficult in some cases. Yup. > > Another important thing is that the build system of the Linux man-pages > > uses a single make(1) process to build (i.e., we don't use recursive > > make(1)). That makes it parallelize better. I'm not sure whether the > > kernel makefiles are recursive (for the main build) and how much that > > affects the kernel build. It might be something to check too, as I > > remember it was very impactful. Recursive make(1) is considered harmful > > by some (I agree, IME). > > Yeah I don't think that's at all feasible for the kernel :) I think it should be possible. At least, it could be reduced significantly. > Ideally we'd use something other than GNU make honestly. I'd suggest to keep GNU make(1). Well written GNU makefiles can be quite fast. And being makefiles, they're relatively easy to read (like with C, it depends on how weird you want to go), at least to some degree. Something I love from the kernel (and which I've also done in the man-pages) is that it's a single-step build system. Multi-step (configure, etc.) build systems are consistently a nightmare, IME. > But it's a step at a time based on what's actually feasible I think, so > low-hanging fruit first! :-) Have a lovely day! Alex --