From 60027726b9e566af064789b976c245b18a5b6f07 Mon Sep 17 00:00:00 2001 From: kevans Date: Mon, 18 Nov 2019 23:28:23 +0000 Subject: [PATCH] Convert in-tree sysent targets to use new makesyscalls.lua flua is bootstrapped as part of the build for those on older versions/revisions that don't yet have flua installed. Once upgraded past r354833, "make sysent" will again naturally work as expected. Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D21894 --- Makefile.inc1 | 17 ++++++++++++++++- sys/amd64/linux/Makefile | 6 ++++-- sys/amd64/linux32/Makefile | 6 ++++-- sys/arm64/linux/Makefile | 6 ++++-- sys/compat/cloudabi32/Makefile | 8 +++++--- sys/compat/cloudabi64/Makefile | 8 +++++--- sys/compat/freebsd32/Makefile | 6 ++++-- sys/i386/linux/Makefile | 6 ++++-- sys/kern/Makefile | 6 ++++-- sys/sys/param.h | 2 +- tools/build/Makefile | 1 + 11 files changed, 52 insertions(+), 20 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index ed27d74c40e..8dacb73369f 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1499,6 +1499,11 @@ makeman: .PHONY ${_+_}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 \ @@ -1509,7 +1514,9 @@ _sysent_dirs+= sys/amd64/linux \ 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 # @@ -2168,6 +2175,13 @@ ${_bt}-lib/libelf: ${_bt_m4_depend} ${_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} < 1300059 +_flua= libexec/flua +.endif + # r245440 mtree -N support added # r313404 requires sha384.h for libnetbsd, added to libmd in r292782 .if ${BOOTSTRAPPING} < 1100093 @@ -2390,6 +2404,7 @@ bootstrap-tools: ${_bt}-links .PHONY usr.bin/xinstall \ ${_gensnmptree} \ usr.sbin/config \ + ${_flua} \ ${_crunchide} \ ${_crunchgen} \ ${_nmtree} \ diff --git a/sys/amd64/linux/Makefile b/sys/amd64/linux/Makefile index aade1909d8e..f81a30e549d 100644 --- a/sys/amd64/linux/Makefile +++ b/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 diff --git a/sys/amd64/linux32/Makefile b/sys/amd64/linux32/Makefile index 173ec677de0..1fff6728fec 100644 --- a/sys/amd64/linux32/Makefile +++ b/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 diff --git a/sys/arm64/linux/Makefile b/sys/arm64/linux/Makefile index aade1909d8e..f81a30e549d 100644 --- a/sys/arm64/linux/Makefile +++ b/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 diff --git a/sys/compat/cloudabi32/Makefile b/sys/compat/cloudabi32/Makefile index 1e427212e82..d7b46f11264 100644 --- a/sys/compat/cloudabi32/Makefile +++ b/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 @@ sysent: cloudabi32_sysent.c cloudabi32_syscall.h cloudabi32_proto.h \ 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 diff --git a/sys/compat/cloudabi64/Makefile b/sys/compat/cloudabi64/Makefile index f74c5da5bf8..fc9ed38b269 100644 --- a/sys/compat/cloudabi64/Makefile +++ b/sys/compat/cloudabi64/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + # Don't use an OBJDIR .OBJDIR: ${.CURDIR} @@ -11,7 +13,7 @@ sysent: cloudabi64_sysent.c cloudabi64_syscall.h cloudabi64_proto.h \ 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 diff --git a/sys/compat/freebsd32/Makefile b/sys/compat/freebsd32/Makefile index 841d9bd9053..2f679c11167 100644 --- a/sys/compat/freebsd32/Makefile +++ b/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 diff --git a/sys/i386/linux/Makefile b/sys/i386/linux/Makefile index aade1909d8e..f81a30e549d 100644 --- a/sys/i386/linux/Makefile +++ b/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 diff --git a/sys/kern/Makefile b/sys/kern/Makefile index 21646b451f3..c5bc9f2715f 100644 --- a/sys/kern/Makefile +++ b/sys/kern/Makefile @@ -6,6 +6,8 @@ # Don't use an OBJDIR .OBJDIR: ${.CURDIR} +.include + all: @echo "make sysent only" @@ -13,6 +15,6 @@ sysent: init_sysent.c syscalls.c ../sys/syscall.h ../sys/syscall.mk \ ../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 diff --git a/sys/sys/param.h b/sys/sys/param.h index 60718001f8a..17d022e0e5a 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300058 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300059 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, diff --git a/tools/build/Makefile b/tools/build/Makefile index b912604b04e..c86d4f79cb2 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -127,6 +127,7 @@ INSTALLDIR_LIST= \ usr/include/casper \ usr/include/private/zstd \ usr/lib \ + usr/libexec installdirs: mkdir -p ${INSTALLDIR_LIST:S,^,${DESTDIR}/,} -- 2.45.0