git: 0a5e35a7b181 - main - Makefile.libcompat: Be consistent about not installing includes

From: Jessica Clarke <jrtc27_at_FreeBSD.org>
Date: Fri, 14 Jul 2023 01:37:24 UTC
The branch main has been updated by jrtc27:

URL: https://cgit.FreeBSD.org/src/commit/?id=0a5e35a7b1811308bcb2aa2e6c7e7bd49dfc9770

commit 0a5e35a7b1811308bcb2aa2e6c7e7bd49dfc9770
Author:     Jessica Clarke <jrtc27@FreeBSD.org>
AuthorDate: 2023-07-14 01:36:04 +0000
Commit:     Jessica Clarke <jrtc27@FreeBSD.org>
CommitDate: 2023-07-14 01:36:04 +0000

    Makefile.libcompat: Be consistent about not installing includes
    
    Currently we only pass MK_INCLUDES=no for distribute and install, since
    it's only in LIB${_LIBCOMPAT}IMAKE, which means that we enable includes
    during libraries and thus install includes into worldtmp, despite it
    being shared these days across native and libcompats. This also means
    we're at risk of having headers needed for building against a libcompat
    that don't get installed to the system, but do end up being installed to
    worldtmp. In particular, lib/msun has different fenv.h for aarch64 and
    arm, so aarch64 will need arm's copy when it grows lib32 support, and
    this would be installed to worldtmp, but not to the system, meaning any
    programs that use fenv.h wouldn't be able to be built.
    
    Instead, be consistent, and don't install includes at all during any of
    the libcompat phases, so that we can detect these issues and ensure any
    needed headers are installed for both worldtmp and the system.
    
    Reviewed by:    brooks
    Differential Revision:  https://reviews.freebsd.org/D41030
---
 Makefile.libcompat | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile.libcompat b/Makefile.libcompat
index 72ea4d865647..e8d33b905559 100644
--- a/Makefile.libcompat
+++ b/Makefile.libcompat
@@ -38,10 +38,10 @@ LIB${_LIBCOMPAT}WMAKE+=	${TIME_ENV} ${LIB${_LIBCOMPAT}WMAKEENV} ${MAKE} \
 			OBJTOP=${LIB${_LIBCOMPAT}_OBJTOP} \
 			OBJROOT='$${OBJTOP}/' \
 			MAKEOBJDIRPREFIX= \
+			MK_INCLUDES=no \
 			MK_MAN=no MK_HTML=no
 LIB${_LIBCOMPAT}IMAKE+=	${LIB${_LIBCOMPAT}WMAKE:NINSTALL=*:NDESTDIR=*} \
 			${IMAKE_INSTALL} \
-			MK_INCLUDES=no \
 			-DLIBRARIES_ONLY
 
 # Shared logic