Author: Timo Teräs POSIX says the behaviour is undefined if atexit callback calls exit(). On glibc it works, but on musl it does not. Call instead _exit() which is guaranteed to work. --- make-3.82.orig/misc.c +++ make-3.82/misc.c @@ -954,6 +954,6 @@ error (NILF, _("write error: %s"), strerror (errno)); else error (NILF, _("write error")); - exit (EXIT_FAILURE); + _exit (EXIT_FAILURE); } }