@@ -444,7 +444,7 @@ BUILD_ARCH!= uname -p
444
444
.endif
445
445
.endif
446
446
WORLDTMP= ${OBJTREE}${.CURDIR}/tmp
447
- BPATH= ${WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/bin
447
+ BPATH= ${CCACHE_WRAPPER_PATH_PFX}${ WORLDTMP}/legacy/usr/sbin:${WORLDTMP}/legacy/usr/bin:${WORLDTMP}/legacy/bin
448
448
XPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin
449
449
STRICTTMPPATH= ${BPATH}:${XPATH}
450
450
TMPPATH= ${STRICTTMPPATH}:${PATH}
@@ -624,8 +624,7 @@ XCFLAGS+= -isystem ${WORLDTMP}/usr/include -L${WORLDTMP}/usr/lib
624
624
# combined with --sysroot.
625
625
XCFLAGS+= -B${WORLDTMP}/usr/lib
626
626
# Force using libc++ for external GCC.
627
- # XXX: This should be checking MK_GNUCXX == no
628
- .if ${X_COMPILER_VERSION} >= 40800
627
+ .if ${X_COMPILER_TYPE} == gcc && ${X_COMPILER_VERSION} >= 40800
629
628
XCXXFLAGS+= -isystem ${WORLDTMP}/usr/include/c++/v1 -std=c++11 \
630
629
-nostdinc++
631
630
.endif
@@ -761,6 +760,16 @@ _worldtmp: .PHONY
761
760
rm -rf ${LIBCOMPATTMP}
762
761
.endif
763
762
.else
763
+ .if exists(${WORLDTMP})
764
+ @echo ">>> Deleting stale files in build tree..."
765
+ ${_+_}cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES \
766
+ delete-old delete-old-libs >/dev/null
767
+ .endif
768
+ .if defined(LIBCOMPAT) && exists(${LIBCOMPATTMP})
769
+ ${_+_}cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES \
770
+ DESTDIR=${LIBCOMPATTMP} \
771
+ delete-old delete-old-libs >/dev/null
772
+ .endif
764
773
rm -rf ${WORLDTMP}/legacy/usr/include
765
774
.if ${USING_SYSTEM_COMPILER} == "yes"
766
775
.for cc in cc c++
@@ -770,7 +779,6 @@ _worldtmp: .PHONY
770
779
fi
771
780
.endfor
772
781
.endif # ${USING_SYSTEM_COMPILER} == "yes"
773
- .endif # !defined(NO_CLEAN)
774
782
775
783
# Our current approach to dependency tracking cannot cope with certain source
776
784
# tree changes, particularly with respect to removing source files and
@@ -813,16 +821,9 @@ _worldtmp: .PHONY
813
821
${OBJTREE}${.CURDIR}/world32/${.CURDIR}/lib/libc/.depend.${f}.*
814
822
.endif
815
823
.endfor
816
- # 20170724 remove stale lib/clang/libllvm/Options.inc file, of which there are
817
- # two different versions after r308421, one for llvm-lib, one for llvm-dlltool
818
- .for d in ${OBJTREE} ${WORLDTMP}
819
- .for f in ${d}${.CURDIR}/lib/clang/libllvm/Options.inc
820
- .if exists(${f}) || exists(${f}.d)
821
- @echo Removing stale generated ${f} files
822
- @rm -f ${f} ${f}.d
823
- .endif
824
- .endfor
825
- .endfor
824
+
825
+ .endif # !defined(NO_CLEAN)
826
+
826
827
.for _dir in \
827
828
lib lib/casper usr legacy/bin legacy/usr
828
829
mkdir -p ${WORLDTMP}/${_dir}
@@ -2337,11 +2338,12 @@ _cddl_lib_libumem= cddl/lib/libumem
2337
2338
_cddl_lib_libnvpair= cddl/lib/libnvpair
2338
2339
_cddl_lib_libavl= cddl/lib/libavl
2339
2340
_cddl_lib_libuutil= cddl/lib/libuutil
2341
+ .if ${MK_ZFS} != "no"
2340
2342
_cddl_lib_libzfs_core= cddl/lib/libzfs_core
2343
+ cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L
2344
+ .endif
2341
2345
_cddl_lib_libctf= cddl/lib/libctf
2342
2346
_cddl_lib= cddl/lib
2343
- cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L
2344
- cddl/lib/libzfs__L: lib/libgeom__L
2345
2347
cddl/lib/libctf__L: lib/libz__L
2346
2348
.endif
2347
2349
# cddl/lib/libdtrace requires lib/libproc and lib/librtld_db; it's only built
@@ -2759,9 +2761,6 @@ CD2MAKE=${CD2ENV} PATH=${CDTMP}/usr/bin:${XDDESTDIR}/usr/bin:${PATH} ${MAKE} ${N
2759
2761
CD2MAKE+= BUILD_TOOLS_META=.NOMETA
2760
2762
.endif
2761
2763
XDDESTDIR=${DESTDIR}/${XDTP}
2762
- .if !defined(OSREL)
2763
- OSREL!= uname -r | sed -e 's/[-(].*//'
2764
- .endif
2765
2764
2766
2765
.ORDER: xdev-build xdev-install xdev-links
2767
2766
xdev: xdev-build xdev-install .PHONY
@@ -2855,7 +2854,7 @@ xdev-links: .PHONY
2855
2854
ln -sf ../../${XDTP}/usr/bin/$$i \
2856
2855
../../../../usr/bin/${XDDIR}-$$i; \
2857
2856
ln -sf ../../${XDTP}/usr/bin/$$i \
2858
- ../../../../usr/bin/${XDDIR}${OSREL }-$$i; \
2857
+ ../../../../usr/bin/${XDDIR}${_REVISION }-$$i; \
2859
2858
done
2860
2859
.else
2861
2860
xdev xdev-build xdev-install xdev-links: .PHONY
0 commit comments