public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sgk at troutmask dot apl.washington.edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/100662] intrinsic::ieee_arithmetic fails on aarch, powerpc architectures on FreeBSD
Date: Wed, 19 May 2021 15:19:27 +0000	[thread overview]
Message-ID: <bug-100662-4-QShNjdOaLj@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100662-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100662

--- Comment #10 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Wed, May 19, 2021 at 09:45:12AM +0000, ripero84 at gmail dot com wrote:
> --- Comment #9 from ripero84 at gmail dot com ---
> Steve, is this a GCC bug or a FreeBSD bug (or if it is something else, what
> side does this belong to)?

I suppose it is both.  AFAIK, there is no longer an active FreeBSD
maintainer for GCC (if there were, the few non-gfortran PR/patches
I submitted would have been committed).  I no longer send patches
to GCC for gfortran as I know virtually nothing about git.

> Other OSs seem to be able to compile gfortran with these modules for these
> architectures, see, e.g.,
> https://packages.ubuntu.com/focal/arm64/gfortran-10/filelist and
> https://packages.ubuntu.com/focal/ppc64el/gfortran-10/filelist).  And they seem
> to have been able to do so since the introduction of the three Fortran IEEE
> intrinsic modules in GCC 5
> (https://packages.ubuntu.com/bionic/amd64/gfortran-5/filelist and
> https://packages.ubuntu.com/bionic/ppc64el/gfortran-5/filelist). Therefore,
> some kind of solution must exist for this - and probably has been there for
> over half a decade. (Apologies for not being able to provide a better insight
> from the Ubuntu sources.)

ubuntu is glibc.  You (or something) needs to read libgfortran/configure.host,
and add the needed logic for FreeBSD to pick up an appropriate fpu-*.h
file on aarch64.  The first 3 non-comment lines of that file are

# DEFAULTS
fpu_host='fpu-generic'
ieee_support='no'

which is what non-i386/amd64 FreeBSD systems likely use.  It seems
fpu-generic.h provides stubs for a few functions required to build
gfortran.  After gfortran is built, installation does not install
useless ieee*.mod files.  Note, a standard conforming Fortran
compiler is not required to support the ieee modules.

Furhter down in the file, there is a check for fenv compatibilities,

if test "x${have_feenableexcept}" = "xyes"; then
  fpu_host='fpu-glibc'
  ieee_support='yes'
fi

but the name of the file seems too specific to glibc.  If fenv
facilities are available, I would have thought the file would
be named fpu-fenv.h.  My guess is that configure does not find
fenv on aarch64 FreeBSD and/or aarch64 FreeBSD does not support
fenv.

  parent reply	other threads:[~2021-05-19 15:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18 19:13 [Bug fortran/100662] New: " yuri at tsoft dot com
2021-05-18 22:24 ` [Bug fortran/100662] " kargl at gcc dot gnu.org
2021-05-18 22:27 ` yuri at tsoft dot com
2021-05-18 22:47 ` yuri at tsoft dot com
2021-05-19  0:23 ` sgk at troutmask dot apl.washington.edu
2021-05-19  0:56 ` yuri at tsoft dot com
2021-05-19  1:10 ` sgk at troutmask dot apl.washington.edu
2021-05-19  1:43 ` yuri at tsoft dot com
2021-05-19  2:26 ` sgk at troutmask dot apl.washington.edu
2021-05-19  9:45 ` ripero84 at gmail dot com
2021-05-19 15:19 ` sgk at troutmask dot apl.washington.edu [this message]
2021-05-25 19:34 ` ripero84 at gmail dot com
2021-08-12 19:12 ` gerald at pfeifer dot com
2021-08-12 20:04 ` andreast at gcc dot gnu.org
2021-08-12 20:56 ` kargl at gcc dot gnu.org
2021-08-29 20:31 ` andreast at gcc dot gnu.org
2022-05-16 14:20 ` pkubaj at anongoth dot pl
2022-09-10 13:47 ` vital.had at gmail dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-100662-4-QShNjdOaLj@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).