From nobody Fri Jul 19 21:20:00 2024 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 4WQjHy0XJLz5QNtt for ; Fri, 19 Jul 2024 21:20:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQjHx3LTvz4Qjf for ; Fri, 19 Jul 2024 21:20:13 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20230601.gappssmtp.com header.s=20230601 header.b="rFzSwP+/"; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::1032) smtp.mailfrom=wlosh@bsdimp.com Received: by mail-pj1-x1032.google.com with SMTP id 98e67ed59e1d1-2cb55ff1007so1241651a91.0 for ; Fri, 19 Jul 2024 14:20:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1721424012; x=1722028812; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Z/VeZp87PqUAzCEtlovEoaD9mT3GdD5oZbMO3uWSSZ8=; b=rFzSwP+/Trqz1UCgKW4FRa+e7LdJwGD1J4Yqf1N9EOqPFP9RXJ0aVM5l69vNsDL9GX CMOpUfXgLG5eepknx6GLEVRkZaHx2btI6hKiPPs5Mmt04GLF0DWndjNYirayF8Bictdg FH9Tq1igOETw55ZM16ySXDwi8z/xCcP4903SaFe65Jv9OSU1LxcrQk8OAxPhOakj2FUp FetMYvaoX5+DtPVQk9+aqJwMLDhdHpn+qzH/jBZc8kBGy3WxXWQwVlcJV5kAdp4XP0qm n+bfSqzIVjcSVyK0RG3pnBevwWA0NmgDv/k8r/PnFSQkZZJ5VzTqPBfQVFYtmxBltFFa APcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721424012; x=1722028812; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Z/VeZp87PqUAzCEtlovEoaD9mT3GdD5oZbMO3uWSSZ8=; b=EkzEYJBZc5f7vXVlxGQq1Ll4zFL1VX/KJZeGE0Q0ohog/nQpvjG+xYGsnfJIXKk2Jp iFzCgzL80C7Q7OxvvOFVsew/V0PXTlLzM+03w0U9u6ZThKaHsisvn0xYRluq/hMvHqJR fByKJpdHGkeGv08ctzPBQKDCQbjt1sq/2HWNEQiK3q6K13DVC206YBrJV597fRsWCs45 NW0I7YCZQOMHyeUTNDT2isozcCezbMYKGfRbfMJkFMk4yQRApVhcUqN4MgSrGTs/orvL RPNY8puUOYoFQ5QD6GoCuC8s5QkemFhCwwzVUdJtjxP/0KHLkNvdBqOklytGgcClGOyc cjuw== X-Forwarded-Encrypted: i=1; AJvYcCXR92KSwDi6j1CcJMnCwsnjP8/lSJlTSEQz7qLWY2rVpEf9ODv80ja/CsUMXp+VC9cEK27jxdDED6c5poG2r6RD5I98lmctLXSM0iux3xS/ X-Gm-Message-State: AOJu0Yyy8DDJ8mtH0XqU8GqUamgUI34yWenRdFWPDRLfqrJr8rIUU3GJ 7eyhm0vfBKRYwzT2rvcxs/vp0T0hKuJSLHnQMYSeCVH7BNb2v+4FcHN7iyqAScJP4qFcN1Wq2M0 Is0i+4+rA1vAyAokp01D7jeXYOfv7pGiYMiKXuw== X-Google-Smtp-Source: AGHT+IGWnFDTbGMp7AXJPEXdiXdi33FdkhRO0Uv+v48rnKVrb8HrwoH1lOHxI0qgJWJLUsHUvxcN654HTs6j7cMlP0w= X-Received: by 2002:a17:90a:fa84:b0:2c2:d813:bffa with SMTP id 98e67ed59e1d1-2cd15feb69bmr927623a91.43.1721424011554; Fri, 19 Jul 2024 14:20:11 -0700 (PDT) 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 References: <202407061944.466JiiQ3026410@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Fri, 19 Jul 2024 15:20:00 -0600 Message-ID: Subject: Re: git: 6677621bad00 - main - cdefs.h: Fallback to printf0 for __printf0like To: John Baldwin Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000b78c8a061da0426b" X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.61 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.61)[-0.605]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20230601.gappssmtp.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MISSING_XM_UA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::1032:from]; DMARC_NA(0.00)[bsdimp.com]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; R_SPF_NA(0.00)[no SPF record]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20230601.gappssmtp.com:+] X-Rspamd-Queue-Id: 4WQjHx3LTvz4Qjf --000000000000b78c8a061da0426b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jul 10, 2024 at 12:19=E2=80=AFPM John Baldwin wro= te: > On 7/6/24 17:56, John Baldwin wrote: > > On 7/6/24 15:44, Warner Losh wrote: > >> The branch main has been updated by imp: > >> > >> URL: > https://cgit.FreeBSD.org/src/commit/?id=3D6677621bad00191dfec1b0a20ae1618= b92745d9b > >> > >> commit 6677621bad00191dfec1b0a20ae1618b92745d9b > >> Author: Warner Losh > >> AuthorDate: 2024-07-06 19:42:37 +0000 > >> Commit: Warner Losh > >> CommitDate: 2024-07-06 19:45:03 +0000 > >> > >> cdefs.h: Fallback to printf0 for __printf0like > >> > >> For some reason, my tests were fine with this like it was, but C= I > for > >> gcc12 and gcc13 is complaining. Revert to the old form until tha= t > can be > >> worked out why the mismatch. > >> > >> Fixes: 0b82dac337e7 > >> Sponsored by: Netflix > >> --- > >> sys/sys/cdefs.h | 7 +++++-- > >> 1 file changed, 5 insertions(+), 2 deletions(-) > >> > >> diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h > >> index 6b861b1903f6..a56839d57c7a 100644 > >> --- a/sys/sys/cdefs.h > >> +++ b/sys/sys/cdefs.h > >> @@ -356,9 +356,12 @@ > >> * Clang has always had printf and printf0 as aliases. gcc 11.0 now > follows > >> * clang. So now this is an alias for __printflike, or nothing. In > the future > >> * _Nullable or _Nonnull will replace this. > >> + * XXX Except that doesn't work, so for now revert to printf0 for > clang and > >> + * the FreeBSD gcc until I can work this out. > >> */ > >> -#if defined(__clang__) || __GNUC_PREREQ__(11, 0) > >> -#define __printf0like(fmtarg, firstvararg) __printflike(fmtarg, > firstvararg) > >> +#if defined(__clang__) || (defined(__GNUC__) && defined > (__FreeBSD_cc_version)) > >> +#define __printf0like(fmtarg, firstvararg) \ > >> + __attribute__((__format__ (__printf0__, fmtarg, firstvararg))= ) > >> #else > >> #define __printf0like(fmtarg, firstvararg) > >> #endif > > > > It's because my patch for devel/freebsd-gcc{12,13} is kind of wrong. I > had a mismerge > > when updating the printf0 patch from gcc9 to gcc12 that ended up > re-adding the > > warn on NULL. I need to update the ports to remove that part of the > patch. I will > > probably leave printf0 working for now in the ports just as an alias fo= r > regular > > printf to give us some transition time. > > FYI, I have merged this fix to the ports, but not sure how we want to > manage doing > the patch to cdefs.h. I kind of think we should apply the change to > cdefs.h in > main in another week or so. I'm less certain of what to do for stable > branches. > I hadn't planned on merging this to stable branches. Is that your concern? Or something else? For building on the stable branch, we should be fine since we support a wider range of compilers anyway with the older cdefs.h file, and the new file will work with all supported stable branch compilers (though maybe not some of the gcc ones, I've not tested that at all). Also it's been just over a week, can I recommit this, or is more time needed? Warner --000000000000b78c8a061da0426b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, Jul 10, 2024 at 12:19=E2=80= =AFPM John Baldwin <jhb@freebsd.org> wrote:
On= 7/6/24 17:56, John Baldwin wrote:
> On 7/6/24 15:44, Warner Losh wrote:
>> The branch main has been updated by imp:
>>
>> URL:
http= s://cgit.FreeBSD.org/src/commit/?id=3D6677621bad00191dfec1b0a20ae1618b92745= d9b
>>
>> commit 6677621bad00191dfec1b0a20ae1618b92745d9b
>> Author:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
>> AuthorDate: 2024-07-06 19:42:37 +0000
>> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
>> CommitDate: 2024-07-06 19:45:03 +0000
>>
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0cdefs.h: Fallback to printf0 for __print= f0like
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0For some reason, my tests were fine with= this like it was, but CI for
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0gcc12 and gcc13 is complaining. Revert t= o the old form until that can be
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0worked out why the mismatch.
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0Fixes: 0b82dac337e7
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0Netflix
>> ---
>>=C2=A0 =C2=A0 sys/sys/cdefs.h | 7 +++++--
>>=C2=A0 =C2=A0 1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
>> index 6b861b1903f6..a56839d57c7a 100644
>> --- a/sys/sys/cdefs.h
>> +++ b/sys/sys/cdefs.h
>> @@ -356,9 +356,12 @@
>>=C2=A0 =C2=A0 =C2=A0* Clang has always had printf and printf0 as al= iases. gcc 11.0 now follows
>>=C2=A0 =C2=A0 =C2=A0* clang. So now this is an alias for __printfli= ke, or nothing. In the future
>>=C2=A0 =C2=A0 =C2=A0* _Nullable or _Nonnull will replace this.
>> + * XXX Except that doesn't work, so for now revert to printf0= for clang and
>> + * the FreeBSD gcc until I can work this out.
>>=C2=A0 =C2=A0 =C2=A0*/
>> -#if defined(__clang__) || __GNUC_PREREQ__(11, 0)
>> -#define=C2=A0 =C2=A0 =C2=A0__printf0like(fmtarg, firstvararg) __p= rintflike(fmtarg, firstvararg)
>> +#if defined(__clang__) || (defined(__GNUC__) && defined (= __FreeBSD_cc_version))
>> +#define=C2=A0 =C2=A0 =C2=A0__printf0like(fmtarg, firstvararg) \ >> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 __attribute__((__format__ (__printf0_= _, fmtarg, firstvararg)))
>>=C2=A0 =C2=A0 #else
>>=C2=A0 =C2=A0 #define=C2=A0 =C2=A0__printf0like(fmtarg, firstvararg= )
>>=C2=A0 =C2=A0 #endif
>
> It's because my patch for devel/freebsd-gcc{12,13} is kind of wron= g.=C2=A0 I had a mismerge
> when updating the printf0 patch from gcc9 to gcc12 that ended up re-ad= ding the
> warn on NULL.=C2=A0 I need to update the ports to remove that part of = the patch.=C2=A0 I will
> probably leave printf0 working for now in the ports just as an alias f= or regular
> printf to give us some transition time.

FYI, I have merged this fix to the ports, but not sure how we want to manag= e doing
the patch to cdefs.h.=C2=A0 I kind of think we should apply the change to c= defs.h in
main in another week or so.=C2=A0 I'm less certain of what to do for st= able branches.

I hadn't planned on = merging this to stable branches. Is that your concern? Or something else?
For building on the stable branch, we should be fine since we supp= ort a wider range of
compilers anyway with the older cdefs.h file= , and the new file will work with all supported
stable branch com= pilers (though maybe not some of the gcc ones, I've not tested
that at all).

Also it's been just over a wee= k, can I recommit this, or is more time needed?

Wa= rner
--000000000000b78c8a061da0426b--