From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 72397389942D for ; Thu, 2 Feb 2023 18:21:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 72397389942D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org From: Sam James Content-Type: multipart/signed; boundary="Apple-Mail=_8FE85910-82EF-48C3-91F3-30DD41A5B78A"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.3\)) Subject: Re: [PATCH] stdlib: tests: don't double-define _FORTIFY_SOURCE Date: Thu, 2 Feb 2023 18:21:05 +0000 References: <20220805201358.2348750-1-sam@gentoo.org> <294385d7-3974-9089-e190-782bffd40af8@gotplt.org> <2C25DD11-565E-4ED7-A188-E935D1F43083@gentoo.org> <59f7bd6f-8e8d-20d9-b59b-f8907b915cbc@gotplt.org> <1205C8B0-F1DD-4858-9329-FAB30F40E58E@gentoo.org> To: Siddhesh Poyarekar , Libc-alpha In-Reply-To: <1205C8B0-F1DD-4858-9329-FAB30F40E58E@gentoo.org> Message-Id: <331D21D7-8BD7-43E5-B714-FB4B60702EA1@gentoo.org> X-Mailer: Apple Mail (2.3731.300.101.1.3) X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --Apple-Mail=_8FE85910-82EF-48C3-91F3-30DD41A5B78A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 10 Aug 2022, at 16:06, Sam James via Libc-alpha = wrote: >=20 >=20 >=20 >> On 10 Aug 2022, at 15:29, Siddhesh Poyarekar = wrote: >>=20 >> On 2022-08-08 18:30, Sam James wrote: >>> This is a fair point, although I now see we've actually got = libc_cv_predef_fortify_source >>> which sets CPPUNDEFS for exactly this sort of problem anyway. >>> I don't see the warning with gcc-11 + -Werror + F_S=3D3 on a test = program. I can build some >>> older GCCs as I should probably keep them around anyway though. >>=20 >> Interesting, because you should have seen the warning about = _FORTIFY_SOURCE=3D3 not being supported; I'm surprised that it doesn't = fail due to that warning. >=20 > ... and I see it now. I don't know what I did the other day. Oops. >=20 >>=20 >>>> Alternatively, some magic here to determine the maximum = fortification level wouldn't hurt, but I won't gate your patch on that = :) I can work on that bit. >>> I started looking at that and I'm not sure there's a point. = includes/features.h downgrades us appropriately. I think we can = unconditionally >>> set F_S=3D3 if I'm right about GCC not caring, as all the logic is = on the glibc side, right? >>=20 >> It's the warning I'm thinking about avoiding. >>=20 >>> We can always split this into two if you want: >>> 1. The original commit (I can convert it to use = libc_cv_predef_fortify_source's result) & backport it to 2.36 >>=20 >> Sounds good to me. >>=20 >>> 2. Another to crank to =3D3 and don't backport it in case I'm = missing something. >>=20 >=20 > Okay, sounds like a plan, cheers. I'll get on it. >=20 I ended up getting frustrated with some over engineering and got = distracted with fixing up autoconf-archive's macro for it. Could you push the this one or do you want me to resend it? Cheers! --Apple-Mail=_8FE85910-82EF-48C3-91F3-30DD41A5B78A Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iNUEARYKAH0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCY9v/EV8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MAAKCRBzhAn1IN+R kIV3AQDEu7N9lgopdTZN/bVXLGUnLl+UKgezYXJUCgGj2JdcDgD/Ygj6Xk9bsUMx KSJ0XU5DKxuPTETw30Vp6+LVD+2deQo= =X73H -----END PGP SIGNATURE----- --Apple-Mail=_8FE85910-82EF-48C3-91F3-30DD41A5B78A--