From nobody Tue Nov 22 16:37:44 2022 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 4NGqgF2xM7z4j2bC; Tue, 22 Nov 2022 16:37:45 +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 4NGqgF2Qwcz3L5X; Tue, 22 Nov 2022 16:37:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669135065; 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=a7Mc1xuxiJk/ITLAbgbB6Hs8pNSUfZnwUh6Vx2e5A9w=; b=uvxCmD658lHwV0Tii7Q9FXVwCqRGEjVJuRhs1pwMguPNCg0PuKN4crSBl6K3UPfShFlxrJ f5gAYUvVSVbEq4Fu8+ad6dv7t8HerZ2Hprc2Sx2NBngNN2POWbWGtdy11yG75POXg7LMPa rk0nuJWQIou3i1OdihngH+aswvNJKehzrgxaw9roUAJFztOiz3dFZD7Ez4IXxhn3svNl0q 1W8A174DbKRfSQvdqh7TIEIVwO4tJJp1o/LAdkj01vyWz0PBoY1s1DWIG/jGEeiRAlIstF 23l0hpKNXJJu1RF0cWY4ChzfGxoPPLw8GYOLp6poZ9sx4AGoFn7DpN3cR4/Bbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669135065; 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=a7Mc1xuxiJk/ITLAbgbB6Hs8pNSUfZnwUh6Vx2e5A9w=; b=VXalMcsCr2r/ZBIH888DohUWwMHXsd6Px6ThWUMPWrUHsdzzx+NapNSVbf0QGvcto0XV3C CWMGo0Lt1XehvCHzQViQfjPD2vDAkroQ7KgGN7lki3Ch1CpKFbu5AV2ZGPsBpOEsqKbuMl dMObqVJzy31peyK6xQpWR0Cflzt5MnXp6/exjgUTylK4wIzo1aNlJ1f9tDjr1D1fxS90Of 4I6WGpao0EpqSRLFbHCpXpUQ5moOlDBlayZcUZi4OhkW9akA2hkgO8WeQNYAHUJSKP55Qm sRNSa3r3WRI6ZOC6v6xwbSe0DrJ+4d/1KayU0eLBampkguGDafnyd/zpcPxo3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1669135065; a=rsa-sha256; cv=none; b=opyzr5NnMvnwVOsjma6ey0CuRBNgXGnQHor1YEC6j768wO7I4dbg9hmlEAxebdPtARV6pM caTg/hw0wQDV7C+bcwEZ4aeDke8UCU4ZZDiAvlvKLh+EMWsq0xynoaYCgz4qDw9pIsbDIH ItshYfe5buA7yn7Y1yu3dA+nwmMkX6Mi0FWZ1w+VBByVQ3stBvJ1+WtUd6jK1NhVhfqqvA XtMzl70A39b3QDlK7YkQeC6MJ3nWJtDMboik6HADRIox2ozsZZhmetvc41slAxfFZyvaRJ 3v16qohVfiNSneW8OO7g8muFTyPStoXHca3hMmnNduNVOjESBpyVP4XhQfErDg== 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 4NGqgF1CnjzpdW; Tue, 22 Nov 2022 16:37:45 +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 2AMGbiLj054515; Tue, 22 Nov 2022 16:37:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2AMGbi6M054514; Tue, 22 Nov 2022 16:37:44 GMT (envelope-from git) Date: Tue, 22 Nov 2022 16:37:44 GMT Message-Id: <202211221637.2AMGbi6M054514@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 5115511ed494 - main - Use __freebsd_kprintf__ with GCC 12+ similar to clang. 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5115511ed4941684bc82b8a3c4b95e9a8931b940 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=5115511ed4941684bc82b8a3c4b95e9a8931b940 commit 5115511ed4941684bc82b8a3c4b95e9a8931b940 Author: John Baldwin AuthorDate: 2022-11-22 16:36:12 +0000 Commit: John Baldwin CommitDate: 2022-11-22 16:36:12 +0000 Use __freebsd_kprintf__ with GCC 12+ similar to clang. --- share/mk/bsd.sys.mk | 3 ++- sys/conf/kern.mk | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index f6303d7d06d7..aa2336700524 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -222,7 +222,8 @@ CWARNFLAGS+= -Wno-system-headers .endif # gcc # How to handle FreeBSD custom printf format specifiers. -.if ${COMPILER_TYPE} == "clang" +.if ${COMPILER_TYPE} == "clang" || \ + (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 120100) FORMAT_EXTENSIONS= -D__printf__=__freebsd_kprintf__ .else FORMAT_EXTENSIONS= -fformat-extensions diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 4e33db93dafe..78dedb8ff496 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -91,7 +91,8 @@ CWARNFLAGS+= -Wno-format-zero-length # to be disabled. WARNING: format checking is disabled in this case. .if ${MK_FORMAT_EXTENSIONS} == "no" FORMAT_EXTENSIONS= -Wno-format -.elif ${COMPILER_TYPE} == "clang" +.elif ${COMPILER_TYPE} == "clang" || \ + (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 120100) FORMAT_EXTENSIONS= -D__printf__=__freebsd_kprintf__ .else FORMAT_EXTENSIONS= -fformat-extensions