From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id B877C3857824 for ; Wed, 10 Aug 2022 15:06:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B877C3857824 Content-Type: multipart/signed; boundary="Apple-Mail=_7A45CBBA-C2E7-40B7-8C91-C0CD7767CD87"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: [PATCH] stdlib: tests: don't double-define _FORTIFY_SOURCE From: Sam James In-Reply-To: <59f7bd6f-8e8d-20d9-b59b-f8907b915cbc@gotplt.org> Date: Wed, 10 Aug 2022 16:06:13 +0100 Cc: libc-alpha@sourceware.org Message-Id: <1205C8B0-F1DD-4858-9329-FAB30F40E58E@gentoo.org> 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> To: Siddhesh Poyarekar X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2022 15:06:21 -0000 --Apple-Mail=_7A45CBBA-C2E7-40B7-8C91-C0CD7767CD87 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > 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. ... and I see it now. I don't know what I did the other day. Oops. >=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 Okay, sounds like a plan, cheers. I'll get on it. > Thanks, > Sid --Apple-Mail=_7A45CBBA-C2E7-40B7-8C91-C0CD7767CD87 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+RkAUCYvPJZV8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MAAKCRBzhAn1IN+R kLNvAQDEPiCfEYaqc3S5DMqgd2zIYtZFCZx6mRyGw7Vi5ZGUvgD/fXYud5Ik2Qt2 WQlWbUvXAK9xzg5s4hxcY3szmOVtiQg= =dQF0 -----END PGP SIGNATURE----- --Apple-Mail=_7A45CBBA-C2E7-40B7-8C91-C0CD7767CD87--