From 35fb812adfc212234df4c132e1d6bbbb3b168a74 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Mon, 19 Jun 2017 18:08:20 +0000 Subject: [PATCH] buildworld: Define SYSROOT to WORLDTMP. This is to allow downstream Makefiles to know for sure they are building against a sysroot rather than only depending on ${DESTDIR} or other assumptions. This also exports it into buildenv. MFC after: 2 weeks Sponsored by: Dell EMC Isilon --- Makefile.inc1 | 5 +++-- Makefile.libcompat | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 2b8f46b3679a..242e76b24e18 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -563,7 +563,8 @@ KTMAKE= TOOLS_PREFIX=${WORLDTMP} MAKEOBJDIRPREFIX=${WORLDTMP} \ # world stage WMAKEENV= ${CROSSENV} \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ - PATH=${TMPPATH} + PATH=${TMPPATH} \ + SYSROOT=${WORLDTMP} # make hierarchy HMAKE= PATH=${TMPPATH} ${MAKE} LOCAL_MTREE=${LOCAL_MTREE:Q} @@ -722,7 +723,7 @@ IMAKE_MTREE= MTREE_CMD="mtree ${MTREEFLAGS}" .endif # kernel stage -KMAKEENV= ${WMAKEENV} +KMAKEENV= ${WMAKEENV:NSYSROOT=*} KMAKE= ${KMAKEENV} ${MAKE} ${.MAKEFLAGS} ${KERNEL_FLAGS} KERNEL=${INSTKERNNAME} # diff --git a/Makefile.libcompat b/Makefile.libcompat index 2e075ff098f6..3c0aabb2d05f 100644 --- a/Makefile.libcompat +++ b/Makefile.libcompat @@ -111,6 +111,7 @@ LIBCOMPATCXXFLAGS+= -isystem ${LIBCOMPATTMP}/usr/include/c++/v1 -std=c++11 \ LIBCOMPATWMAKEENV+= MAKEOBJDIRPREFIX=${LIBCOMPAT_OBJTREE} \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${TMPPATH} \ + SYSROOT=${LIBCOMPATTMP} \ LIBDIR=/usr/lib${libcompat} \ SHLIBDIR=/usr/lib${libcompat} \ DTRACE="${LIB$COMPATDTRACE:U${DTRACE}}"