From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 7D67E3858421 for ; Mon, 24 Oct 2022 17:18:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7D67E3858421 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org Received: by smtp.gentoo.org (Postfix, from userid 559) id DFA3D340F83; Mon, 24 Oct 2022 17:18:10 +0000 (UTC) Date: Mon, 24 Oct 2022 21:48:37 +0545 From: Mike Frysinger To: Tsukasa OI Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 02/40] sim: Check known getrusage declaration existence Message-ID: Mail-Followup-To: Tsukasa OI , gdb-patches@sourceware.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="XW2n++24md1ku0sN" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-5.1 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: --XW2n++24md1ku0sN Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 24 Oct 2022 19:47, Tsukasa OI wrote: > On 2022/10/23 22:59, Mike Frysinger wrote: > > On 20 Oct 2022 09:32, Tsukasa OI wrote: > >> Clang generates a warning if there is a function declaration/definition > >> with zero arguments. Such declarations/definitions without a prototype= (an > >> argument list) are deprecated forms of indefinite arguments > >> ("-Wdeprecated-non-prototype"). On the default configuration, it cause= s a > >> build failure (unless "--disable-werror" is specified). > >> > >> Such getrusage function declarations are placed in three files under s= im/ppc > >> and to avoid defining those on the modern environments, this commit wi= ll > >> make the configuration script to find the known declaration of getrusa= ge > >> and defines HAVE_DECL_GETRUSAGE if it finds one. > >> > >> If we find one (and we *will* in most modern environments), we don't n= eed > >> to rely on the deprecated declarations. > >> --- > >> sim/config.h.in | 4 ++++ > >> sim/configure | 32 ++++++++++++++++++++++++++++++++ > >> sim/configure.ac | 10 ++++++++++ > >> 3 files changed, 46 insertions(+) > >=20 > > you didn't actually fix the bad prototypes in the ppc code -- just dele= te them. > > pretty sure once you do, you won't need any of these changes. >=20 > I wasn't sure that we could remove getrusage declarations without > prototype because it drops support for *really* old environments. If we > can "just" remove getrusage declarations (it seems you are okay with > it), that will get definitely simpler. the GNU sim documentation says we require an ISO C11 compiler & correspondi= ng runtime. if such a system exists that someone cares about, they can propose a patch & corresponding documentation. putting bandaids on bandaids that we can't test isn't really sustainable. -mike --XW2n++24md1ku0sN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmNWt1kACgkQQWM7n+g3 9YFJEA/+Id344Subq7/1AR5+f2rgGPUd55ZiN1opKumT4uKBfj43LOEHIOY2rqct nD0kX3TQ30Tsa+AFYsgUvE/FJRB82jMgJqc2SYtfUN9McXx8+4CPsTs/Bzf57FOi 6d3EG8QRLAy1MIqzb9AJOCpWOX3hkrcRI1kv1uawA1/43iDHbi2YmH2Oho3F7VrW 9X+uwpZ4H6ENHNQauvhbj0VMWnRhG5UxZyzPya6klcFn8/81t/HXh94zd51XpJTl i8bRUVJhR8/2mBUiGN5thO5O0ebz94BtGAIREyhqH6rbgCCorWY782VBJpG8xoVB rKrdTeHnbapeT9AGv10r/eriJNyZfEPsKfODZ41LJNSGo9wtGC30V7sUavpIjQDU j/C+ZxQnZYhNxJqDQ4yZU6UIA0a7Ft8Le6spEdfEkoWloj2bN0e1P3f0+xko/P+i L+EHX3tIaKAQ21Ppq6LluJMEkmxZ5MAyZgiIsoGmQ/gvWhmhOsP8QnY6C1VSsF+k uDkHr0iOa5sOOp8obf+v8ZE/prf7px1m2lZSQxYI9Drehkvn1v57BkE0Mfc1nqzF 4mm+H4TWFRa4jlWmwVdOm+jMqQQMIxLyGOstVO2X05q+gsE7NQUdAyJf7c95cnZO 7iDypoDzUTN60rZsrVnXNEh0W1yiyL1ddjkllsu7BCNi6WxYlGE= =otBI -----END PGP SIGNATURE----- --XW2n++24md1ku0sN--