From nobody Tue Feb 18 22:04:58 2025 X-Original-To: dev-commits-src-all@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 4YyD8q6sLCz5pFsl; Tue, 18 Feb 2025 22:04:59 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YyD8q0Y13z3TDj; Tue, 18 Feb 2025 22:04:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739916299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KKm6Ls+fIgTmhu1MF7G8vc0GnJS5cx6810M+JgTxS+8=; b=cE/p6Yr9QC5WlCkJtRc+o+v6MTWC2YTS4lTjg1ZV+oDXHsEEt6vf+MY4Tu6Lm/w4K7pBNm oj4ZTPBrXxTb2Fpqe2SMuIsxXxgiD6H9f6c6ukgPJgeJh5mJ7K0DYyELcQbdQo99feywiv OmHcOF3qIskVzOtrwvh+fp55LsDb7E4wroEWp9M5s99adRLYpGmQpKdrQ1IJb3mShinX+f +q1FX88fRYQY/PiyuQrbSrqKZC8k1R5zm4IirsB9Z4k8il5MJwAGdsg5B85VUVjiVzVOcH 467Psp3ZFoZdDVRomuhHNx48W9CB+gjYzq3bwYDJy3o9peY+ArOzUvM76udN5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1739916299; a=rsa-sha256; cv=none; b=CePxuV4HUYKLm9LDZm9e5wnvNUTBPohqwIiAeXSZB5Dcw3F0U0G6/C7XGJR7ftI6tvGZwk XqMmvev0lVYRSQJ8NdQ4teaPccm7MrjiUxHJ/VagH9Peuy+eBqPveq2sZ2K6p1bbV/X80q V4bXFOjY9JCy2QQV59Rlg6kJqcgCkUqMFT1z1Z15nFyJ7adKfbQxRwn55QF8hxgJTE0Aes UXttf+sKWEP7wbGEQ/WRku3fQMj9hgUPERzFFdRW3wcnnt7T67Td1dCeA3Fm4gk5oCe+8k QBCCmU+VURxI/40ty+sR4mzJnxx63sCv7nax/x0AWQnixG0hBpmlwseYcftb3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739916299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KKm6Ls+fIgTmhu1MF7G8vc0GnJS5cx6810M+JgTxS+8=; b=dDGwGja4PfrT4UVT6q2mJyMN6ymyhN8KkjHoLeMhiPkVZ86ULTST2Onk08kB8pwsVuoLvz rnGEkJ5fbUvsS5wspvPfX2zXJbqDyJo1PrDlEKWFuy/ZEI3L9JTJtyOIEBHaTNrymnUETg WYPkJZr42Y5J7RkrvEZlY0oT9BjGnKFMqD9EgfhbDb1hPqIcd/siAKDSnIqjzbgJRMtk87 LD8o6UP5DtvjGiKjpdjvgvsgDHb3/zlXosoyZ0TMyFPC7x3K0d6uBGp7GD37kRQdWVMF2F JyVgpivHkiXUiMHPnmeDTglMBQZmFhpeC9m4xX9BWd8KCUhHHCHDc1/JF6bzcw== 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 4YyD8p6JpRzf6m; Tue, 18 Feb 2025 22:04:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 51IM4wvb009484; Tue, 18 Feb 2025 22:04:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 51IM4w3H009481; Tue, 18 Feb 2025 22:04:58 GMT (envelope-from git) Date: Tue, 18 Feb 2025 22:04:58 GMT Message-Id: <202502182204.51IM4w3H009481@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: f29905cab576 - main - makesyscalls: deprecate cpp other than includes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: f29905cab576a0ccf454ee2e215f590e0e656d70 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=f29905cab576a0ccf454ee2e215f590e0e656d70 commit f29905cab576a0ccf454ee2e215f590e0e656d70 Author: Brooks Davis AuthorDate: 2025-02-18 22:02:19 +0000 Commit: Brooks Davis CommitDate: 2025-02-18 22:03:26 +0000 makesyscalls: deprecate cpp other than includes Warn that C preprocessor directives in the config file are deprecated. They are unsound and support has a number of potential pitfalls. They should be replaced by compile-time generation of files plus an overlay framework to allow things like per-arch variation. Reviewed by: kevans Sponsored by: DARPA, AFRL Pull Request: https://github.com/freebsd/freebsd-src/pull/1575 --- sys/kern/syscalls.master | 1 + sys/tools/syscalls/core/freebsd-syscall.lua | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index fbd2ffb60cae..67396a4cabc5 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -111,6 +111,7 @@ ; limited set of output files. Before the first syscalls, #include lines will ; be copied and %%ABI_HEADERS%% expanded. Between system call entries, ; all lines beginning with # will be copied. Caveat Emptor. +; WARNING: this functionality is deprecated. #include #include diff --git a/sys/tools/syscalls/core/freebsd-syscall.lua b/sys/tools/syscalls/core/freebsd-syscall.lua index fdd3a9011b7a..2ef0fdea6401 100644 --- a/sys/tools/syscalls/core/freebsd-syscall.lua +++ b/sys/tools/syscalls/core/freebsd-syscall.lua @@ -50,6 +50,7 @@ function FreeBSDSyscall:parseSysfile() local incs = "" local prolog = "" local first = true + local cpp_warned = false local s for line in fh:lines() do line = line:gsub(commentExpr, "") -- Strip any comments. @@ -82,6 +83,11 @@ function FreeBSDSyscall:parseSysfile() incs = incs .. h .. "\n" end elseif line:match("^#") then + if not cpp_warned then + util.warn("use of non-include cpp " .. + "directives is deprecated") + cpp_warned = true + end prolog = prolog .. line .. "\n" else s = syscall:new()