From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6A52F3943402; Wed, 19 May 2021 15:19:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6A52F3943402 From: "sgk at troutmask dot apl.washington.edu" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 10.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sgk at troutmask dot apl.washington.edu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2021 15:19:27 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100662 --- Comment #10 from Steve Kargl = --- 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, wh= at > 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 the= y seem > to have been able to do so since the introduction of the three Fortran IE= EE > intrinsic modules in GCC 5 > (https://packages.ubuntu.com/bionic/amd64/gfortran-5/filelist and > https://packages.ubuntu.com/bionic/ppc64el/gfortran-5/filelist). Therefor= e, > some kind of solution must exist for this - and probably has been there f= or > over half a decade. (Apologies for not being able to provide a better ins= ight > from the Ubuntu sources.) ubuntu is glibc. You (or something) needs to read libgfortran/configure.ho= st, 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=3D'fpu-generic' ieee_support=3D'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}" =3D "xyes"; then fpu_host=3D'fpu-glibc' ieee_support=3D'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.=