summaryrefslogtreecommitdiffstats
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2017-07-21 17:55:40 +0000
committerbdrewery <bdrewery@FreeBSD.org>2017-07-21 17:55:40 +0000
commitb50832e231d58fcbfaae87f92d512cb84ac39687 (patch)
tree9c65b278b837ca52590b90f06d01d96115b7aaf7 /Makefile.inc1
parent06d5fa0600b92e97e90e41785ef10f641bdec89f (diff)
downloadFreeBSD-src-b50832e231d58fcbfaae87f92d512cb84ac39687.zip
FreeBSD-src-b50832e231d58fcbfaae87f92d512cb84ac39687.tar.gz
MFC r320806:
SYSTEM_COMPILER: Ensure there is not a stale compiler in WORLDTMP.
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc110
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index cb53fc3..bd41ec7 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -678,7 +678,15 @@ _worldtmp: .PHONY
.endif
.else
rm -rf ${WORLDTMP}/legacy/usr/include
-.endif
+.if ${USING_SYSTEM_COMPILER} == "yes"
+.for cc in cc c++
+ if [ -x ${WORLDTMP}/usr/bin/${cc} ]; then \
+ inum=$$(stat -f %i ${WORLDTMP}/usr/bin/${cc}); \
+ find ${WORLDTMP}/usr/bin -inum $${inum} -delete; \
+ fi
+.endfor
+.endif # ${USING_SYSTEM_COMPILER} == "yes"
+.endif # !defined(NO_CLEAN)
.for _dir in \
lib lib/casper usr legacy/bin legacy/usr
mkdir -p ${WORLDTMP}/${_dir}
OpenPOWER on IntegriCloud