From: Miod Vallat Subject: Re: spurious -I argument building libc To: Theo Buehler Cc: tech@openbsd.org Date: Wed, 6 Aug 2025 20:28:53 +0000 > 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? Doh! I had missed this one. How about this better diff, then? Index: Makefile =================================================================== RCS file: /OpenBSD/src/lib/libc/Makefile,v diff -u -p -r1.42 Makefile --- Makefile 12 Nov 2019 04:38:27 -0000 1.42 +++ Makefile 6 Aug 2025 20:28:34 -0000 @@ -24,6 +24,9 @@ SYMBOL_LISTS= ${LIBCSRCDIR}/Symbols.list LIBCSRCDIR=${.CURDIR} +# needed by a few files in gen/ and string/ to reach other directories, and +# by sys/stack-protector.c to reach ../csu +CFLAGS+=-I${LIBCSRCDIR} .include "${LIBCSRCDIR}/Makefile.inc" all: tags Index: citrus/Makefile.inc =================================================================== RCS file: /OpenBSD/src/lib/libc/citrus/Makefile.inc,v diff -u -p -r1.2 Makefile.inc --- citrus/Makefile.inc 5 Sep 2016 09:47:02 -0000 1.2 +++ citrus/Makefile.inc 6 Aug 2025 20:28:34 -0000 @@ -4,4 +4,3 @@ .PATH: ${LIBCSRCDIR}/citrus SRCS+= citrus_none.c citrus_utf8.c -CFLAGS+=-I${.CURDIR} Index: locale/Makefile.inc =================================================================== RCS file: /OpenBSD/src/lib/libc/locale/Makefile.inc,v diff -u -p -r1.28 Makefile.inc --- locale/Makefile.inc 25 Aug 2023 12:45:45 -0000 1.28 +++ locale/Makefile.inc 6 Aug 2025 20:28:34 -0000 @@ -24,4 +24,4 @@ MAN+= nl_langinfo.3 setlocale.3 newlocal wcstol.3 wcstombs.3 wcsxfrm.3 wctob.3 wctomb.3 \ wctype.3 iswctype.3 wctrans.3 towctrans.3 wcwidth.3 -CFLAGS+=-I${.CURDIR} -I${LIBCSRCDIR}/citrus +CFLAGS+=-I${LIBCSRCDIR}/citrus