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 12875385737A; Tue, 10 May 2022 23:32:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 12875385737A 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 AB22618D878; Wed, 11 May 2022 01:32:26 +0200 (CEST) Date: Wed, 11 May 2022 01:32:25 +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="cCvv100jWUeuauRW" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-9.4 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, 10 May 2022 23:32:36 -0000 --cCvv100jWUeuauRW Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Is there anything more required? On 22-05-03 12:33:43, Piotr Kubaj wrote: > Here are gmake check-gfortran results requested by FX. >=20 > Before patching: > =3D=3D=3D gfortran Summary =3D=3D=3D >=20 > # of expected passes 65106 > # of unexpected failures 6 > # of expected failures 262 > # of unsupported tests 367 >=20 > After patching: > =3D=3D=3D gfortran Summary =3D=3D=3D >=20 > # of expected passes 65384 > # of unexpected failures 6 > # of expected failures 262 > # of unsupported tests 373 >=20 > 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 -= fpeel-loops -ftracer -finline-functions execution test > FAIL: gfortran.dg/pr98076.f90 -O3 -g execution test > FAIL: gfortran.dg/pr98076.f90 -Os execution test >=20 > But this seems unrelated to my patch. >=20 > 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 f= eenableexcept" >&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 i= n -lm" >&5 > > + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for feenableexce= pt 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" >>conf= defs.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_libquadma= th_support > > LIBGFOR_CHECK_FLOAT128 > > =20 > > +case x$target in > > + xpowerpc*-freebsd*) > > + AC_CACHE_CHECK([for fenv.h and feenableexcept], have_feenableexcep= t, [ > > + 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_DE= FINE([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 --cCvv100jWUeuauRW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEycyIeNkkgohzsoorelmbhSCDnJ0FAmJ69gkACgkQelmbhSCD nJ0QDg/+Ks24uxKeK+4AWB1zKJu6D6VTWECYDEqT5704j+wH5oYLRWsq6sYbPFbT Pw7Hn+JWRWw2i5agtPdrepApii2isLw2bgpOPR40IxVkfWjHdO8V+WtA0py/Whyg 6rIX47SJs49FCbSPy0cQcU1VkrgwiHgTCRRrbdNLRi8TUdFtrT8k0QfFpSZ/8hjP k+QuEUqXXl2h9AUVh3UjGko2IyWhxUf6+sep7vwEKOh+hfnIkSNkkF3ZrqPFSsz2 5hQ/jMAKl3NpmTs1Zc0+ag9NhiJL5XB5pYDwFOJWsDa6BF8ijmOagfIMpv8SudAO t5jD9F11phnGI85N2GcpUWDngIyfkdGcpdOkwcmUNiwfC5NvKdv8/v/0XYB7HfYu v1NcxNToh+C7wXAwrSV7Wsb6DzdruW/50FmK17j0GWVSsm7VivOOe77umdX2m0rx b7F7LF06sJeyG20bShFwS7lZFRvggHLgtilkOL+G/nfREKZ9mAO31chWOXPG4aZ2 327kbzA61MsHPfwiFZfzS6RYlTcQ8jXWXMbbM4C9snV2C9PJVdX9tqTCLyysYUlt T3EF4Dep1BvqTyy6ww5CB4bPUjtqXdTsV1wAgC+gv7hkQiz8vARg+RKlynfLo0Nb g0LXHNzi41a6PJiVFwbs2KHecHZVIo7+26qaPJXLnZHT7FDfMxw= =vV8E -----END PGP SIGNATURE----- --cCvv100jWUeuauRW--