Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154954955
D16814.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D16814.diff
View Options
Index: head/Makefile.inc1
===================================================================
--- head/Makefile.inc1
+++ head/Makefile.inc1
@@ -950,7 +950,7 @@
.else
${_+_}@if [ -e "${WORLDTMP}" ]; then \
echo ">>> Deleting stale files in build tree..."; \
- cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES \
+ cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES _NO_INCLUDE_COMPILERMK=t \
delete-old delete-old-libs >/dev/null; \
fi
rm -rf ${WORLDTMP}/legacy/usr/include
@@ -1003,19 +1003,21 @@
@echo "--------------------------------------------------------------"
@echo ">>> stage 2.1: cleaning up the object tree"
@echo "--------------------------------------------------------------"
- ${_+_}cd ${.CURDIR}; ${WMAKE} ${CLEANDIR}
+ # Avoid including bsd.compiler.mk in clean and obj with _NO_INCLUDE_COMPILERMK
+ # since the restricted $PATH might not contain a valid cc binary
+ ${_+_}cd ${.CURDIR}; ${WMAKE} _NO_INCLUDE_COMPILERMK=t ${CLEANDIR}
.if defined(LIBCOMPAT)
- ${_+_}cd ${.CURDIR}; ${LIBCOMPATWMAKE} -f Makefile.inc1 ${CLEANDIR}
+ ${_+_}cd ${.CURDIR}; ${LIBCOMPATWMAKE} _NO_INCLUDE_COMPILERMK=t -f Makefile.inc1 ${CLEANDIR}
.endif
.else
- ${_+_}cd ${.CURDIR}; ${WMAKE} _cleanobj_fast_depend_hack
+ ${_+_}cd ${.CURDIR}; ${WMAKE} _NO_INCLUDE_COMPILERMK=t _cleanobj_fast_depend_hack
.endif # !defined(NO_CLEAN)
_obj:
@echo
@echo "--------------------------------------------------------------"
@echo ">>> stage 2.2: rebuilding the object tree"
@echo "--------------------------------------------------------------"
- ${_+_}cd ${.CURDIR}; ${WMAKE} obj
+ ${_+_}cd ${.CURDIR}; ${WMAKE} _NO_INCLUDE_COMPILERMK=t obj
_build-tools:
@echo
@echo "--------------------------------------------------------------"
Index: head/share/mk/bsd.compiler.mk
===================================================================
--- head/share/mk/bsd.compiler.mk
+++ head/share/mk/bsd.compiler.mk
@@ -33,6 +33,16 @@
.include <bsd.opts.mk>
+.if defined(_NO_INCLUDE_COMPILERMK)
+# If _NO_INCLUDE_COMPILERMK is set we are doing a make obj/cleandir/cleanobj
+# and might not have a valid compiler in $PATH yet. In this case just set the
+# variables that are expected by the other .mk files and return
+COMPILER_TYPE=none
+X_COMPILER_TYPE=none
+COMPILER_VERSION=0
+X_COMPILER_VERSION=0
+COMPILER_FEATURES=none
+.else
# command = /usr/local/bin/ccache cc ...
# wrapper = /usr/local/libexec/ccache/cc ...
CCACHE_BUILD_TYPE?= command
@@ -220,4 +230,5 @@
.if !defined(_NO_INCLUDE_LINKERMK)
.include <bsd.linker.mk>
.endif
+.endif # defined(_NO_INCLUDE_COMPILERMK)
.endif # !target(__<bsd.compiler.mk>__)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, May 1, 7:31 AM (2 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32562339
Default Alt Text
D16814.diff (2 KB)
Attached To
Mode
D16814: Don't run cc --version during cleandir/obj stages
Attached
Detach File
Event Timeline
Log In to Comment