From 786c805027b1e5d026b11b7475ac826038b442f7 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Fri, 12 Aug 2016 11:06:54 +0000 Subject: [PATCH] PORTS_MODULES: Don't leak in CC/CXX/CPP. These may have ccache in them or -target/--sysroot from external compiler or SYSTEM_COMPILER support. Many ports do not support a CC with spaces in it, such as emulators/virtualbox-ose-kmod. Passing --sysroot to ports makes no sense as ports doesn't support --sysroot currently. If these variables need to be overridden for ports then they can be set in make.conf or passed as make arguments. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division --- sys/conf/kern.post.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index 4cb60c002b62..32ec5b1b445c 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -65,6 +65,10 @@ OSRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ # Keep the related ports builds in the obj directory so that they are only rebuilt once per kernel build WRKDIRPREFIX?= ${MAKEOBJDIRPREFIX}${SRC_BASE}/sys/${KERNCONF} PORTSMODULESENV=\ + env \ + -u CC \ + -u CXX \ + -u CPP \ PATH=${PATH}:${LOCALBASE}/bin:${LOCALBASE}/sbin \ SRC_BASE=${SRC_BASE} \ OSVERSION=${OSRELDATE} \