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 B1E1E385780C; Tue, 3 May 2022 10:33:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B1E1E385780C 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 6E157188EC0; Tue, 3 May 2022 12:33:43 +0200 (CEST) Date: Tue, 3 May 2022 12:33:42 +0200 From: Piotr Kubaj To: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org Cc: segher@kernel.crashing.org Subject: Re: [PATCH V2] powerpc: properly check for feenableexcept() on FreeBSD Message-ID: References: <20220503102111.10406-1-pkubaj@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="jvv9C8h+WNuvXyT0" Content-Disposition: inline In-Reply-To: <20220503102111.10406-1-pkubaj@FreeBSD.org> X-Spam-Status: No, score=-9.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Tue, 03 May 2022 10:33:48 -0000 --jvv9C8h+WNuvXyT0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Here are gmake check-gfortran results requested by FX. Before patching: =3D=3D=3D gfortran Summary =3D=3D=3D # of expected passes 65106 # of unexpected failures 6 # of expected failures 262 # of unsupported tests 367 After patching: =3D=3D=3D gfortran Summary =3D=3D=3D # of expected passes 65384 # of unexpected failures 6 # of expected failures 262 # of unsupported tests 373 In both cases, unexpected failures are: FAIL: gfortran.dg/pr98076.f90 -O0 execution test FAIL: gfortran.dg/pr98076.f90 -O1 execution test FAIL: gfortran.dg/pr98076.f90 -O2 execution test FAIL: gfortran.dg/pr98076.f90 -O3 -fomit-frame-pointer -funroll-loops -fp= eel-loops -ftracer -finline-functions execution test FAIL: gfortran.dg/pr98076.f90 -O3 -g execution test FAIL: gfortran.dg/pr98076.f90 -Os execution test But this seems unrelated to my patch. On 22-05-03 12:21:12, pkubaj@FreeBSD.org wrote: > From: Piotr Kubaj >=20 > FreeBSD/powerpc* has feenableexcept() defined in fenv.h header. >=20 > Signed-off-by: Piotr Kubaj > --- > libgfortran/configure | 41 +++++++++++++++++++++++++++++++++++++++- > libgfortran/configure.ac | 17 ++++++++++++++++- > 2 files changed, 56 insertions(+), 2 deletions(-) >=20 > diff --git a/libgfortran/configure b/libgfortran/configure > index ae64dca3114..ad71694ef05 100755 > --- a/libgfortran/configure > +++ b/libgfortran/configure > @@ -27338,8 +27338,45 @@ fi > =20 > =20 > =20 > +case x$target in > + xpowerpc*-freebsd*) > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fenv.h and fee= nableexcept" >&5 > +$as_echo_n "checking for fenv.h and feenableexcept... " >&6; } > +if ${have_feenableexcept+:} false; then : > + $as_echo_n "(cached) " >&6 > +else > + > + cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h. */ > + #include > +int > +main () > +{ > + feenableexcept(FE_DIVBYZERO | FE_INVALID); > + ; > + return 0; > +} > +_ACEOF > +if ac_fn_c_try_compile "$LINENO"; then : > + have_feenableexcept=3D"yes" > +else > + have_feenableexcept=3D"no" > +fi > +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > +fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_feenableexcept" >= &5 > +$as_echo "$have_feenableexcept" >&6; } > + if test "x$have_feenableexcept" =3D "xyes"; then > + > +cat >>confdefs.h <<_ACEOF > +#define HAVE_FEENABLEEXCEPT 1 > +_ACEOF > + > + fi; > + ;; > + *) > # Check for GNU libc feenableexcept > -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for feenableexcept in = -lm" >&5 > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for feenableexcept= in -lm" >&5 > $as_echo_n "checking for feenableexcept in -lm... " >&6; } > if ${ac_cv_lib_m_feenableexcept+:} false; then : > $as_echo_n "(cached) " >&6 > @@ -27384,6 +27421,8 @@ $as_echo "#define HAVE_FEENABLEEXCEPT 1" >>confde= fs.h > =20 > fi > =20 > + ;; > +esac > =20 > # At least for glibc, clock_gettime is in librt. But don't > # pull that in if it still doesn't give us the function we want. This > diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac > index 97cc490cb5e..2dd6d345b22 100644 > --- a/libgfortran/configure.ac > +++ b/libgfortran/configure.ac > @@ -602,8 +602,23 @@ fi > # Check whether we have a __float128 type, depends on enable_libquadmath= _support > LIBGFOR_CHECK_FLOAT128 > =20 > +case x$target in > + xpowerpc*-freebsd*) > + AC_CACHE_CHECK([for fenv.h and feenableexcept], have_feenableexcept,= [ > + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( > + [[ #include ]], > + [[ feenableexcept(FE_DIVBYZERO | FE_INVALID); ]])], > + [ have_feenableexcept=3D"yes" ], > + [ have_feenableexcept=3D"no" ])]) > + if test "x$have_feenableexcept" =3D "xyes"; then > + AC_DEFINE(HAVE_FEENABLEEXCEPT,1,[fenv.h includes feenableexcept]) > + fi; > + ;; > + *) > # Check for GNU libc feenableexcept > -AC_CHECK_LIB([m],[feenableexcept],[have_feenableexcept=3Dyes AC_DEFINE([= HAVE_FEENABLEEXCEPT],[1],[libm includes feenableexcept])]) > + AC_CHECK_LIB([m],[feenableexcept],[have_feenableexcept=3Dyes AC_DEFI= NE([HAVE_FEENABLEEXCEPT],[1],[libm includes feenableexcept])]) > + ;; > +esac > =20 > # At least for glibc, clock_gettime is in librt. But don't > # pull that in if it still doesn't give us the function we want. This > --=20 > 2.36.0 >=20 --jvv9C8h+WNuvXyT0 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEycyIeNkkgohzsoorelmbhSCDnJ0FAmJxBQYACgkQelmbhSCD nJ1ZMxAAsvUmRtOHgKE7qMNqFLpnO8RoWQ7THeWh5IZ2LpNPJR+5ebGMzEOpsdMp gpOLLMknOBoheUjSWYlsqqMsobug/CtoXPSuVL/qjgHNIiZQ5/CO1ewv4PdVM8gl PTXMwQeIhmtS/cnJZZ/umNuJHh4qL9bYnFgO2Cdei5zJqpfG37WgiIcnEKoYNgBz dNEYrrsPdhvADG/EI6DAPGDYyb1bZLFgYm317vTUBRX2NjD3zjrWJRf6DJpcnM5W CcjrNIwzG3pijOFdBIRW053Wl7MV3CkQp3gc8Ujafmec83UvK3tbwI2VGN8rW1ub jWLUrgyY72flozMjXUg0qxfrTjJwWz9VzLhKU/k9qerXM38A/S+QqFzMfcyykogF hh/7jbK8eJ2AevnYdbeF9ZTRkI40Q7qPlM24IGLYi+owb2ve59Fgxw18HTeBNVzA /td8ZN4w4DfiipKfEeWCeiELi2ya8Xx8944gxVDbj9jr58lL7YGz5MtL5J54pu/b +ulybeK8G6SH1edl7w1b2uNI9wRdVd5vIcCVSKXs6rV4vFTz9rhOeHPwsRtgtjEc DBjCstFXv8GjDNtoKwzJhQBZy/T/Y0q2Fyjyc3pAXCd6XlGxWV+lvuVrw14vqSQC t/s4zkkChGRMdA6hpA2e1pWc/blE01HKoSMcXxZzq01Sfx+tCyI= =WJar -----END PGP SIGNATURE----- --jvv9C8h+WNuvXyT0--