Index: Makefile.inc1 =================================================================== --- Makefile.inc1 +++ Makefile.inc1 @@ -1469,6 +1469,11 @@ ${_+_}cd ${.CURDIR}/tools/build/options; sh makeman > \ ${.CURDIR}/share/man/man5/src.conf.5 +.if make(sysent) +.include +.endif + +_sysent_PATH= ${WORLDTMP}/legacy/usr/libexec:/usr/libexec:${PATH} _sysent_dirs= sys/kern _sysent_dirs+= sys/compat/freebsd32 _sysent_dirs+= sys/compat/cloudabi32 \ @@ -1479,7 +1484,9 @@ sys/i386/linux sysent: .PHONY .for _dir in ${_sysent_dirs} - ${_+_}${MAKE} -C ${.CURDIR}/${_dir} sysent + @echo "${MAKE} -C ${.CURDIR}/${_dir} sysent" + ${_+_}@env PATH=${_sysent_PATH} LUA=${LUA_CMD} \ + ${MAKE} -C ${.CURDIR}/${_dir} sysent .endfor # @@ -2125,6 +2132,13 @@ ${_bt}-lib/libdwarf: ${_bt_m4_depend} .endif +# flua is required to regenerate syscall files. It first appeared during the +# 13.0-CURRENT cycle, thus needs to be built on -older releases and stable +# branches. +.if ${BOOTSTRAPPING} < 1300048 +_flua= libexec/flua +.endif + # r245440 mtree -N support added # r313404 requires sha384.h for libnetbsd, added to libmd in r292782 .if ${BOOTSTRAPPING} < 1100093 @@ -2345,6 +2359,7 @@ usr.bin/xinstall \ ${_gensnmptree} \ usr.sbin/config \ + ${_flua} \ ${_crunchide} \ ${_crunchgen} \ ${_nmtree} \ Index: sys/amd64/linux/Makefile =================================================================== --- sys/amd64/linux/Makefile +++ sys/amd64/linux/Makefile @@ -5,11 +5,13 @@ # Don't use an OBJDIR .OBJDIR: ${.CURDIR} +.include + all: @echo "make sysent only" sysent: linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c linux_systrace_args.c linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c linux_systrace_args.c: \ - ../../kern/makesyscalls.sh syscalls.master ${.CURDIR}/syscalls.conf - sh ../../kern/makesyscalls.sh syscalls.master ${.CURDIR}/syscalls.conf + ../../tools/makesyscalls.lua syscalls.master ${.CURDIR}/syscalls.conf + ${LUA} ../../tools/makesyscalls.lua syscalls.master ${.CURDIR}/syscalls.conf Index: sys/amd64/linux32/Makefile =================================================================== --- sys/amd64/linux32/Makefile +++ sys/amd64/linux32/Makefile @@ -5,11 +5,13 @@ # Don't use an OBJDIR .OBJDIR: ${.CURDIR} +.include + all: @echo "make sysent only" sysent: linux32_sysent.c linux32_syscall.h linux32_proto.h linux32_syscalls.c linux32_systrace_args.c -linux32_sysent.c linux32_syscall.h linux32_proto.h linux32_syscalls.c linux32_systrace_args.c: ../../kern/makesyscalls.sh \ +linux32_sysent.c linux32_syscall.h linux32_proto.h linux32_syscalls.c linux32_systrace_args.c: ../../tools/makesyscalls.lua \ syscalls.master ${.CURDIR}/syscalls.conf - sh ../../kern/makesyscalls.sh syscalls.master ${.CURDIR}/syscalls.conf + ${LUA} ../../tools/makesyscalls.lua syscalls.master ${.CURDIR}/syscalls.conf Index: sys/arm64/linux/Makefile =================================================================== --- sys/arm64/linux/Makefile +++ sys/arm64/linux/Makefile @@ -5,11 +5,13 @@ # Don't use an OBJDIR .OBJDIR: ${.CURDIR} +.include + all: @echo "make sysent only" sysent: linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c linux_systrace_args.c linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c linux_systrace_args.c: \ - ../../kern/makesyscalls.sh syscalls.master ${.CURDIR}/syscalls.conf - sh ../../kern/makesyscalls.sh syscalls.master ${.CURDIR}/syscalls.conf + ../../tools/makesyscalls.lua syscalls.master ${.CURDIR}/syscalls.conf + ${LUA} ../../tools/makesyscalls.lua syscalls.master ${.CURDIR}/syscalls.conf Index: sys/compat/cloudabi32/Makefile =================================================================== --- sys/compat/cloudabi32/Makefile +++ sys/compat/cloudabi32/Makefile @@ -3,6 +3,8 @@ # Don't use an OBJDIR .OBJDIR: ${.CURDIR} +.include + all: @echo "make sysent only" @@ -11,7 +13,7 @@ cloudabi32_sysent.c cloudabi32_syscall.h cloudabi32_proto.h \ cloudabi32_syscalls.c cloudabi32_systrace_args.c: \ - ../../kern/makesyscalls.sh ../../contrib/cloudabi/syscalls32.master \ + ../../tools/makesyscalls.lua ../../contrib/cloudabi/syscalls32.master \ ${.CURDIR}/syscalls.conf - sh ../../kern/makesyscalls.sh ../../contrib/cloudabi/syscalls32.master \ - ${.CURDIR}/syscalls.conf + ${LUA} ../../tools/makesyscalls.lua \ + ../../contrib/cloudabi/syscalls32.master ${.CURDIR}/syscalls.conf Index: sys/compat/cloudabi64/Makefile =================================================================== --- sys/compat/cloudabi64/Makefile +++ sys/compat/cloudabi64/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + # Don't use an OBJDIR .OBJDIR: ${.CURDIR} @@ -11,7 +13,7 @@ cloudabi64_sysent.c cloudabi64_syscall.h cloudabi64_proto.h \ cloudabi64_syscalls.c cloudabi64_systrace_args.c: \ - ../../kern/makesyscalls.sh ../../contrib/cloudabi/syscalls64.master \ + ../../tools/makesyscalls.lua ../../contrib/cloudabi/syscalls64.master \ ${.CURDIR}/syscalls.conf - sh ../../kern/makesyscalls.sh ../../contrib/cloudabi/syscalls64.master \ - ${.CURDIR}/syscalls.conf + ${LUA} ../../tools/makesyscalls.lua \ + ../../contrib/cloudabi/syscalls64.master ${.CURDIR}/syscalls.conf Index: sys/compat/freebsd32/Makefile =================================================================== --- sys/compat/freebsd32/Makefile +++ sys/compat/freebsd32/Makefile @@ -5,14 +5,16 @@ # Don't use an OBJDIR .OBJDIR: ${.CURDIR} +.include + all: @echo "make sysent only" sysent: freebsd32_sysent.c freebsd32_syscall.h freebsd32_proto.h freebsd32_systrace_args.c freebsd32_sysent.c freebsd32_syscalls.c freebsd32_syscall.h freebsd32_proto.h freebsd32_systrace_args.c : \ - ../../kern/makesyscalls.sh syscalls.master ${.CURDIR}/syscalls.conf ../../kern/capabilities.conf - sh ../../kern/makesyscalls.sh syscalls.master ${.CURDIR}/syscalls.conf + ../../tools/makesyscalls.lua syscalls.master ${.CURDIR}/syscalls.conf ../../kern/capabilities.conf + ${LUA} ../../tools/makesyscalls.lua syscalls.master ${.CURDIR}/syscalls.conf clean: rm -f freebsd32_sysent.c freebsd32_syscalls.c freebsd32_syscall.h freebsd32_proto.h Index: sys/compat/freebsd32/freebsd32_proto.h =================================================================== --- sys/compat/freebsd32/freebsd32_proto.h +++ sys/compat/freebsd32/freebsd32_proto.h @@ -238,7 +238,7 @@ }; struct freebsd32_lio_listio_args { char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; - char acb_list_l_[PADL_(struct aiocb32 *const *)]; struct aiocb32 *const * acb_list; char acb_list_r_[PADR_(struct aiocb32 *const *)]; + char acb_list_l_[PADL_(struct aiocb32 * const *)]; struct aiocb32 * const * acb_list; char acb_list_r_[PADR_(struct aiocb32 * const *)]; char nent_l_[PADL_(int)]; int nent; char nent_r_[PADR_(int)]; char sig_l_[PADL_(struct sigevent32 *)]; struct sigevent32 * sig; char sig_r_[PADR_(struct sigevent32 *)]; }; @@ -262,17 +262,17 @@ }; struct freebsd32_modstat_args { char modid_l_[PADL_(int)]; int modid; char modid_r_[PADR_(int)]; - char stat_l_[PADL_(struct module_stat32 *)]; struct module_stat32 * stat; char stat_r_[PADR_(struct module_stat32 *)]; + char stat_l_[PADL_(struct module_stat32*)]; struct module_stat32* stat; char stat_r_[PADR_(struct module_stat32*)]; }; struct freebsd32_kldstat_args { char fileid_l_[PADL_(int)]; int fileid; char fileid_r_[PADR_(int)]; - char stat_l_[PADL_(struct kld32_file_stat *)]; struct kld32_file_stat * stat; char stat_r_[PADR_(struct kld32_file_stat *)]; + char stat_l_[PADL_(struct kld32_file_stat*)]; struct kld32_file_stat* stat; char stat_r_[PADR_(struct kld32_file_stat*)]; }; struct freebsd32_aio_return_args { char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; }; struct freebsd32_aio_suspend_args { - char aiocbp_l_[PADL_(struct aiocb32 *const *)]; struct aiocb32 *const * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *const *)]; + char aiocbp_l_[PADL_(struct aiocb32 * const *)]; struct aiocb32 * const * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 * const *)]; char nent_l_[PADL_(int)]; int nent; char nent_r_[PADR_(int)]; char timeout_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * timeout; char timeout_r_[PADR_(const struct timespec32 *)]; }; @@ -1094,7 +1094,7 @@ }; struct freebsd6_freebsd32_lio_listio_args { char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; - char acb_list_l_[PADL_(struct oaiocb32 *const *)]; struct oaiocb32 *const * acb_list; char acb_list_r_[PADR_(struct oaiocb32 *const *)]; + char acb_list_l_[PADL_(struct oaiocb32 * const *)]; struct oaiocb32 * const * acb_list; char acb_list_r_[PADR_(struct oaiocb32 * const *)]; char nent_l_[PADL_(int)]; int nent; char nent_r_[PADR_(int)]; char sig_l_[PADL_(struct osigevent32 *)]; struct osigevent32 * sig; char sig_r_[PADR_(struct osigevent32 *)]; }; Index: sys/compat/freebsd32/freebsd32_systrace_args.c =================================================================== --- sys/compat/freebsd32/freebsd32_systrace_args.c +++ sys/compat/freebsd32/freebsd32_systrace_args.c @@ -1278,7 +1278,7 @@ case 257: { struct freebsd32_lio_listio_args *p = params; iarg[0] = p->mode; /* int */ - uarg[1] = (intptr_t) p->acb_list; /* struct aiocb32 *const * */ + uarg[1] = (intptr_t) p->acb_list; /* struct aiocb32 * const * */ iarg[2] = p->nent; /* int */ uarg[3] = (intptr_t) p->sig; /* struct sigevent32 * */ *n_args = 4; @@ -1341,7 +1341,7 @@ case 301: { struct freebsd32_modstat_args *p = params; iarg[0] = p->modid; /* int */ - uarg[1] = (intptr_t) p->stat; /* struct module_stat32 * */ + uarg[1] = (intptr_t) p->stat; /* struct module_stat32* */ *n_args = 2; break; } @@ -1391,7 +1391,7 @@ case 308: { struct freebsd32_kldstat_args *p = params; iarg[0] = p->fileid; /* int */ - uarg[1] = (intptr_t) p->stat; /* struct kld32_file_stat * */ + uarg[1] = (intptr_t) p->stat; /* struct kld32_file_stat* */ *n_args = 2; break; } @@ -1437,7 +1437,7 @@ /* freebsd32_aio_suspend */ case 315: { struct freebsd32_aio_suspend_args *p = params; - uarg[0] = (intptr_t) p->aiocbp; /* struct aiocb32 *const * */ + uarg[0] = (intptr_t) p->aiocbp; /* struct aiocb32 * const * */ iarg[1] = p->nent; /* int */ uarg[2] = (intptr_t) p->timeout; /* const struct timespec32 * */ *n_args = 3; @@ -5370,7 +5370,7 @@ p = "int"; break; case 1: - p = "userland struct aiocb32 *const *"; + p = "userland struct aiocb32 * const *"; break; case 2: p = "int"; @@ -5482,7 +5482,7 @@ p = "int"; break; case 1: - p = "userland struct module_stat32 *"; + p = "userland struct module_stat32*"; break; default: break; @@ -5555,7 +5555,7 @@ p = "int"; break; case 1: - p = "userland struct kld32_file_stat *"; + p = "userland struct kld32_file_stat*"; break; default: break; @@ -5627,7 +5627,7 @@ case 315: switch(ndx) { case 0: - p = "userland struct aiocb32 *const *"; + p = "userland struct aiocb32 * const *"; break; case 1: p = "int"; Index: sys/i386/linux/Makefile =================================================================== --- sys/i386/linux/Makefile +++ sys/i386/linux/Makefile @@ -5,11 +5,13 @@ # Don't use an OBJDIR .OBJDIR: ${.CURDIR} +.include + all: @echo "make sysent only" sysent: linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c linux_systrace_args.c linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c linux_systrace_args.c: \ - ../../kern/makesyscalls.sh syscalls.master ${.CURDIR}/syscalls.conf - sh ../../kern/makesyscalls.sh syscalls.master ${.CURDIR}/syscalls.conf + ../../tools/makesyscalls.lua syscalls.master ${.CURDIR}/syscalls.conf + ${LUA} ../../tools/makesyscalls.lua syscalls.master ${.CURDIR}/syscalls.conf Index: sys/i386/linux/linux_systrace_args.c =================================================================== --- sys/i386/linux/linux_systrace_args.c +++ sys/i386/linux/linux_systrace_args.c @@ -1175,7 +1175,7 @@ /* poll */ case 168: { struct poll_args *p = params; - uarg[0] = (intptr_t) p->fds; /* struct pollfd * */ + uarg[0] = (intptr_t) p->fds; /* struct pollfd* */ uarg[1] = p->nfds; /* unsigned int */ iarg[2] = p->timeout; /* long */ *n_args = 3; @@ -4815,7 +4815,7 @@ case 168: switch(ndx) { case 0: - p = "userland struct pollfd *"; + p = "userland struct pollfd*"; break; case 1: p = "unsigned int"; Index: sys/kern/Makefile =================================================================== --- sys/kern/Makefile +++ sys/kern/Makefile @@ -6,6 +6,8 @@ # Don't use an OBJDIR .OBJDIR: ${.CURDIR} +.include + all: @echo "make sysent only" @@ -13,6 +15,6 @@ ../sys/sysproto.h init_sysent.c syscalls.c systrace_args.c ../sys/syscall.h \ -../sys/syscall.mk ../sys/sysproto.h: makesyscalls.sh syscalls.master \ +../sys/syscall.mk ../sys/sysproto.h: ../tools/makesyscalls.lua syscalls.master \ capabilities.conf - sh makesyscalls.sh syscalls.master + ${LUA} ../tools/makesyscalls.lua syscalls.master Index: sys/kern/systrace_args.c =================================================================== --- sys/kern/systrace_args.c +++ sys/kern/systrace_args.c @@ -1314,7 +1314,7 @@ case 257: { struct lio_listio_args *p = params; iarg[0] = p->mode; /* int */ - uarg[1] = (intptr_t) p->acb_list; /* struct aiocb *const * */ + uarg[1] = (intptr_t) p->acb_list; /* struct aiocb* const * */ iarg[2] = p->nent; /* int */ uarg[3] = (intptr_t) p->sig; /* struct sigevent * */ *n_args = 4; @@ -1375,7 +1375,7 @@ case 301: { struct modstat_args *p = params; iarg[0] = p->modid; /* int */ - uarg[1] = (intptr_t) p->stat; /* struct module_stat * */ + uarg[1] = (intptr_t) p->stat; /* struct module_stat* */ *n_args = 2; break; } @@ -1471,7 +1471,7 @@ /* aio_suspend */ case 315: { struct aio_suspend_args *p = params; - uarg[0] = (intptr_t) p->aiocbp; /* struct aiocb *const * */ + uarg[0] = (intptr_t) p->aiocbp; /* struct aiocb * const * */ iarg[1] = p->nent; /* int */ uarg[2] = (intptr_t) p->timeout; /* const struct timespec * */ *n_args = 3; @@ -5421,7 +5421,7 @@ p = "int"; break; case 1: - p = "userland struct aiocb *const *"; + p = "userland struct aiocb* const *"; break; case 2: p = "int"; @@ -5527,7 +5527,7 @@ p = "int"; break; case 1: - p = "userland struct module_stat *"; + p = "userland struct module_stat*"; break; default: break; @@ -5672,7 +5672,7 @@ case 315: switch(ndx) { case 0: - p = "userland struct aiocb *const *"; + p = "userland struct aiocb * const *"; break; case 1: p = "int"; Index: sys/sys/sysproto.h =================================================================== --- sys/sys/sysproto.h +++ sys/sys/sysproto.h @@ -710,7 +710,7 @@ }; struct lio_listio_args { char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; - char acb_list_l_[PADL_(struct aiocb *const *)]; struct aiocb *const * acb_list; char acb_list_r_[PADR_(struct aiocb *const *)]; + char acb_list_l_[PADL_(struct aiocb* const *)]; struct aiocb* const * acb_list; char acb_list_r_[PADR_(struct aiocb* const *)]; char nent_l_[PADL_(int)]; int nent; char nent_r_[PADR_(int)]; char sig_l_[PADL_(struct sigevent *)]; struct sigevent * sig; char sig_r_[PADR_(struct sigevent *)]; }; @@ -743,7 +743,7 @@ }; struct modstat_args { char modid_l_[PADL_(int)]; int modid; char modid_r_[PADR_(int)]; - char stat_l_[PADL_(struct module_stat *)]; struct module_stat * stat; char stat_r_[PADR_(struct module_stat *)]; + char stat_l_[PADL_(struct module_stat*)]; struct module_stat* stat; char stat_r_[PADR_(struct module_stat*)]; }; struct modfnext_args { char modid_l_[PADL_(int)]; int modid; char modid_r_[PADR_(int)]; @@ -787,7 +787,7 @@ char aiocbp_l_[PADL_(struct aiocb *)]; struct aiocb * aiocbp; char aiocbp_r_[PADR_(struct aiocb *)]; }; struct aio_suspend_args { - char aiocbp_l_[PADL_(struct aiocb *const *)]; struct aiocb *const * aiocbp; char aiocbp_r_[PADR_(struct aiocb *const *)]; + char aiocbp_l_[PADL_(struct aiocb * const *)]; struct aiocb * const * aiocbp; char aiocbp_r_[PADR_(struct aiocb * const *)]; char nent_l_[PADL_(int)]; int nent; char nent_r_[PADR_(int)]; char timeout_l_[PADL_(const struct timespec *)]; const struct timespec * timeout; char timeout_r_[PADR_(const struct timespec *)]; }; @@ -2495,7 +2495,7 @@ }; struct freebsd6_lio_listio_args { char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; - char acb_list_l_[PADL_(struct oaiocb *const *)]; struct oaiocb *const * acb_list; char acb_list_r_[PADR_(struct oaiocb *const *)]; + char acb_list_l_[PADL_(struct oaiocb * const *)]; struct oaiocb * const * acb_list; char acb_list_r_[PADR_(struct oaiocb * const *)]; char nent_l_[PADL_(int)]; int nent; char nent_r_[PADR_(int)]; char sig_l_[PADL_(struct osigevent *)]; struct osigevent * sig; char sig_r_[PADR_(struct osigevent *)]; }; Index: tools/build/Makefile =================================================================== --- tools/build/Makefile +++ tools/build/Makefile @@ -121,7 +121,8 @@ # and cross-tools stages. We do this here using mkdir since mtree may not exist # yet (this happens if we are crossbuilding from Linux/Mac). installdirs: -.for _dir in bin usr/lib usr/include usr/include/casper lib/geom lib/casper +.for _dir in bin usr/lib usr/libexec usr/include usr/include/casper lib/geom \ + lib/casper mkdir -p "${DESTDIR}/${_dir}" .endfor # Link usr/bin, sbin, and usr/sbin to bin so that it doesn't matter whether a