------- Comment #9 from howarth at nitro dot med dot uc dot edu  2010-09-04 
02:09 -------
To make clearer the subtleties being lost in a single dfp.m4 file, here are the
diffs of the lines replaced out of configure.ac from each location (gcc, libgcc
and libdecnumber).

--- gcc 2010-09-03 22:04:53.000000000 -0400
+++ libgcc      2010-09-03 22:01:16.000000000 -0400
@@ -11,34 +11,26 @@
   esac
 ],
 [
-  case $target in
+  case $host in
     powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*)
       enable_decimal_float=yes
       ;;
     *)
-      AC_MSG_WARN(decimal float is not supported for this target, ignored)
       enable_decimal_float=no
       ;;
   esac
 ])
+
 # x86's use BID format instead of DPD
-case x$enable_decimal_float in
-  xyes)
-    case $target in
-      i?86*-*-linux* | x86_64*-*-linux*)
-        enable_decimal_float=bid
-        ;;
-      *)
-        enable_decimal_float=dpd
-        ;;
-    esac
-    ;;
-  xno)
-    # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper
-    # dependency on libdecnumber.
-    enable_decimal_float=dpd
-    ;;
-esac
+if test x$enable_decimal_float = xyes; then
+  case $host in
+    i?86*-*-linux* | x86_64*-*-linux*)
+      enable_decimal_float=bid
+      ;;
+    *)
+      enable_decimal_float=dpd
+      ;;
+  esac
+fi
 AC_SUBST(enable_decimal_float)

-

--- gcc 2010-09-03 22:04:53.000000000 -0400
+++ libdecnumber        2010-09-03 21:59:43.000000000 -0400
@@ -1,3 +1,6 @@
+# Default decimal format
+# If you change the defaults here, be sure to change them in the GCC directory
also
+AC_MSG_CHECKING([for decimal floating point])
 AC_ARG_ENABLE(decimal-float,
 [  --enable-decimal-float={no,yes,bid,dpd}
                         enable decimal float extension to C.  Selecting 'bid'
@@ -16,29 +19,22 @@
       enable_decimal_float=yes
       ;;
     *)
-      AC_MSG_WARN(decimal float is not supported for this target, ignored)
       enable_decimal_float=no
       ;;
   esac
 ])
-# x86's use BID format instead of DPD
-case x$enable_decimal_float in
-  xyes)
-    case $target in
-      i?86*-*-linux* | x86_64*-*-linux*)
-        enable_decimal_float=bid
-        ;;
-      *)
-        enable_decimal_float=dpd
-        ;;
-    esac
-    ;;
-  xno)
-    # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper
-    # dependency on libdecnumber.
-    enable_decimal_float=dpd
-    ;;
-esac
-AC_SUBST(enable_decimal_float)

+# x86's use BID format instead of DPD
+# In theory --enable-decimal-float=no should not compile anything
+# For the sake of simplicity, just use the default format in this directory
+if test x$enable_decimal_float = xyes -o x$enable_decimal_float = xno; then
+  case $target in
+    i?86*-*-linux* | x86_64*-*-linux*)
+      enable_decimal_float=bid
+      ;;
+    *)
+      enable_decimal_float=dpd
+      ;;
+  esac
+fi



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45524

Reply via email to