From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.anongoth.pl (mail.anongoth.pl [46.248.190.61]) by sourceware.org (Postfix) with ESMTPS id 66D5F3858C52; Fri, 13 May 2022 10:34:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 66D5F3858C52 Received: from anongoth.pl (unknown [192.168.1.15]) (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) (Authenticated sender: pkubaj@anongoth.pl) by mail.anongoth.pl (Postfix) with ESMTPSA id 231E2194819; Fri, 13 May 2022 12:34:06 +0200 (CEST) Date: Fri, 13 May 2022 12:34:05 +0200 From: Piotr Kubaj To: "Kewen.Lin" Cc: Segher Boessenkool , gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org Subject: Re: [PATCH V2] powerpc: properly check for feenableexcept() on FreeBSD Message-ID: References: <20220503102111.10406-1-pkubaj@FreeBSD.org> <20220512201637.GR25951@gate.crashing.org> <56585bab-71b3-1713-d8ed-bed80cfe5ec4@linux.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wf+36tTPeEGtYXan" Content-Disposition: inline In-Reply-To: <56585bab-71b3-1713-d8ed-bed80cfe5ec4@linux.ibm.com> X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2022 10:34:15 -0000 --wf+36tTPeEGtYXan Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 22-05-13 10:59:59, Kewen.Lin wrote: > on 2022/5/13 04:16, Segher Boessenkool wrote: > > Hi Piotr, > >=20 > > On Tue, May 03, 2022 at 12:21:12PM +0200, pkubaj@FreeBSD.org wrote: > >> FreeBSD/powerpc* has feenableexcept() defined in fenv.h header. > >=20 > > Declared, not defined. These are required to be real functions (on all > > platforms that have these functions), not macros or inlines or whatever. > >=20 >=20 > Piotr's reply "FreeBSD doesn't have this function in libm, it's > implemented in /usr/include/fenv.h." from [1] made me feel like > it's a definition instead of declaration. So I thought the check > should use AC_LINK_IFELSE instead, since one fenv.h which doesn't > have the definition can still pass the proposed AC_COMPILE_IFELSE > check. >=20 > I just did a further search, the powerpc fenv.h [2] does include > the definition of feenableexcept. By comparison, the x86 fenv.h [3] > doesn't. But I'm not sure if it's the same as what Piotr's > environments have. Hope it's similar. :-) >=20 > [1] https://gcc.gnu.org/pipermail/gcc-patches/2022-April/593193.html > [2] https://github.com/freebsd/freebsd-src/blob/main/lib/msun/powerpc/fen= v.h > [3] https://github.com/freebsd/freebsd-src/blob/main/lib/msun/x86/fenv.h Yes, it's a definition and thanks for confirming that. As for why it's not = in libm, I asked a developer about that: 03:04 <@adalava> It shouldn't be difficulted but I moved to other thing aft= er months looking at FPE in kernel, bugs in context switch and msun test ca= ses failing :-P As far as I know, there are currently no plans to move it to libm on powerp= c. riscv, arm and arm64 are in the same boat. I will follow with a next patch that will check for feenableexcept() in fen= v.h if libm check is unsuccessful. Thanks, Piotr Kubaj. >=20 > BR, > Kewen >=20 --wf+36tTPeEGtYXan Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEycyIeNkkgohzsoorelmbhSCDnJ0FAmJ+NB0ACgkQelmbhSCD nJ0fYQ//U4aCXNmBbD5aavuLghBDW9EEpJTnqS6ckUqu4kHlojyUA+uwxk+kqzvm EmKHbywSYRb2dQWclM+4seXXnQqIFsti27km6O578msOzHj49oJ7Lmmud5n4Pb1o MBBxJubD+WbgXolM8IQi09HpN8e040dulzrj6iMfdHkEy3YSrENuZPbjLkQFHbRM Q9+f+6S/c3YWqadBShlJHoS2V3UzenBAgi+7J8izOWKGSY2/VYpkHxa+GHwW1T6J AzExeFpj4S12CPOIbA0okyMzk4Csp8tyjCl/msdDu/n1QfaeRdTEcduSmYAjgT9t gT7Fj8EN1HixWQl3HL8Yzq5rsnSrNxKXGRo563McaX6LLVN2EOKFOSY9/kDyw8Ve +/UmQlEmqPxay49V188vu5PFw2eYSd7UxkfADAfBvP4wWuf8oJ9A77zQOO7SDjBq Lqfd608D1Kii63sOoIIU5ZNkmjWk8whnY5OywF/6KksWz0njMw+XjGBvFo+0jUvV bj2I7xke0m3KAhe/1lpgUqhvC9FMBDbk3/L/71UKFM1C6Ii6GKfwbc0JXgL8HlGo 9bFYkTIw/gdAET7v0sKjzizFEt6awB24dPSIZYoXRxPoEraQvk8SNqc1CBIDnfEU jdoTwlheAfrHErRsm9Y2Ngq2TaYn0ZsIXbKnpR/VyNpmciR7hJc= =nr1p -----END PGP SIGNATURE----- --wf+36tTPeEGtYXan--