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

--- Comment #16 from Joel Sherrill <joel at gcc dot gnu.org> ---
Thanks for all the feedback. With this patch, it now builds. Is the style of
change to configure.host OK?

I need to check how far back this impacts. A user reported it with a released
gcc. Since we don't build fortran by default, this might have been broken a
while. 

diff --git a/gcc/config/i386/rtemself.h b/gcc/config/i386/rtemself.h
index 9516c45..e8eade2 100644
--- a/gcc/config/i386/rtemself.h
+++ b/gcc/config/i386/rtemself.h
@@ -28,6 +28,3 @@ along with GCC; see the file COPYING3.  If not see
        builtin_assert ("system=rtems");        \
     }                                          \
   while (0)
-
-#undef LONG_DOUBLE_TYPE_SIZE
-#define LONG_DOUBLE_TYPE_SIZE (TARGET_80387 ? 80 : 64)
diff --git a/libgfortran/configure.host b/libgfortran/configure.host
index 0a12a32..e594f31 100644
--- a/libgfortran/configure.host
+++ b/libgfortran/configure.host
@@ -37,11 +37,16 @@ if test "x${have_feenableexcept}" = "xyes"; then
 fi

 # x86 asm should be used instead of glibc, since glibc doesn't support
-# the x86 denormal exception.
+# the x86 denormal exception. But RTEMS uses newlib and this doesn't apply.
 case "${host_cpu}" in
   i?86 | x86_64)
-    fpu_host='fpu-387'
-    ieee_support='yes'
+    case "${host_os}" in
+      rtems*) ;;
+      *)
+        fpu_host='fpu-387'
+        ieee_support='yes'
+        ;;
+    esac
     ;;
 esac

Reply via email to