aboutsummaryrefslogtreecommitdiff
path: root/gcc/configure.ac
diff options
context:
space:
mode:
authorMichael Meissner <michael.meissner@amd.com>2007-03-24 17:04:47 +0000
committerMichael Meissner <meissner@gcc.gnu.org>2007-03-24 17:04:47 +0000
commit79b87c74d764bd42703818289685e48996b54eb8 (patch)
treeec50c8ab7786788a6da7d4f06b0cd93e9555d487 /gcc/configure.ac
parentcca643862ddb1f61f200b567c667576d39961fb2 (diff)
downloadgcc-79b87c74d764bd42703818289685e48996b54eb8.zip
gcc-79b87c74d764bd42703818289685e48996b54eb8.tar.gz
gcc-79b87c74d764bd42703818289685e48996b54eb8.tar.bz2
Add BID decimal support
Co-Authored-By: H.J. Lu <hongjiu.lu@intel.com> Co-Authored-By: Marius Cornea <marius.cornea@intel.com> From-SVN: r123185
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r--gcc/configure.ac51
1 files changed, 41 insertions, 10 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac
index f3a6236..226b62a 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -667,27 +667,58 @@ AC_ARG_ENABLE(__cxa_atexit,
# Enable C extension for decimal float if target supports it.
AC_ARG_ENABLE(decimal-float,
-[ --enable-decimal-float enable decimal float extension to C],
+[ --enable-decimal-float={no,yes,bid,dpd}
+ enable decimal float extension to C. Selecting 'bid'
+ or 'dpd' choses which decimal floating point format
+ to use],
[
- if test x$enablevar = xyes ; then
- case $target in
- powerpc*-*-linux* | i?86*-*-linux*)
+ case $enable_decimal_float in
+ yes | no | bid | dpd) ;;
+ *) AC_MSG_ERROR(['$enable_decimal_float' is an invalid value for --enable-decimal-float.
+Valid choices are 'yes', 'bid', 'dpd', and 'no'.]) ;;
+ esac
+],
+[
+ case $target 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
- fi
-], [enable_decimal_float=no])
-
-AC_SUBST(enable_decimal_float)
+ esac
+])
-dfp=`if test $enable_decimal_float = yes; then echo 1; else echo 0; fi`
+dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi`
AC_DEFINE_UNQUOTED(ENABLE_DECIMAL_FLOAT, $dfp,
[Define to 1 to enable decimal float extension to C.])
+# 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)
+
+bid=`if test $enable_decimal_float = bid; then echo 1; else echo 0; fi`
+AC_DEFINE_UNQUOTED(ENABLE_DECIMAL_BID_FORMAT, $bid,
+[Define to 1 to specify that we are using the BID decimal floating
+point format instead of DPD])
+
# Enable threads
# Pass with no value to take the default
# Pass with a value to specify a thread package