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.
  • [Bug fortran/100662] ... sgk at troutmask dot apl.washington.edu via Gcc-bugs

Reply via email to