This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] S/390: Make enable-decimal-float the default
Hi,
> The list of targets is in three places (gcc/, libdecnumber/, libgcc/).
> They all need updating together. (You might want to create a shared
> configure macro, although it would need to deal with checking $host in
> libgcc and $target in the other directories.)
here is a revised version using a newly introduced macro called
GCC_DFP_TARGET_IFELSE.
Ok for mainline as soon as the branch opens again?
Bye,
-Andreas-
gcc/
2010-02-25 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* configure.ac: Use the GCC_DFP_TARGET_IFELSE macro.
* Makefile.in: Add aclocal.m4 dependency to dfp.m4.
* configure: Regenerated.
* aclocal.m4: Regenerated.
libgcc/
2010-02-25 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* configure.ac: Use the GCC_DFP_TARGET_IFELSE macro.
Include dfp.m4.
* configure: Regenerated.
libdecnumber/
2010-02-25 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* configure.ac: Use the GCC_DFP_TARGET_IFELSE macro.
* Makefile.in: Add aclocal.m4 dependency to dfp.m4.
* configure: Regenerated.
* aclocal.m4: Regenerated.
config/
2010-02-25 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* dfp.m4: New file.
Index: libgcc/configure
===================================================================
*** libgcc/configure.orig
--- libgcc/configure
*************** Valid choices are 'yes', 'bid', 'dpd', a
*** 3645,3657 ****
else
case $host in
! powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*)
! enable_decimal_float=yes
;;
*)
! enable_decimal_float=no
;;
esac
fi
--- 3645,3664 ----
else
case $host in
! powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux*)
! target_dfp=yes
;;
*)
! { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: decimal float is not supported for this target" >&5
! $as_echo "$as_me: WARNING: decimal float is not supported for this target" >&2;}
! target_dfp=no
;;
esac
+ if test $target_dfp = yes; then :
+ enable_decimal_float=yes
+ else
+ enable_decimal_float=no
+ fi
fi
Index: libgcc/configure.ac
===================================================================
*** libgcc/configure.ac.orig
--- libgcc/configure.ac
*************** sinclude(../config/tls.m4)
*** 5,10 ****
--- 5,11 ----
sinclude(../config/acx.m4)
sinclude(../config/no-executables.m4)
sinclude(../config/override.m4)
+ sinclude(../config/dfp.m4)
AC_PREREQ(2.64)
AC_INIT([GNU C Runtime Library], 1.0,,[libgcc])
*************** AC_ARG_ENABLE(decimal-float,
*** 137,152 ****
Valid choices are 'yes', 'bid', 'dpd', and 'no'.]) ;;
esac
],
! [
! case $host in
! powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*)
! enable_decimal_float=yes
! ;;
! *)
! enable_decimal_float=no
! ;;
! esac
! ])
# x86's use BID format instead of DPD
if test x$enable_decimal_float = xyes; then
--- 138,144 ----
Valid choices are 'yes', 'bid', 'dpd', and 'no'.]) ;;
esac
],
! [GCC_DFP_TARGET_IFELSE($host, enable_decimal_float=yes, enable_decimal_float=no)])
# x86's use BID format instead of DPD
if test x$enable_decimal_float = xyes; then
Index: libdecnumber/configure
===================================================================
*** libdecnumber/configure.orig
--- libdecnumber/configure
*************** Valid choices are 'yes', 'bid', 'dpd', a
*** 4604,4616 ****
else
case $target in
! powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*)
! enable_decimal_float=yes
;;
*)
! enable_decimal_float=no
;;
esac
fi
--- 4604,4623 ----
else
case $target in
! powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux*)
! target_dfp=yes
;;
*)
! { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: decimal float is not supported for this target" >&5
! $as_echo "$as_me: WARNING: decimal float is not supported for this target" >&2;}
! target_dfp=no
;;
esac
+ if test $target_dfp = yes; then :
+ enable_decimal_float=yes
+ else
+ enable_decimal_float=no
+ fi
fi
Index: libdecnumber/configure.ac
===================================================================
*** libdecnumber/configure.ac.orig
--- libdecnumber/configure.ac
*************** AC_ARG_ENABLE(decimal-float,
*** 87,102 ****
Valid choices are 'yes', 'bid', 'dpd', and 'no'.]) ;;
esac
],
! [
! case $target in
! powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*)
! enable_decimal_float=yes
! ;;
! *)
! enable_decimal_float=no
! ;;
! esac
! ])
# x86's use BID format instead of DPD
# In theory --enable-decimal-float=no should not compile anything
--- 87,93 ----
Valid choices are 'yes', 'bid', 'dpd', and 'no'.]) ;;
esac
],
! [GCC_DFP_TARGET_IFELSE($target, enable_decimal_float=yes, enable_decimal_float=no)])
# x86's use BID format instead of DPD
# In theory --enable-decimal-float=no should not compile anything
Index: gcc/configure
===================================================================
*** gcc/configure.orig
--- gcc/configure
*************** Valid choices are 'yes', 'bid', 'dpd', a
*** 6651,6665 ****
else
case $target in
! powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux*)
! enable_decimal_float=yes
;;
*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: decimal float is not supported for this target" >&5
$as_echo "$as_me: WARNING: decimal float is not supported for this target" >&2;}
! enable_decimal_float=no
;;
esac
fi
--- 6651,6670 ----
else
case $target in
! powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux*)
! target_dfp=yes
;;
*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: decimal float is not supported for this target" >&5
$as_echo "$as_me: WARNING: decimal float is not supported for this target" >&2;}
! target_dfp=no
;;
esac
+ if test $target_dfp = yes; then :
+ enable_decimal_float=yes
+ else
+ enable_decimal_float=no
+ fi
fi
*************** else
*** 17037,17043 ****
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
! #line 17040 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
--- 17042,17048 ----
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
! #line 17045 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
*************** else
*** 17143,17149 ****
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
! #line 17146 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
--- 17148,17154 ----
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
! #line 17151 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
Index: gcc/configure.ac
===================================================================
*** gcc/configure.ac.orig
--- gcc/configure.ac
*************** AC_ARG_ENABLE(decimal-float,
*** 618,634 ****
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
! ])
dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi`
AC_DEFINE_UNQUOTED(ENABLE_DECIMAL_FLOAT, $dfp,
--- 618,624 ----
Valid choices are 'yes', 'bid', 'dpd', and 'no'.]) ;;
esac
],
! [GCC_DFP_TARGET_IFELSE($target, enable_decimal_float=yes, enable_decimal_float=no)])
dfp=`if test $enable_decimal_float != no; then echo 1; else echo 0; fi`
AC_DEFINE_UNQUOTED(ENABLE_DECIMAL_FLOAT, $dfp,
Index: config/dfp.m4
===================================================================
*** /dev/null
--- config/dfp.m4
***************
*** 0 ****
--- 1,20 ----
+ dnl @synopsis GCC_DFP_TARGET_IFELSE([target triplet], [if-dfp], [if-not-dfp])
+ dnl
+ dnl Evaluate if-dfp or if-not-dfp depending on whether the target is a default
+ dnl dfp target.
+ dnl
+ dnl @author Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ AC_DEFUN([GCC_DFP_TARGET_IFELSE],
+ [
+ case $1 in
+ powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux*)
+ target_dfp=yes
+ ;;
+ *)
+ AC_MSG_WARN(decimal float is not supported for this target, ignored)
+ target_dfp=no
+ ;;
+ esac
+ AS_IF([test $target_dfp = yes], [$2], [$3])
+ ])
\ No newline at end of file
Index: gcc/Makefile.in
===================================================================
*** gcc/Makefile.in.orig
--- gcc/Makefile.in
*************** aclocal_deps = \
*** 1660,1665 ****
--- 1660,1666 ----
$(srcdir)/../config/stdint.m4 \
$(srcdir)/../config/unwind_ipinfo.m4 \
$(srcdir)/../config/warnings.m4 \
+ $(srcdir)/../config/dfp.m4 \
$(srcdir)/acinclude.m4
$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/aclocal.m4
Index: libdecnumber/Makefile.in
===================================================================
*** libdecnumber/Makefile.in.orig
--- libdecnumber/Makefile.in
*************** aclocal_deps = \
*** 98,103 ****
--- 98,104 ----
$(srcdir)/../config/stdint.m4 \
$(srcdir)/../config/warnings.m4 \
$(srcdir)/../config/override.m4 \
+ $(srcdir)/../config/dfp.m4 \
$(srcdir)/configure.ac
$(srcdir)/aclocal.m4: @MAINT@ $(aclocal_deps)
Index: gcc/aclocal.m4
===================================================================
*** gcc/aclocal.m4.orig
--- gcc/aclocal.m4
*************** m4_define([AC_PROG_CC],
*** 99,111 ****
[m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
])
- m4_include([../libtool.m4])
- m4_include([../ltoptions.m4])
- m4_include([../ltsugar.m4])
- m4_include([../ltversion.m4])
- m4_include([../lt~obsolete.m4])
m4_include([../config/acx.m4])
m4_include([../config/codeset.m4])
m4_include([../config/gettext-sister.m4])
m4_include([../config/iconv.m4])
m4_include([../config/lcmessage.m4])
--- 99,107 ----
[m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
])
m4_include([../config/acx.m4])
m4_include([../config/codeset.m4])
+ m4_include([../config/dfp.m4])
m4_include([../config/gettext-sister.m4])
m4_include([../config/iconv.m4])
m4_include([../config/lcmessage.m4])
*************** m4_include([../config/progtest.m4])
*** 117,120 ****
--- 113,121 ----
m4_include([../config/stdint.m4])
m4_include([../config/unwind_ipinfo.m4])
m4_include([../config/warnings.m4])
+ m4_include([../libtool.m4])
+ m4_include([../ltoptions.m4])
+ m4_include([../ltsugar.m4])
+ m4_include([../ltversion.m4])
+ m4_include([../lt~obsolete.m4])
m4_include([acinclude.m4])
Index: libdecnumber/aclocal.m4
===================================================================
*** libdecnumber/aclocal.m4.orig
--- libdecnumber/aclocal.m4
***************
*** 11,16 ****
--- 11,17 ----
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
+ m4_include([../config/dfp.m4])
m4_include([../config/override.m4])
m4_include([../config/stdint.m4])
m4_include([../config/warnings.m4])
Index: libgcc/Makefile.in
===================================================================
*** libgcc/Makefile.in.orig
--- libgcc/Makefile.in
*************** configure_deps = \
*** 147,152 ****
--- 147,153 ----
$(srcdir)/../config/acx.m4 \
$(srcdir)/../config/no-executables.m4 \
$(srcdir)/../config/override.m4 \
+ $(srcdir)/../config/dfp.m4 \
$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(configure_deps)
cd $(srcdir) && $(AUTOCONF)