libsys: add a dependency for syscall stubs
Make syscall stubs generated by lib/libsys/Makefile.sys depend on it. This will have some false positives, but generating and assembling them is fast. Also add slightly dubious dependencies on compat.h and SYS.h. While here, fix the comment documenting the assembly origin. Reviewed by: kib, emaste Differential Revision: https://reviews.freebsd.org/D51671
This commit is contained in:
+17
-4
@@ -135,15 +135,28 @@ FEATURE_NOTE='\#include <sys/elf_common.h>\nGNU_PROPERTY_AARCH64_FEATURE_1_NOTE(
|
||||
FEATURE_NOTE=''
|
||||
.endif
|
||||
|
||||
${SASM}:
|
||||
printf '/* %sgenerated by libc/sys/Makefile.inc */\n' @ > ${.TARGET}
|
||||
# Add this file as a dependency of the generated assembly along with
|
||||
# the two included files compat.h and SYS.h. Depending on this Makefile
|
||||
# will cause some needless regenerations, but handles both changes in
|
||||
# generated assembly and movement between MIASM and PSEUDO/INTERPOSED.
|
||||
# The dependency on compat.h and SYS.h should properly be on the
|
||||
# <foo>.S-><foo>.o rules, but there are too many .o variants for it to
|
||||
# be easy and touching the geneated source files has the same effect in
|
||||
# practice.
|
||||
__makefile_sys:= ${.PARSEDIR}/${.PARSEFILE}
|
||||
__asm_deps= ${__makefile_sys} \
|
||||
${LIBC_SRCTOP}/include/compat.h \
|
||||
${LIBSYS_SRCTOP}/${LIBC_ARCH}/SYS.h
|
||||
|
||||
${SASM}: ${__asm_deps}
|
||||
printf '/* %sgenerated by libsys/Makefile.sys */\n' @ > ${.TARGET}
|
||||
printf '#include "compat.h"\n' >> ${.TARGET}
|
||||
printf '#include "SYS.h"\nRSYSCALL(${.PREFIX})\n' >> ${.TARGET}
|
||||
printf ${NOTE_GNU_STACK} >>${.TARGET}
|
||||
printf ${FEATURE_NOTE} >> ${.TARGET}
|
||||
|
||||
${SPSEUDO}:
|
||||
printf '/* %sgenerated by libc/sys/Makefile.inc */\n' @ > ${.TARGET}
|
||||
${SPSEUDO}: ${__asm_deps}
|
||||
printf '/* %sgenerated by libsys/Makefile.sys */\n' @ > ${.TARGET}
|
||||
printf '#include "compat.h"\n' >> ${.TARGET}
|
||||
printf '#include "SYS.h"\nPSEUDO(${.PREFIX:S/_//})\n' \
|
||||
>> ${.TARGET}
|
||||
|
||||
Reference in New Issue
Block a user