Download raw body.
spurious -I argument building libc
On Wed, Aug 06, 2025 at 05:16:40PM +0000, Miod Vallat wrote:
> I have noticed that .c files in libc get built with -I/usr/src/lib/libc
> being passed twice.
>
> This is because locale/Makefile.inc adds -I${.CURDIR}, supposedly to
> reach files in locale/, but first, all .h files there are only used by
> .c files in the same directory and included using "", not <>, and
> second, this Makefile fragment gets sourced by the top-level libc
> Makefile, so ${.CURDIR} points at libc, not libc/locale.
Similar reasoning applies to the -I${.CURDIR} in citrus/Makefile.inc
which is responsible for the second -I/usr/src/lib/libc as far as I
can see. Should such an -I not come from the top-level libc/Makefile.inc?
It feels wrong that the #include "thread/rthread.h" from gen/sigwait.c
depends on an -I line set in citrus/Makefile.inc.
spurious -I argument building libc