From nobody Mon Nov 22 22:37:46 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A2AED1892DB3; Mon, 22 Nov 2021 22:37:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hyhx86pZzz4YRn; Mon, 22 Nov 2021 22:37:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED6E12CAD; Mon, 22 Nov 2021 22:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AMMbkQo047218; Mon, 22 Nov 2021 22:37:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMMbkuo047217; Mon, 22 Nov 2021 22:37:46 GMT (envelope-from git) Date: Mon, 22 Nov 2021 22:37:46 GMT Message-Id: <202111222237.1AMMbkuo047217@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 3f8f46a0ae4f - main - makesyscalls: Add a way to include per-ABI headers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3f8f46a0ae4f7dbe886ade676917a0d68ca1f86e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=3f8f46a0ae4f7dbe886ade676917a0d68ca1f86e commit 3f8f46a0ae4f7dbe886ade676917a0d68ca1f86e Author: Brooks Davis AuthorDate: 2021-11-22 22:36:56 +0000 Commit: Brooks Davis CommitDate: 2021-11-22 22:36:56 +0000 makesyscalls: Add a way to include per-ABI headers When the string %%ABI_HEADERS%% is found in syscalls.master, replace it with the contents of the abi_headers config variable. This allows an ABI-specific syscalls.conf to add lines like: #include when working from a shared syscalls.master. Reviewed by: kevans --- sys/tools/makesyscalls.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index 622a6ad4b1dd..fef991296316 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -60,6 +60,7 @@ local config = { abi_type_suffix = "", abi_flags = "", abi_flags_mask = 0, + abi_headers = "", ptr_intptr_t_cast = "intptr_t", } @@ -438,6 +439,16 @@ local pattern_table = { write_line_pfile('systrace.*', line) end, }, + { + dump_prevline = true, + pattern = "%%ABI_HEADERS%%", + process = function() + if config['abi_headers'] ~= "" then + line = config['abi_headers'] .. "\n" + write_line('sysinc', line) + end + end, + }, { -- Buffer anything else pattern = ".+",