From nobody Wed Jul 10 17:46:05 2024 X-Original-To: dev-commits-ports-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 4WK4z16THsz5Qs8X; Wed, 10 Jul 2024 17:46:05 +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 4WK4z15x2gz4rTk; Wed, 10 Jul 2024 17:46:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720633565; 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=CeiYfExpFDw3V93+UGXfSGvl7AvTehScGKGJUpryE1c=; b=KM+f+9sOOPuJI9GxGraNC2po2L4jLH3QVfZC/79SMSsyyPvm+GIRW/HqzUQyHVbhFrOJXr rm4hgIUeXHiO2c6hDxd0ibU4bYDkt6y/ovGu2b1Qq8iXLR/tg+c3RBO4AT6XOlnsYKm5Oc jKCVK6UYvYKJU1VGAWlg28PVWFPBKi7vb73plJQ0XpPBzyf+OHZYsiYFMBHlHAbZuU1865 pg+s+Uv4SoMqqCRQbuAoCAzLwey1iXzzBGzRMACfi+QU71FWI46WJMgAUe1EYY/V6ajk9w pmd+xyklz333TLxYXiIBOHNbIsI3mTMQk2tIusvvC70NPShRBHL4Qm7rLm7VSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720633565; a=rsa-sha256; cv=none; b=c3+X1YjIhSjriVjIxH1qR9lGXuevAgHp/Yx8dSlHfuffvmwpSNHzKqchzvDvswTNXuoCF5 /w7Vab/OgGaeELvy3PpjWuxVdOiBvSEqG6Z8vZBwjjZEaaUihMWZpWo0dUHkGdTOtrfypD tMuC5yUBaliLC7lKSSrhx9JPIVl9IsYah372g1Ul0uHsC7DcvhabtrnWxDnYz7P1lZ8ON5 SIA+vsJPpdSraBQvZDcgxxpy4Nr4qfctuTDb6XwFthoCS+0FvqR6Qdh4G7lzMfSRA52ePr pTMk6nIhsAMRJoHCZg5UdxYi2sGW/4t8u2+rwQhwXmGzyd5zdDmjTcshKR/b2w== 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=1720633565; 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=CeiYfExpFDw3V93+UGXfSGvl7AvTehScGKGJUpryE1c=; b=eRbwCNmqh2xmFg5igza9W7wc8Evs+2Z78sujzlWI2HFP55yXrz9PS7uhn1zS+EXZPBbOYD q3bzXqpzXwwKtXjW7A1JLocvy4puxkrT8FODkgIEwYt7IHhK0yXaYLYPY9hGSaK39Kc5iq yt5CdCwgwcQAYS52LX26sqezmdtctPoUS9ugbRdK4+T7/A9j4KUAj5fyQ9l8C8RTOShz+z fX4xpuUtmp85fmuE7ZvQ5n/3fM4nUr3rFYx6kPpQsaojxBlLBxXfS472iiH3P4ZiqezJ4v JAGhEakh8WHj5MMkpsJPfLjHxiRYrSa0unlLVgkumXPnpjnaXuq99+BdMDe3/g== 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 4WK4z158vjzRYT; Wed, 10 Jul 2024 17:46:05 +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 46AHk5G0037147; Wed, 10 Jul 2024 17:46:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46AHk5kL037144; Wed, 10 Jul 2024 17:46:05 GMT (envelope-from git) Date: Wed, 10 Jul 2024 17:46:05 GMT Message-Id: <202407101746.46AHk5kL037144@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: John Baldwin Subject: git: a5d8c86fe649 - main - devel/freebsd-gcc*: Fix error in printf0 format checker patch List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-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: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a5d8c86fe649f0ce0b19725cb2e9cc1182a288e3 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/ports/commit/?id=a5d8c86fe649f0ce0b19725cb2e9cc1182a288e3 commit a5d8c86fe649f0ce0b19725cb2e9cc1182a288e3 Author: John Baldwin AuthorDate: 2024-07-10 17:45:35 +0000 Commit: John Baldwin CommitDate: 2024-07-10 17:45:35 +0000 devel/freebsd-gcc*: Fix error in printf0 format checker patch Fix a mismerge of the printf0 format checking patch from GCC 9 to GCC 12/13. GCC 11 and later don't warn for NULL format strings (instead a separate nonnull attribute is used). The printf0 format specifier is left for now to support builds of existing FreeBSD releases but will be removed in the future. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D45941 --- devel/freebsd-gcc12/Makefile | 2 +- .../files/patch-freebsd-format-extensions | 28 +--------------------- devel/freebsd-gcc13/Makefile | 2 +- .../files/patch-freebsd-format-extensions | 28 +--------------------- 4 files changed, 4 insertions(+), 56 deletions(-) diff --git a/devel/freebsd-gcc12/Makefile b/devel/freebsd-gcc12/Makefile index 1de4cce9c92f..9d0d604194f8 100644 --- a/devel/freebsd-gcc12/Makefile +++ b/devel/freebsd-gcc12/Makefile @@ -1,6 +1,6 @@ PORTNAME= gcc DISTVERSION= 12.3.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel MASTER_SITES= GCC PKGNAMEPREFIX= ${TARGETARCH}- diff --git a/devel/freebsd-gcc12/files/patch-freebsd-format-extensions b/devel/freebsd-gcc12/files/patch-freebsd-format-extensions index 7bce7950c4db..246dcb276ba3 100644 --- a/devel/freebsd-gcc12/files/patch-freebsd-format-extensions +++ b/devel/freebsd-gcc12/files/patch-freebsd-format-extensions @@ -67,7 +67,7 @@ + }, + { "printf0", printf_length_specs, print_char_table, " +#0-'I", NULL, + printf_flag_specs, printf_flag_pairs, -+ FMT_FLAG_ARG_CONVERT|FMT_FLAG_DOLLAR_MULTIPLE|FMT_FLAG_USE_DOLLAR|FMT_FLAG_EMPTY_PREC_OK|FMT_FLAG_NULL_FORMAT_OK, ++ FMT_FLAG_ARG_CONVERT|FMT_FLAG_DOLLAR_MULTIPLE|FMT_FLAG_USE_DOLLAR|FMT_FLAG_EMPTY_PREC_OK, + 'w', 0, 'p', 0, 'L', 0, + &integer_type_node, &integer_type_node + }, @@ -79,29 +79,3 @@ } }; -@@ -1635,6 +1693,9 @@ check_format_arg (void *ctx, tree format_tree, - - if (integer_zerop (format_tree)) - { -+ if (!(format_types[info->format_type].flags & FMT_FLAG_NULL_FORMAT_OK)) -+ warning (OPT_Wformat_, "null format string"); -+ - /* Skip to first argument to check, so we can see if this format - has any arguments (it shouldn't). */ - while (arg_num + 1 < info->first_arg_num) ---- gcc/c-family/c-format.h.orig 2022-05-06 00:30:56.000000000 -0700 -+++ gcc/c-family/c-format.h 2022-11-17 17:31:38.546594000 -0800 -@@ -77,11 +77,12 @@ enum - FMT_FLAG_DOLLAR_GAP_POINTER_OK = 128, - /* The format arg is an opaque object that will be parsed by an external - facility. */ -- FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL = 256 -+ FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL = 256, - /* Not included here: details of whether width or precision may occur - (controlled by width_char and precision_char); details of whether - '*' can be used for these (width_type and precision_type); details - of whether length modifiers can occur (length_char_specs). */ -+ FMT_FLAG_NULL_FORMAT_OK = 512 - }; - - /* Structure describing a length modifier supported in format checking, and diff --git a/devel/freebsd-gcc13/Makefile b/devel/freebsd-gcc13/Makefile index b7536f2e7bdf..f08ead54f058 100644 --- a/devel/freebsd-gcc13/Makefile +++ b/devel/freebsd-gcc13/Makefile @@ -1,6 +1,6 @@ PORTNAME= gcc DISTVERSION= 13.2.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel MASTER_SITES= GCC PKGNAMEPREFIX= ${TARGETARCH}- diff --git a/devel/freebsd-gcc13/files/patch-freebsd-format-extensions b/devel/freebsd-gcc13/files/patch-freebsd-format-extensions index 7bce7950c4db..246dcb276ba3 100644 --- a/devel/freebsd-gcc13/files/patch-freebsd-format-extensions +++ b/devel/freebsd-gcc13/files/patch-freebsd-format-extensions @@ -67,7 +67,7 @@ + }, + { "printf0", printf_length_specs, print_char_table, " +#0-'I", NULL, + printf_flag_specs, printf_flag_pairs, -+ FMT_FLAG_ARG_CONVERT|FMT_FLAG_DOLLAR_MULTIPLE|FMT_FLAG_USE_DOLLAR|FMT_FLAG_EMPTY_PREC_OK|FMT_FLAG_NULL_FORMAT_OK, ++ FMT_FLAG_ARG_CONVERT|FMT_FLAG_DOLLAR_MULTIPLE|FMT_FLAG_USE_DOLLAR|FMT_FLAG_EMPTY_PREC_OK, + 'w', 0, 'p', 0, 'L', 0, + &integer_type_node, &integer_type_node + }, @@ -79,29 +79,3 @@ } }; -@@ -1635,6 +1693,9 @@ check_format_arg (void *ctx, tree format_tree, - - if (integer_zerop (format_tree)) - { -+ if (!(format_types[info->format_type].flags & FMT_FLAG_NULL_FORMAT_OK)) -+ warning (OPT_Wformat_, "null format string"); -+ - /* Skip to first argument to check, so we can see if this format - has any arguments (it shouldn't). */ - while (arg_num + 1 < info->first_arg_num) ---- gcc/c-family/c-format.h.orig 2022-05-06 00:30:56.000000000 -0700 -+++ gcc/c-family/c-format.h 2022-11-17 17:31:38.546594000 -0800 -@@ -77,11 +77,12 @@ enum - FMT_FLAG_DOLLAR_GAP_POINTER_OK = 128, - /* The format arg is an opaque object that will be parsed by an external - facility. */ -- FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL = 256 -+ FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL = 256, - /* Not included here: details of whether width or precision may occur - (controlled by width_char and precision_char); details of whether - '*' can be used for these (width_type and precision_type); details - of whether length modifiers can occur (length_char_specs). */ -+ FMT_FLAG_NULL_FORMAT_OK = 512 - }; - - /* Structure describing a length modifier supported in format checking, and