public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] fortran: use fpu-glibc on powerpc*-unknown-freebsd
@ 2022-03-20 12:07 Piotr Kubaj
  2022-03-20 12:19 ` Segher Boessenkool
  0 siblings, 1 reply; 12+ messages in thread
From: Piotr Kubaj @ 2022-03-20 12:07 UTC (permalink / raw)
  To: David Edelsohn, Segher Boessenkool; +Cc: gcc-patches


[-- Attachment #1.1: Type: text/plain, Size: 176 bytes --]

fpu-glibc name is a bit incorrect, since it also works on other systems.
I have verified that it builds and can also build other packages
correctly (that were failing before).

[-- Attachment #1.2: 0001-fortran-on-powerpc-unknown-freebsd-also-use-fpu-glib.patch --]
[-- Type: text/x-diff, Size: 955 bytes --]

From 0feb83fae30070cf250781449670638d7addd947 Mon Sep 17 00:00:00 2001
From: Piotr Kubaj <pkubaj@FreeBSD.org>
Date: Sun, 20 Mar 2022 13:03:13 +0100
Subject: [PATCH] fortran: on powerpc*-unknown-freebsd*, also use fpu-glibc

It builds fine and correctly bulds packages on FreeBSD.
It looks like "fpu-glibc" name is a bit misleading since it also works
on FreeBSD.

Signed-off-by: Piotr Kubaj <pkubaj@FreeBSD.org>
---
 libgfortran/configure.host | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libgfortran/configure.host b/libgfortran/configure.host
index 3d6c2db7772..0f8bc7e0459 100644
--- a/libgfortran/configure.host
+++ b/libgfortran/configure.host
@@ -61,6 +61,14 @@ case "${host_cpu}" in
         ieee_support='yes'
         ;;
     esac
+  ;;
+  powerpc*)
+    case "${host_os}" in
+      freebsd*)
+        fpu_host='fpu-glibc'
+        ieee_support='yes'
+        ;;
+    esac
 
 esac
 
-- 
2.35.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: [PATCH] fortran: use fpu-glibc on powerpc*-unknown-freebsd
@ 2022-03-20 15:30 FX
  2022-04-13 14:56 ` Piotr Kubaj
  0 siblings, 1 reply; 12+ messages in thread
From: FX @ 2022-03-20 15:30 UTC (permalink / raw)
  To: gcc-patches, Fortran List; +Cc: pkubaj, segher

Hi,

(Please send all Fortran (front-end and libgfortran) patches in CC to the Fortran list.)

Please hold from pushing the patch as is, I have some questions:

- If FreeBSD has feenableexcept() and related functions, it should already use the fpu-glibc code, because of this:

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

So before the patch, what was configure.host returning, and what is the value of have_feenableexcept?

- Why restrict the patch to powerpc*? Don’t other FreeBSD targets have that function?
- How does the patch affect the results of “make check-gfortran”?


Thanks,
FX

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-04-30 19:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-20 12:07 [PATCH] fortran: use fpu-glibc on powerpc*-unknown-freebsd Piotr Kubaj
2022-03-20 12:19 ` Segher Boessenkool
2022-03-20 15:30 FX
2022-04-13 14:56 ` Piotr Kubaj
2022-04-13 15:27   ` FX
2022-04-14  0:49     ` Piotr Kubaj
2022-04-14  7:05       ` FX
2022-04-14 14:09         ` Piotr Kubaj
2022-04-28 17:09           ` Piotr Kubaj
2022-04-28 18:55             ` FX
2022-04-30 18:28               ` Piotr Kubaj
2022-04-30 19:17                 ` FX

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).