> Date: Wed, 8 Mar 2023 08:58:47 -0500 (EST) > From: Mouse <mo...@rodents-montreal.org> > > Ugh, I hate using build.sh for small things like individual kernels. > It always (well, far too often, at least) insists on rebuilding make, > which takes significant time on some machines, like my shark, and > requires extra writable filesystem space. If there's a reasonably easy > way to avoid it, I prefer to.
You could just cross-build on a modern machine for your shark... > I don't squawk much about build.sh because it does bring benefits; the > biggest one I notice is probably painless cross-compiles. But I'd > never run into this price before. 5.2 doesn't exhibit the misbehaviour > at all, so I couldn't've noticed it except at work, and I think I've > never tried to build a kernel without /usr/src in place before (at work > or not). > [...] > > The problem is that NETBSDSRCDIR cannot be inferred for a randomly > > located kernel builddir and sys/lib/libkern/Makefile.compiler-rt uses > > it. > > In that case, maybe config(1) should write a suitable setting of > NETBSDSRCDIR into the Makefile it generates? At least when -s is given > with an absolute path? It does put `S=/path/to/src/sys' into the kernel makefile, and _most_ of the kernel makefiles are written to use paths relative to $S, but it looks like some ${NETBSDSRCDIR} has crept in between 5.2 and 9.1. It probably wouldn't be wrong to make them use $S instead of ${NETBSDSRCDIR}, but you might be the first person to be affected by this in years.