From 90d4415d20c7457693fdd9815876c0b4f5f87379 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Fri, 26 May 2017 00:51:05 +0000 Subject: [PATCH] libc: rm stale generated files which are no longer syscalls This is an attempt to help -DNO_CLEAN builds after r302092 (which removed the pipe libc syscall wrapper) and r318736 (which removed getdents, lstat, mknod, and stat). Dependencies cannot cope with certain source tree changes, particularly with respect to removing source files and replacing generated files. Handle these cases from _worldtmp in an ad-hoc fashion. Reviewed by: bdrewery, cem Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D10876 --- Makefile.inc1 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index 5b518cc754b3..337b28721f91 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -707,6 +707,21 @@ _worldtmp: .PHONY .else rm -rf ${WORLDTMP}/legacy/usr/include .endif +# Dependencies cannot cope with certain source tree changes, particularly +# with respect to removing source files and replacing generated files. +# Handle these cases here in an ad-hoc fashion. +# 20170523 remove stale generated asm files for functions which are no longer +# syscalls after r302092 (pipe) and r318736 (others) +.for f in getdents lstat mknod pipe stat +.if exists(${OBJTREE}${.CURDIR}/lib/libc/${f}.s) || \ + exists(${OBJTREE}${.CURDIR}/lib/libc/${f}.S) + @echo Removing stale generated ${f} syscall files + @rm -f ${OBJTREE}${.CURDIR}/lib/libc/${f}.* \ + ${OBJTREE}${.CURDIR}/lib/libc/.depend.${f}.* \ + ${OBJTREE}${.CURDIR}/world32/${.CURDIR}/lib/libc/${f}.* \ + ${OBJTREE}${.CURDIR}/world32/${.CURDIR}/lib/libc/.depend.${f}.* +.endif +.endfor .for _dir in \ lib lib/casper usr legacy/bin legacy/usr mkdir -p ${WORLDTMP}/${_dir}