On Wed, Jun 11, 2025 at 09:38:10AM +0200, Thomas Weißschuh wrote: > Userprogs are built with the regular kernel compiler $CC. > A kernel compiler does not necessarily contain a libc which is required > for a normal userspace application. > However the kernel tree does contain a minimal libc implementation > "nolibc" which can be used to build userspace applications. > > Introduce support to build userprogs against nolibc instead of the > default libc of the compiler, which may not exist. > > Signed-off-by: Thomas Weißschuh <[email protected]> > > --- > This could probably be moved out of the generic kbuild makefiles. > I think the ergonimics would suffer and this functionality could be > used by other users of userprogs. > > Also this does currently not support out-of-tree builds. > For that tools/include/nolibc/*.h and usr/include/*.h would need to be > installed into the build directory.
Thanks! Reviewed-by: Nicolas Schier <[email protected]> Probably overkill, but might it make sense to abort *-nolibc compilation requests for out-of-tree builds? Kind regards, Nicolas
