Patchwork CFT: [build] Move fp-bit support to toplevel libgcc

login
register
mail settings
Submitter Rainer Orth
Date Aug. 3, 2011, 1:46 p.m.
Message ID <yddwreumwun.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
Download mbox | patch
Permalink /patch/108198/
State New
Headers show

Comments

Rainer Orth - Aug. 3, 2011, 1:46 p.m.
Joseph,

> On Tue, 12 Jul 2011, Rainer Orth wrote:
>
>> Only a couple of special defines (like FLOAT_WORD_ORDER_MISMATCH,
>> QUIET_NAN_NEGATED) are moved to special t-* files in libgcc/config with
>> [FDT]PBIT_CFLAGS similar to e.g. LIBGCC_SYNC_CFLAGS.  If it were
>> possible to have gcc define some __LIBGCC_* macro corresponding to them,
>> that would allow for further simplification.  Only if this mechanism
>> couldn't handle the requirements have I resorted to introducing
>> libgcc_tm_file snippets to handle them.
>
> I *think*, based on how it's used, that FLOAT_WORD_ORDER_MISMATCH is 
> intended to describe cases where BYTES_BIG_ENDIAN and 
> FLOAT_WORDS_BIG_ENDIAN disagree.  (I say BYTES_BIG_ENDIAN not 
> WORDS_BIG_ENDIAN only on the basis that pdp11 doesn't use 
> FLOAT_WORD_ORDER_MISMATCH.)  That is, certain legacy ARM targets using FPA 
> floating-point format.  The information for QUIET_NAN_NEGATED is in the 
> qnan_msb_set field of struct real_format, I suppose.

I had a look at this option, but see two problems:

* qnan_msb_set is stored per-format, so we'd have to introduce something
  like __LIBGCC_SF_QUIET_NAN_NEGATED__, __LIBGCC_DF_QUIET_NAN_NEGATED__,
  ..., which seems ugly.

* Even worse, there are a couple of formats/targets that do use
  fp-bit.c, don't yet define QUIET_NAN_NEGATED, but have qnan_msb_set =
  false: 

						qnan_msb_set	uses fp-bit

      mips_single_format			false		x
      spu_single_format				false		x
      mips_double_format			false		x
      mips_extended_format			false		x
      mips_quad_format				false		x
      vax_f_format				false		00
      vax_d_format				false		00
      vax_g_format				false		00
      arm_half_format				false		?

  So such a change would mean a change of behavior for spu and arm
  targets.

Given those issues, I'd rather leave -DQUIET_NAN_NEGATED in
libgcc/config/mips/t-{fd, t}pbit, at least for now.

> How does your code replace the "#if __LDBL_MANT_DIG__ == 113" condition 
> that stops tp-bit.c being built for o32 multilibs that don't have TFmode?
>
> (The best way would I think be configure tests in libgcc that cause 
> tp-bit.c only to be built at all for the relevant multilibs for this 
> target.)

As discussed, this is the route I've chosen: I'm determining
double_type_size and long_double_type_size in libgcc/configure.ac,
substitute the result in libgcc/Makefile, and evaluate it in
libgcc/config/{mips/tpbit, rx/t-rx}.

Bootstrapped without regressions on x86_64-unknown-linux-gnu.
Bootstraps on i386-pc-solaris2.10, sparc-sun-solaris2.11,
alpha-dec-osf5.1b, mips-sgi-irix6.5, and i386-apple-darwin9.8.0 still
running.

Ok for mainline if they pass?

Thanks.
        Rainer
Joseph S. Myers - Aug. 3, 2011, 2:33 p.m.
On Wed, 3 Aug 2011, Rainer Orth wrote:

> * Even worse, there are a couple of formats/targets that do use
>   fp-bit.c, don't yet define QUIET_NAN_NEGATED, but have qnan_msb_set =
>   false: 
> 
> 						qnan_msb_set	uses fp-bit
> 
>       mips_single_format			false		x
>       spu_single_format				false		x
>       mips_double_format			false		x
>       mips_extended_format			false		x
>       mips_quad_format				false		x
>       vax_f_format				false		00
>       vax_d_format				false		00
>       vax_g_format				false		00
>       arm_half_format				false		?
> 
>   So such a change would mean a change of behavior for spu and arm
>   targets.

The SPU format doesn't support NaNs, so the value of this field isn't 
particularly meaningful for SPU.  I'm not clear why SPU is actually using 
fp-bit; what functions from fp-bit will actually end up getting used by 
code built for SPU, and how close does fp-bit get to the required 
semantics?

arm_half_format is another no-NaN format, and fp-bit does not provide any 
operations for it (it's a storage format only, not an arithmetic format, 
and conversions are provided by config/arm/fp16.c).  So there should be no 
behavior change for ARM at all (only the definitions for the modes used by 
fp-bit are relevant, and HFmode isn't one of those).

But, yes, any change to avoid defining QUIET_NAN_NEGATED specially would 
best be kept separate.
Paolo Bonzini - Aug. 5, 2011, 6:39 a.m.
On 08/03/2011 03:46 PM, Rainer Orth wrote:
>
> Ok for mainline if they pass?

I think the avr-lib.h and h8300-lib.h files should be modified to only 
define the constants when compiling fp-bit, because they pollute the 
namespace.

Both avr and h8300 only use floats, so you can wrap them in #ifdef 
FLOAT.  Another possibility is to add another -D option, like IN_FPBIT, 
to the Makefile and wrap the headers with that one.

Otherwise ok.

Paolo
Rainer Orth - Aug. 5, 2011, 9:40 a.m.
Paolo Bonzini <bonzini@gnu.org> writes:

> On 08/03/2011 03:46 PM, Rainer Orth wrote:
>>
>> Ok for mainline if they pass?
>
> I think the avr-lib.h and h8300-lib.h files should be modified to only
> define the constants when compiling fp-bit, because they pollute the
> namespace.
>
> Both avr and h8300 only use floats, so you can wrap them in #ifdef FLOAT.

I'll do it this way.

> Another possibility is to add another -D option, like IN_FPBIT, to the
> Makefile and wrap the headers with that one.

Since there are only two instances currently, I think we should go for a
more general solution only when we need it.

> Otherwise ok.

Given that the patch is based on the unwinder one, could you have a look
at that, too?  While I could rebase this one and the soft-fp one if need
be, I'd like to avoid it if possible.

Thanks.
        Rainer

Patch

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1526,21 +1526,6 @@  MOSTLYCLEANFILES = insn-flags.h insn-con
 # Defined in libgcc2.c, included only in the static library.
 LIB2FUNCS_ST = _eprintf __gcc_bcmp
 
-FPBIT_FUNCS = _pack_sf _unpack_sf _addsub_sf _mul_sf _div_sf \
-    _fpcmp_parts_sf _compare_sf _eq_sf _ne_sf _gt_sf _ge_sf \
-    _lt_sf _le_sf _unord_sf _si_to_sf _sf_to_si _negate_sf _make_sf \
-    _sf_to_df _sf_to_tf _thenan_sf _sf_to_usi _usi_to_sf
-
-DPBIT_FUNCS = _pack_df _unpack_df _addsub_df _mul_df _div_df \
-    _fpcmp_parts_df _compare_df _eq_df _ne_df _gt_df _ge_df \
-    _lt_df _le_df _unord_df _si_to_df _df_to_si _negate_df _make_df \
-    _df_to_sf _df_to_tf _thenan_df _df_to_usi _usi_to_df
-
-TPBIT_FUNCS = _pack_tf _unpack_tf _addsub_tf _mul_tf _div_tf \
-    _fpcmp_parts_tf _compare_tf _eq_tf _ne_tf _gt_tf _ge_tf \
-    _lt_tf _le_tf _unord_tf _si_to_tf _tf_to_si _negate_tf _make_tf \
-    _tf_to_df _tf_to_sf _thenan_tf _tf_to_usi _usi_to_tf
-
 # These might cause a divide overflow trap and so are compiled with
 # unwinder info.
 LIB2_DIVMOD_FUNCS = _divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4
@@ -1879,8 +1864,7 @@  srcdirify = $(patsubst $$(libgcc_objdir)
 GCC_EXTRA_PARTS := $(sort $(EXTRA_MULTILIB_PARTS) $(EXTRA_PARTS))
 
 libgcc-support: libgcc.mvars stmp-int-hdrs $(TCONFIG_H) \
-	$(MACHMODE_H) $(FPBIT) $(DPBIT) $(TPBIT) $(LIB2ADD) \
-	$(LIB2ADD_ST) gcov-iov.h $(SFP_MACHINE)
+	$(MACHMODE_H) $(LIB2ADD) $(LIB2ADD_ST) gcov-iov.h $(SFP_MACHINE)
 
 libgcc.mvars: config.status Makefile $(LIB2ADD) $(LIB2ADD_ST) specs \
 		xgcc$(exeext)
@@ -1892,13 +1876,7 @@  libgcc.mvars: config.status Makefile $(L
 	echo LIB2ADD = '$(call srcdirify,$(LIB2ADD))' >> tmp-libgcc.mvars
 	echo LIB2ADD_ST = '$(call srcdirify,$(LIB2ADD_ST))' >> tmp-libgcc.mvars
 	echo LIB2_SIDITI_CONV_FUNCS = '$(LIB2_SIDITI_CONV_FUNCS)' >> tmp-libgcc.mvars
-	echo FPBIT = '$(FPBIT)' >> tmp-libgcc.mvars
-	echo FPBIT_FUNCS = '$(FPBIT_FUNCS)' >> tmp-libgcc.mvars
 	echo LIB2_DIVMOD_FUNCS = '$(LIB2_DIVMOD_FUNCS)' >> tmp-libgcc.mvars
-	echo DPBIT = '$(DPBIT)' >> tmp-libgcc.mvars
-	echo DPBIT_FUNCS = '$(DPBIT_FUNCS)' >> tmp-libgcc.mvars
-	echo TPBIT = '$(TPBIT)' >> tmp-libgcc.mvars
-	echo TPBIT_FUNCS = '$(TPBIT_FUNCS)' >> tmp-libgcc.mvars
 	echo GCC_EXTRA_PARTS = '$(GCC_EXTRA_PARTS)' >> tmp-libgcc.mvars
 	echo SHLIB_LINK = '$(subst $(GCC_FOR_TARGET),$$(GCC_FOR_TARGET),$(SHLIB_LINK))' >> tmp-libgcc.mvars
 	echo SHLIB_INSTALL = '$(SHLIB_INSTALL)' >> tmp-libgcc.mvars
diff --git a/gcc/config.gcc b/gcc/config.gcc
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -937,12 +937,14 @@  arm*-wince-pe*)
 	;;
 avr-*-rtems*)
 	tm_file="elfos.h avr/elf.h avr/avr.h dbxelf.h avr/rtems.h rtems.h newlib-stdint.h"
+	libgcc_tm_file="$libgcc_tm_file avr/avr-lib.h"
 	tmake_file="avr/t-avr t-rtems avr/t-rtems"
 	extra_gcc_objs="driver-avr.o avr-devices.o"
 	extra_objs="avr-devices.o"
 	;;
 avr-*-*)
 	tm_file="elfos.h avr/elf.h avr/avr.h dbxelf.h newlib-stdint.h"
+	libgcc_tm_file="$libgcc_tm_file avr/avr-lib.h"
 	use_gcc_stdint=wrap
 	extra_gcc_objs="driver-avr.o avr-devices.o"
 	extra_objs="avr-devices.o"
@@ -1039,10 +1041,12 @@  moxie-*-rtems*)
 h8300-*-rtems*)
 	tmake_file="h8300/t-h8300 h8300/t-elf t-rtems h8300/t-rtems"
 	tm_file="h8300/h8300.h dbxelf.h elfos.h h8300/elf.h h8300/rtems.h rtems.h newlib-stdint.h"
+	libgcc_tm_file="$libgcc_tm_file h8300/h8300-lib.h"
 	;;
 h8300-*-elf*)
 	tmake_file="h8300/t-h8300 h8300/t-elf"
 	tm_file="h8300/h8300.h dbxelf.h elfos.h newlib-stdint.h h8300/elf.h"
+	libgcc_tm_file="$libgcc_tm_file h8300/h8300-lib.h"
 	;;
 hppa*64*-*-linux*)
 	target_cpu_default="MASK_PA_11|MASK_PA_20"
@@ -2017,7 +2021,7 @@  picochip-*)
         ;;
 # port not yet contributed
 #powerpc-*-openbsd*)
-#	tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-fprules-fpbit "
+#	tmake_file="${tmake_file} rs6000/t-fprules"
 #	extra_headers=
 #	;;
 powerpc-*-darwin*)
@@ -2063,42 +2067,42 @@  powerpc-*-eabispe*)
 powerpc-*-eabisimaltivec*)
 	tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabisim.h rs6000/eabialtivec.h"
 	extra_options="${extra_options} rs6000/sysv4.opt"
-	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcendian rs6000/t-ppccomm"
+	tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
 	use_gcc_stdint=wrap
 	;;
 powerpc-*-eabisim*)
 	tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabisim.h"
 	extra_options="${extra_options} rs6000/sysv4.opt"
-	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
+	tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
 	use_gcc_stdint=wrap
 	;;
 powerpc-*-elf*)
 	tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h"
 	extra_options="${extra_options} rs6000/sysv4.opt"
-	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
+	tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
 	;;
 powerpc-*-eabialtivec*)
 	tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabialtivec.h"
 	extra_options="${extra_options} rs6000/sysv4.opt"
-	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcendian rs6000/t-ppccomm"
+	tmake_file="rs6000/t-fprules rs6000/t-ppcendian rs6000/t-ppccomm"
 	use_gcc_stdint=wrap
 	;;
 powerpc-xilinx-eabi*)
 	tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/singlefp.h rs6000/xfpu.h rs6000/xilinx.h"
 	extra_options="${extra_options} rs6000/sysv4.opt rs6000/xilinx.opt"
-	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm rs6000/t-xilinx"
+	tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm rs6000/t-xilinx"
 	use_gcc_stdint=wrap
 	;;
 powerpc-*-eabi*)
 	tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h"
 	extra_options="${extra_options} rs6000/sysv4.opt"
-	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
+	tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
 	use_gcc_stdint=wrap
 	;;
 powerpc-*-rtems*)
 	tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/rtems.h rtems.h"
 	extra_options="${extra_options} rs6000/sysv4.opt"
-	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-rtems t-rtems rs6000/t-ppccomm"
+	tmake_file="rs6000/t-fprules rs6000/t-rtems t-rtems rs6000/t-ppccomm"
 	;;
 powerpc-*-linux* | powerpc64-*-linux*)
 	tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h"
@@ -2146,7 +2150,7 @@  powerpc-*-linux* | powerpc64-*-linux*)
 	;;
 powerpc-wrs-vxworks|powerpc-wrs-vxworksae)
 	tm_file="${tm_file} elfos.h freebsd-spec.h rs6000/sysv4.h"
-	tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppccomm rs6000/t-vxworks"
+	tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm rs6000/t-vxworks"
 	extra_options="${extra_options} rs6000/sysv4.opt"
 	extra_headers=ppc-asm.h
 	case ${target} in
@@ -2171,18 +2175,18 @@  powerpc-*-lynxos*)
 	;;
 powerpcle-*-elf*)
 	tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h"
-	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
+	tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
 	extra_options="${extra_options} rs6000/sysv4.opt"
 	;;
 powerpcle-*-eabisim*)
 	tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/e500.h rs6000/eabisim.h"
-	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
+	tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
 	extra_options="${extra_options} rs6000/sysv4.opt"
 	use_gcc_stdint=wrap
 	;;
 powerpcle-*-eabi*)
 	tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/sysv4le.h rs6000/eabi.h rs6000/e500.h"
-	tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
+	tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
 	extra_options="${extra_options} rs6000/sysv4.opt"
 	use_gcc_stdint=wrap
 	;;
@@ -2233,7 +2237,7 @@  rs6000-ibm-aix[6789].* | powerpc-ibm-aix
 	;;
 rx-*-elf*)
 	tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
-	libgcc_tm_file="${libgcc_tm_file} rx/rx-abi.h"
+	libgcc_tm_file="${libgcc_tm_file} rx/rx-abi.h rx/rx-lib.h"
 	tmake_file="${tmake_file} rx/t-rx"
 	;;
 s390-*-linux*)
@@ -2643,7 +2647,6 @@  xtensa*-*-linux*)
 	;;
 am33_2.0-*-linux*)
 	tm_file="mn10300/mn10300.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h mn10300/linux.h"
-	tmake_file="${tmake_file} mn10300/t-linux"
 	gas=yes gnu_ld=yes
 	extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
 	use_collect2=no
diff --git a/gcc/config/arm/t-strongarm-elf b/gcc/config/arm/t-strongarm-elf
--- a/gcc/config/arm/t-strongarm-elf
+++ b/gcc/config/arm/t-strongarm-elf
@@ -19,25 +19,6 @@ 
 
 LIB1ASMFUNCS += _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _bb_init_func _clzsi2 _clzdi2
 
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	echo '#ifndef __ARMEB__' >> fp-bit.c
-	echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c
-	echo '#endif' >> fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#ifndef __ARMEB__' > dp-bit.c
-	echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c
-	echo '#define FLOAT_WORD_ORDER_MISMATCH' >> dp-bit.c
-	echo '#endif' >> dp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> dp-bit.c
-
 MULTILIB_OPTIONS     = mlittle-endian/mbig-endian mfloat-abi=hard/mfloat-abi=soft
 MULTILIB_DIRNAMES    = le be fpu soft
 MULTILIB_EXCEPTIONS  =
diff --git a/gcc/config/arm/t-vxworks b/gcc/config/arm/t-vxworks
--- a/gcc/config/arm/t-vxworks
+++ b/gcc/config/arm/t-vxworks
@@ -1,4 +1,4 @@ 
-# Copyright (C) 2003, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2007, 2008, 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -18,24 +18,6 @@ 
 
 LIB1ASMFUNCS += _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _bb_init_func _call_via_rX _interwork_call_via_rX _clzsi2 _clzdi2
 
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	echo '#ifndef __ARMEB__' >> fp-bit.c
-	echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c
-	echo '#endif' >> fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#ifndef __ARMEB__' > dp-bit.c
-	echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c
-	echo '#endif' >> dp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> dp-bit.c
-
 MULTILIB_OPTIONS = \
   mrtp fPIC \
   t4/t4be/t4t/t4tbe/t5/t5be/t5t/t5tbe/tstrongarm/txscale/txscalebe
diff --git a/gcc/config/arm/t-wince-pe b/gcc/config/arm/t-wince-pe
--- a/gcc/config/arm/t-wince-pe
+++ b/gcc/config/arm/t-wince-pe
@@ -19,25 +19,6 @@ 
 
 LIB1ASMFUNCS += _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _call_via_rX _interwork_call_via_rX _clzsi2 _clzdi2
 
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	echo '#ifndef __ARMEB__' >> fp-bit.c
-	echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c
-	echo '#endif' >> fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#ifndef __ARMEB__' > dp-bit.c
-	echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c
-	echo '#define FLOAT_WORD_ORDER_MISMATCH' >> dp-bit.c
-	echo '#endif' >> dp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> dp-bit.c
-
 pe.o: $(srcdir)/config/arm/pe.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
   $(RTL_H) output.h flags.h $(TREE_H) expr.h $(TM_P_H)
 	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
diff --git a/gcc/config/avr/t-avr b/gcc/config/avr/t-avr
--- a/gcc/config/avr/t-avr
+++ b/gcc/config/avr/t-avr
@@ -91,19 +91,6 @@  LIB2FUNCS_EXCLUDE = \
 # so use -mcall-prologues for smaller code size.
 TARGET_LIBGCC2_CFLAGS = -DDF=SF -Dinhibit_libc -mcall-prologues -Os
 
-fp-bit.c: $(srcdir)/config/fp-bit.c $(srcdir)/config/avr/t-avr
-	echo '#define FLOAT' > fp-bit.c
-	echo '#define FLOAT_ONLY' >> fp-bit.c
-	echo '#define CMPtype QItype' >> fp-bit.c
-	echo '#define DF SF' >> fp-bit.c
-	echo '#define DI SI' >> fp-bit.c
-	echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c
-	echo '#define SMALL_MACHINE' >> fp-bit.c
-	echo 'typedef int QItype __attribute__ ((mode (QI)));' >> fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
-FPBIT = fp-bit.c
-
 MULTILIB_OPTIONS = mmcu=avr2/mmcu=avr25/mmcu=avr3/mmcu=avr31/mmcu=avr35/mmcu=avr4/mmcu=avr5/mmcu=avr51/mmcu=avr6
 MULTILIB_DIRNAMES = avr2 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6
 
diff --git a/gcc/config/bfin/t-bfin b/gcc/config/bfin/t-bfin
--- a/gcc/config/bfin/t-bfin
+++ b/gcc/config/bfin/t-bfin
@@ -1,4 +1,4 @@ 
-# Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2007, 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -24,16 +24,6 @@  LIB1ASMFUNCS += _smulsi3_highpart
 
 EXTRA_PARTS = crtbegin.o crtend.o crti.o crtn.o
 
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
 # Assemble startup files.
 $(T)crti.o: $(srcdir)/config/bfin/crti.s $(GCC_PASSES)
 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
diff --git a/gcc/config/bfin/t-bfin-elf b/gcc/config/bfin/t-bfin-elf
--- a/gcc/config/bfin/t-bfin-elf
+++ b/gcc/config/bfin/t-bfin-elf
@@ -1,4 +1,4 @@ 
-# Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2007, 2008, 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -22,16 +22,6 @@  LIB1ASMSRC = bfin/lib1funcs.asm
 LIB1ASMFUNCS = _divsi3 _udivsi3 _umodsi3 _modsi3 _muldi3 _umulsi3_highpart
 LIB1ASMFUNCS += _smulsi3_highpart
 
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
 CRTSTUFF_T_CFLAGS = -fpic
 TARGET_LIBGCC2_CFLAGS = -fpic
 
diff --git a/gcc/config/bfin/t-bfin-linux b/gcc/config/bfin/t-bfin-linux
--- a/gcc/config/bfin/t-bfin-linux
+++ b/gcc/config/bfin/t-bfin-linux
@@ -1,4 +1,4 @@ 
-# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008, 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -22,16 +22,6 @@  LIB1ASMSRC = bfin/lib1funcs.asm
 LIB1ASMFUNCS = _divsi3 _udivsi3 _umodsi3 _modsi3 _muldi3 _umulsi3_highpart
 LIB1ASMFUNCS += _smulsi3_highpart
 
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
 CRTSTUFF_T_CFLAGS = -fpic
 TARGET_LIBGCC2_CFLAGS = -fpic
 
diff --git a/gcc/config/bfin/t-bfin-uclinux b/gcc/config/bfin/t-bfin-uclinux
--- a/gcc/config/bfin/t-bfin-uclinux
+++ b/gcc/config/bfin/t-bfin-uclinux
@@ -1,4 +1,4 @@ 
-# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008, 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -22,16 +22,6 @@  LIB1ASMSRC = bfin/lib1funcs.asm
 LIB1ASMFUNCS = _divsi3 _udivsi3 _umodsi3 _modsi3 _muldi3 _umulsi3_highpart
 LIB1ASMFUNCS += _smulsi3_highpart
 
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
 CRTSTUFF_T_CFLAGS = -fpic
 TARGET_LIBGCC2_CFLAGS = -fpic
 
diff --git a/gcc/config/cris/t-cris b/gcc/config/cris/t-cris
--- a/gcc/config/cris/t-cris
+++ b/gcc/config/cris/t-cris
@@ -3,7 +3,7 @@ 
 #
 # The Makefile fragment to include when compiling gcc et al for CRIS.
 #
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -28,23 +28,6 @@ 
 LIB2FUNCS_EXTRA = _udivsi3.c _divsi3.c _umodsi3.c _modsi3.c
 CRIS_LIB1CSRC = $(srcdir)/config/cris/arit.c
 
-FPBIT = tmplibgcc_fp_bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT_BIT_ORDER_MISMATCH' > dp-bit.c
-	cat $(srcdir)/config/fp-bit.c           >> dp-bit.c
-
-# Use another name to avoid confusing SUN make, if support for
-# it is reinstated elsewhere.  Prefixed with "tmplibgcc" means
-# "make clean" will wipe it.  We define a few L_ thingies
-# because we can't select them individually through FPBIT_FUNCS;
-# see above.
-tmplibgcc_fp_bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT_BIT_ORDER_MISMATCH' >  $@
-	echo '#define FLOAT'			>> $@
-	cat $(srcdir)/config/fp-bit.c		>> $@
-
 # The fixed-point arithmetic code is in one file, arit.c,
 # similar to libgcc2.c (or the old libgcc1.c).  We need to
 # "split it up" with one file per define.
diff --git a/gcc/config/fr30/t-fr30 b/gcc/config/fr30/t-fr30
--- a/gcc/config/fr30/t-fr30
+++ b/gcc/config/fr30/t-fr30
@@ -1,4 +1,4 @@ 
-# Copyright (C) 1999, 2001, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2007, 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -26,22 +26,10 @@  LIB1ASMFUNCS  = _udivsi3 _divsi3 _umodsi
 $(T)crtn.o: $(srcdir)/config/fr30/crtn.asm $(GCC_PASSES)
 	$(GCC_FOR_TARGET) -c -o $(T)crtn.o -x assembler $(srcdir)/config/fr30/crtn.asm
 
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
 # If any special flags are necessary when building libgcc2 put them here.
 #
 # TARGET_LIBGCC2_CFLAGS
 
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
 # Enable the following if multilibs are needed.
 # See gcc/genmultilib, gcc/gcc.texi and gcc/tm.texi for a
 # description of the options and their values.
diff --git a/gcc/config/frv/t-frv b/gcc/config/frv/t-frv
--- a/gcc/config/frv/t-frv
+++ b/gcc/config/frv/t-frv
@@ -27,23 +27,9 @@  LIB1ASMSRC	= frv/lib1funcs.asm
 LIB1ASMFUNCS	= _cmpll _cmpf _cmpd _addll _subll _andll _orll _xorll _notll _cmov
 LIB2FUNCS_EXTRA	= cmovh.c cmovw.c cmovd.c modi.c umodi.c uitof.c uitod.c ulltof.c ulltod.c
 
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
 # If any special flags are necessary when building libgcc2 put them here.
 TARGET_LIBGCC2_CFLAGS =
 
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	echo '#include "config/frv/frv-abi.h"' >> fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#include "config/frv/frv-abi.h"' > dp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> dp-bit.c
-
 cmovh.c: $(srcdir)/config/frv/cmovh.c
 	$(LN_S) $(srcdir)/config/frv/cmovh.c .
 
diff --git a/gcc/config/h8300/t-h8300 b/gcc/config/h8300/t-h8300
--- a/gcc/config/h8300/t-h8300
+++ b/gcc/config/h8300/t-h8300
@@ -1,5 +1,5 @@ 
 # Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003,
-# 2004 Free Software Foundation, Inc.
+# 2004, 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -31,21 +31,6 @@  LIB2FUNCS_EXTRA = \
 # We do not have DF type, so fake out the libgcc2 compilation.
 TARGET_LIBGCC2_CFLAGS = -DDF=SF
 
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	echo '#define FLOAT_ONLY' >> fp-bit.c
-	echo '#define SMALL_MACHINE' >> fp-bit.c
-	echo '#ifdef __H8300__' >> fp-bit.c
-	echo '#define CMPtype HItype' >> fp-bit.c
-	echo '#else' >> fp-bit.c
-	echo '#define CMPtype SItype' >> fp-bit.c
-	echo '#endif' >> fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
 MULTILIB_OPTIONS = mh/ms/msx mn mint32
 MULTILIB_DIRNAMES = h8300h h8300s h8sx normal int32
 MULTILIB_EXCEPTIONS = mint32 mn mn/mint32
diff --git a/gcc/config/iq2000/t-iq2000 b/gcc/config/iq2000/t-iq2000
--- a/gcc/config/iq2000/t-iq2000
+++ b/gcc/config/iq2000/t-iq2000
@@ -1,4 +1,4 @@ 
-# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010, 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -23,18 +23,6 @@  CROSS_LIBGCC1 =
 
 LIB2FUNCS_EXTRA = $(srcdir)/config/udivmod.c $(srcdir)/config/divmod.c $(srcdir)/config/udivmodsi4.c $(srcdir)/config/iq2000/lib2extra-funcs.c
 
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT'				> fp-bit.c
-	cat $(srcdir)/config/fp-bit.c			>> fp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
 # Enable the following if multilibs are needed.
 # See gcc/genmultilib, gcc/gcc.texi and gcc/tm.texi for a
 # description of the options and their values.
diff --git a/gcc/config/m32c/t-m32c b/gcc/config/m32c/t-m32c
--- a/gcc/config/m32c/t-m32c
+++ b/gcc/config/m32c/t-m32c
@@ -1,5 +1,5 @@ 
 # Target Makefile Fragment for R8C/M16C/M32C
-# Copyright (C) 2005, 2006, 2007, 2008, 2009
+# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2011
 # Free Software Foundation, Inc.
 # Contributed by Red Hat.
 #
@@ -31,18 +31,6 @@  LIB1ASMFUNCS = \
 
 LIB2FUNCS_EXTRA = $(srcdir)/config/m32c/m32c-lib2.c $(srcdir)/config/m32c/m32c-lib2-trapv.c
 
-# floating point emulation libraries
-
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT'				> fp-bit.c
-	cat $(srcdir)/config/fp-bit.c			>> fp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
 # target-specific files
 
 md_file = md
diff --git a/gcc/config/m32r/t-linux b/gcc/config/m32r/t-linux
--- a/gcc/config/m32r/t-linux
+++ b/gcc/config/m32r/t-linux
@@ -1,4 +1,4 @@ 
-# Copyright (C) 2003, 2004, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2009, 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -19,23 +19,11 @@ 
 # lib1funcs.asm is currently empty.
 CROSS_LIBGCC1 =
 
-# These are really part of libgcc1, but this will cause them to be
-# built correctly, so...
-
-LIB2FUNCS_EXTRA = fp-bit.c dp-bit.c
-
 # Turn off the SDA while compiling libgcc2.  There are no headers for it
 # and we want maximal upward compatibility here.
 
 TARGET_LIBGCC2_CFLAGS = -G 0 -fPIC
 
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
 # We need to use -fpic when we are using gcc to compile the routines in
 # initfini.c.  This is only really needed when we are going to use gcc/g++
 # to produce a shared library, but since we don't know ahead of time when
diff --git a/gcc/config/m32r/t-m32r b/gcc/config/m32r/t-m32r
--- a/gcc/config/m32r/t-m32r
+++ b/gcc/config/m32r/t-m32r
@@ -1,4 +1,5 @@ 
-# Copyright (C) 1997, 1998, 1999, 2001, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998, 1999, 2001, 2003, 2011
+# Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -16,23 +17,11 @@ 
 # along with GCC; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
 
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
 # Turn off the SDA while compiling libgcc2.  There are no headers for it
 # and we want maximal upward compatibility here.
 
 TARGET_LIBGCC2_CFLAGS = -G 0
 
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
 # We need to use -fpic when we are using gcc to compile the routines in
 # initfini.c.  This is only really needed when we are going to use gcc/g++
 # to produce a shared library, but since we don't know ahead of time when
diff --git a/gcc/config/mcore/t-mcore b/gcc/config/mcore/t-mcore
--- a/gcc/config/mcore/t-mcore
+++ b/gcc/config/mcore/t-mcore
@@ -1,4 +1,4 @@ 
-# Copyright (C) 2000, 2001, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2008, 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -28,22 +28,6 @@  LIB1ASMFUNCS  = _divsi3 _udivsi3 _modsi3
 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
 	-c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/mcore/crtn.asm
 
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c $(srcdir)/config/mcore/t-mcore
-	rm -f dp-bit.c
-	echo '' > dp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c $(srcdir)/config/mcore/t-mcore
-	rm -f fp-bit.c
-	echo '' > fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
 # could use -msifilter to be safe from interrupt/jmp interactions and others.
 TARGET_LIBGCC2_CFLAGS=-O3 -DNO_FLOATLIB_FIXUNSDFSI #-msifilter
 
diff --git a/gcc/config/mep/t-mep b/gcc/config/mep/t-mep
--- a/gcc/config/mep/t-mep
+++ b/gcc/config/mep/t-mep
@@ -1,6 +1,6 @@ 
 # -*- makefile -*-
 # GCC makefile fragment for MeP
-# Copyright (C) 2001, 2002, 2003, 2005, 2007, 2009, 2010
+# Copyright (C) 2001, 2002, 2003, 2005, 2007, 2009, 2010, 2011
 # Free Software Foundation, Inc.
 # Contributed by Red Hat Inc
 #
@@ -54,18 +54,6 @@  LIB2FUNCS_EXTRA = \
 	$(srcdir)/config/mep/mep-lib2.c \
 	$(srcdir)/config/mep/mep-tramp.c
 
-# floating point emulation libraries
-
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT'				> fp-bit.c
-	cat $(srcdir)/config/fp-bit.c			>> fp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
 MULTILIB_OPTIONS = mel mall-opts mfar
 MULTILIB_DIRNAMES = el allopt far
 
diff --git a/gcc/config/microblaze/t-microblaze b/gcc/config/microblaze/t-microblaze
--- a/gcc/config/microblaze/t-microblaze
+++ b/gcc/config/microblaze/t-microblaze
@@ -14,17 +14,6 @@  microblaze-c.o: $(srcdir)/config/microbl
 	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
 	$(srcdir)/config/microblaze/microblaze-c.c
 
-# Build soft FP routines. 
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
 # Assemble startup files
 $(T)crti$(objext): $(srcdir)/config/microblaze/crti.s
 	$(GCC_FOR_TARGET) -c $(srcdir)/config/microblaze/crti.s -o $(T)crti$(objext)
diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64
--- a/gcc/config/mips/t-linux64
+++ b/gcc/config/mips/t-linux64
@@ -1,4 +1,4 @@ 
-# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -25,15 +25,3 @@  endif
 MULTILIB_OSDIRNAMES = ../lib32 ../lib ../lib64
 
 EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
-
-TPBIT = tp-bit.c
-
-tp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#ifdef __MIPSEL__' > tp-bit.c
-	echo '# define FLOAT_BIT_ORDER_MISMATCH' >> tp-bit.c
-	echo '#endif' >> tp-bit.c
-	echo '#if __LDBL_MANT_DIG__ == 113' >> tp-bit.c
-	echo '#define QUIET_NAN_NEGATED' >> tp-bit.c
-	echo '# define TFLOAT' >> tp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> tp-bit.c
-	echo '#endif' >> tp-bit.c
diff --git a/gcc/config/mips/t-mips b/gcc/config/mips/t-mips
--- a/gcc/config/mips/t-mips
+++ b/gcc/config/mips/t-mips
@@ -16,28 +16,6 @@ 
 # along with GCC; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
 
-# fp-bit and dp-bit are really part of libgcc1, but this will cause
-# them to be built correctly, so... [taken from t-sparclite]
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#ifdef __MIPSEL__' > dp-bit.c
-	echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c
-	echo '#endif' >> dp-bit.c
-	echo '#define QUIET_NAN_NEGATED' >> dp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	echo '#ifdef __MIPSEL__' >> fp-bit.c
-	echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c
-	echo '#endif' >> fp-bit.c
-	echo '#define QUIET_NAN_NEGATED' >> fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
 LIB2_SIDITI_CONV_FUNCS=yes
 
 $(srcdir)/config/mips/mips-tables.opt: $(srcdir)/config/mips/genopt.sh \
diff --git a/gcc/config/mips/t-sdemtk b/gcc/config/mips/t-sdemtk
--- a/gcc/config/mips/t-sdemtk
+++ b/gcc/config/mips/t-sdemtk
@@ -1,4 +1,4 @@ 
-# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008, 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -38,7 +38,3 @@  stmp-sdefixinc: gsyslimits.h
 	cp $(srcdir)/gsyslimits.h include/syslimits.h
 	chmod a+r include/syslimits.h
 	$(STAMP) stmp-sdefixinc
-
-# Don't build FPBIT and DPBIT; we'll be using the SDE soft-float library.
-FPBIT =
-DPBIT =
diff --git a/gcc/config/mips/t-sr71k b/gcc/config/mips/t-sr71k
--- a/gcc/config/mips/t-sr71k
+++ b/gcc/config/mips/t-sr71k
@@ -1,4 +1,4 @@ 
-# Copyright (C) 2002, 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2010, 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -38,26 +38,6 @@  CRTSTUFF_T_CFLAGS = -G 0
 # without the $gp register.
 TARGET_LIBGCC2_CFLAGS = -G 0
 
-# fp-bit and dp-bit are really part of libgcc1, but this will cause
-# them to be built correctly, so... [taken from t-sparclite]
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#ifdef __MIPSEL__' > dp-bit.c
-	echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c
-	echo '#endif' >> dp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	echo '#ifdef __MIPSEL__' >> fp-bit.c
-	echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c
-	echo '#endif' >> fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
 # Build the libraries for both hard and soft floating point
 
 MULTILIB_OPTIONS = EL/EB msoft-float mips2
diff --git a/gcc/config/mn10300/t-linux b/gcc/config/mn10300/t-linux
deleted file mode 100644
--- a/gcc/config/mn10300/t-linux
+++ /dev/null
@@ -1,29 +0,0 @@ 
-# Copyright (C) 2003 Free Software Foundation, Inc.
-#
-# This file is part of GCC.
-#
-# GCC is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GCC is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GCC; see the file COPYING3.  If not see
-# <http://www.gnu.org/licenses/>.
-
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
diff --git a/gcc/config/mn10300/t-mn10300 b/gcc/config/mn10300/t-mn10300
--- a/gcc/config/mn10300/t-mn10300
+++ b/gcc/config/mn10300/t-mn10300
@@ -1,5 +1,5 @@ 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001,
-# 2003, 2010 Free Software Foundation, Inc.
+# 2003, 2010, 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -17,18 +17,6 @@ 
 # along with GCC; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
 
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
 MULTILIB_OPTIONS = mam33/mam33-2/mam34
 MULTILIB_DIRNAMES = am33 am33-2 am34
 
diff --git a/gcc/config/pdp11/t-pdp11 b/gcc/config/pdp11/t-pdp11
--- a/gcc/config/pdp11/t-pdp11
+++ b/gcc/config/pdp11/t-pdp11
@@ -1,5 +1,5 @@ 
 # Copyright (C) 1995, 1997, 1998, 2001, 2002,
-# 2004, 2010 Free Software Foundation, Inc.
+# 2004, 2010, 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -21,17 +21,6 @@  TARGET_LIBGCC2_CFLAGS = -O2 -mfloat32
 LIB2FUNCS_EXTRA = $(srcdir)/config/udivmod.c $(srcdir)/config/udivmodsi4.c \
     $(srcdir)/config/memcmp.c $(srcdir)/config/memcpy.c \
     $(srcdir)/config/memmove.c $(srcdir)/config/memset.c
-# floating point emulation libraries
-
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT'                            > fp-bit.c
-	cat $(srcdir)/config/fp-bit.c                   >> fp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	cat $(srcdir)/config/fp-bit.c > dp-bit.c
 
 MULTILIB_OPTIONS = msoft-float
 
diff --git a/gcc/config/picochip/t-picochip b/gcc/config/picochip/t-picochip
--- a/gcc/config/picochip/t-picochip
+++ b/gcc/config/picochip/t-picochip
@@ -61,16 +61,3 @@  MULTILIB_OPTIONS = mmul-type=none/mmul-t
 
 # Using a mul unit (currently) implies that byte access is available.
 MULTILIB_EXCEPTIONS = mmul-type=mul/mno-byte-access
-
-# We want fine grained libraries, so use the new code
-# to build the floating point emulation libraries.
-FPBIT = fp-bit.c
-
-# Software floating point support. Floating point is not properly
-# supported, but is existence can be useful for some types of testing.
-fp-bit.c:	$(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	echo '#define FLOAT_ONLY' >> fp-bit.c
-	echo '#define SMALL_MACHINE' >> fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
diff --git a/gcc/config/rs6000/t-aix43 b/gcc/config/rs6000/t-aix43
--- a/gcc/config/rs6000/t-aix43
+++ b/gcc/config/rs6000/t-aix43
@@ -1,5 +1,5 @@ 
 # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-# 2006 Free Software Foundation, Inc.
+# 2006, 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -17,18 +17,6 @@ 
 # along with GCC; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
 
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
 # Build the libraries for pthread and all of the 
 # different processor models
 
@@ -86,8 +74,7 @@  SHLIB_MAPFILES = $$(libgcc_objdir)/libgc
 SHLIB_NM_FLAGS = -Bpg -X32_64
 
 # GCC 128-bit long double support routines.
-LIB2FUNCS_EXTRA =  $(srcdir)/config/rs6000/ppc64-fp.c \
-	$(srcdir)/config/rs6000/darwin-ldouble.c
+LIB2FUNCS_EXTRA = $(srcdir)/config/rs6000/darwin-ldouble.c
 TARGET_LIBGCC2_CFLAGS = -mlong-double-128
 
 # Either 32-bit and 64-bit objects in archives.
diff --git a/gcc/config/rs6000/t-aix52 b/gcc/config/rs6000/t-aix52
--- a/gcc/config/rs6000/t-aix52
+++ b/gcc/config/rs6000/t-aix52
@@ -1,5 +1,5 @@ 
 # Copyright (C) 2002, 2003, 2004, 2005, 2006,
-# 2008 Free Software Foundation, Inc.
+# 2008, 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -17,18 +17,6 @@ 
 # along with GCC; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
 
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
 # Build the libraries for pthread and all of the 
 # different processor models
 
@@ -67,8 +55,7 @@  SHLIB_MAPFILES = $$(libgcc_objdir)/libgc
 SHLIB_NM_FLAGS = -Bpg -X32_64
 
 # GCC 128-bit long double support routines.
-LIB2FUNCS_EXTRA = $(srcdir)/config/rs6000/ppc64-fp.c \
-	$(srcdir)/config/rs6000/darwin-ldouble.c
+LIB2FUNCS_EXTRA = $(srcdir)/config/rs6000/darwin-ldouble.c
 TARGET_LIBGCC2_CFLAGS = -mlong-double-128
 
 # Either 32-bit and 64-bit objects in archives.
diff --git a/gcc/config/rs6000/t-darwin b/gcc/config/rs6000/t-darwin
--- a/gcc/config/rs6000/t-darwin
+++ b/gcc/config/rs6000/t-darwin
@@ -18,7 +18,6 @@ 
 # <http://www.gnu.org/licenses/>.
 
 LIB2FUNCS_EXTRA = $(srcdir)/config/rs6000/darwin-tramp.asm \
-	$(srcdir)/config/rs6000/ppc64-fp.c \
 	$(srcdir)/config/darwin-64.c \
 	$(srcdir)/config/rs6000/darwin-ldouble.c \
 	$(srcdir)/config/rs6000/darwin-world.asm
diff --git a/gcc/config/rs6000/t-fprules-fpbit b/gcc/config/rs6000/t-fprules-fpbit
deleted file mode 100644
--- a/gcc/config/rs6000/t-fprules-fpbit
+++ /dev/null
@@ -1,29 +0,0 @@ 
-# Copyright (C) 2006 Free Software Foundation, Inc.
-#
-# This file is part of GCC.
-#
-# GCC is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GCC is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GCC; see the file COPYING3.  If not see
-# <http://www.gnu.org/licenses/>.
-
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64
--- a/gcc/config/rs6000/t-linux64
+++ b/gcc/config/rs6000/t-linux64
@@ -1,7 +1,7 @@ 
 #rs6000/t-linux64
 
 # Copyright (C) 2002, 2003, 2004, 2006, 2007,
-# 2009 Free Software Foundation, Inc.
+# 2009, 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -19,9 +19,6 @@ 
 # along with GCC; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
 
-LIB2FUNCS_EXTRA += $(srcdir)/config/rs6000/ppc64-fp.c
-LIB2FUNCS_EXTRA := $(sort $(LIB2FUNCS_EXTRA))
-
 TARGET_LIBGCC2_CFLAGS += -mno-minimal-toc
 
 # On Debian, Ubuntu and other derivative distributions, the 32bit libraries
diff --git a/gcc/config/rs6000/t-lynx b/gcc/config/rs6000/t-lynx
--- a/gcc/config/rs6000/t-lynx
+++ b/gcc/config/rs6000/t-lynx
@@ -1,4 +1,4 @@ 
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -21,16 +21,6 @@  LIB2FUNCS_EXTRA = tramp.S
 tramp.S: $(srcdir)/config/rs6000/tramp.asm
 	cat $(srcdir)/config/rs6000/tramp.asm > tramp.S
 
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
 LIBGCC = stmp-multilib
 INSTALL_LIBGCC = install-multilib
 
diff --git a/gcc/config/rs6000/t-spe b/gcc/config/rs6000/t-spe
--- a/gcc/config/rs6000/t-spe
+++ b/gcc/config/rs6000/t-spe
@@ -18,16 +18,6 @@ 
 # along with GCC; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
 
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
 LIBGCC = stmp-multilib
 INSTALL_LIBGCC = install-multilib
 
diff --git a/gcc/config/sh/t-netbsd b/gcc/config/sh/t-netbsd
--- a/gcc/config/sh/t-netbsd
+++ b/gcc/config/sh/t-netbsd
@@ -1,4 +1,4 @@ 
-# Copyright (C) 2002, 2004, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2009, 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -22,10 +22,3 @@  LIB1ASMFUNCS_CACHE = _ic_invalidate
 LIB2FUNCS_EXTRA=
 
 EXTRA_MULTILIB_PARTS=
-
-# NetBSD's C library includes a fast software FP library that
-# has support for setting/setting the rounding mode, exception
-# mask, etc.  Therefore, we don't want to include software FP
-# in libgcc.
-FPBIT =
-DPBIT =
diff --git a/gcc/config/sh/t-sh b/gcc/config/sh/t-sh
--- a/gcc/config/sh/t-sh
+++ b/gcc/config/sh/t-sh
@@ -31,24 +31,6 @@  LIB1ASMFUNCS_CACHE = _ic_invalidate _ic_
 
 TARGET_LIBGCC2_CFLAGS = -mieee
 
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#ifdef __LITTLE_ENDIAN__' > dp-bit.c
-	echo '#define FLOAT_BIT_ORDER_MISMATCH' >>dp-bit.c
-	echo '#endif' 		>> dp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	echo '#ifdef __LITTLE_ENDIAN__' >> fp-bit.c
-	echo '#define FLOAT_BIT_ORDER_MISMATCH' >>fp-bit.c
-	echo '#endif' 		>> fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
 DEFAULT_ENDIAN = $(word 1,$(TM_ENDIAN_CONFIG))
 OTHER_ENDIAN = $(word 2,$(TM_ENDIAN_CONFIG))
 
diff --git a/gcc/config/sparc/t-elf b/gcc/config/sparc/t-elf
--- a/gcc/config/sparc/t-elf
+++ b/gcc/config/sparc/t-elf
@@ -20,18 +20,6 @@ 
 LIB1ASMSRC = sparc/lb1spc.asm
 LIB1ASMFUNCS = _mulsi3 _divsi3 _modsi3
 
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
 MULTILIB_OPTIONS = msoft-float mcpu=v8 mflat
 MULTILIB_DIRNAMES = soft v8 flat
 MULTILIB_MATCHES = msoft-float=mno-fpu
diff --git a/gcc/config/sparc/t-leon b/gcc/config/sparc/t-leon
--- a/gcc/config/sparc/t-leon
+++ b/gcc/config/sparc/t-leon
@@ -1,4 +1,4 @@ 
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -19,18 +19,6 @@ 
 LIB1ASMSRC = sparc/lb1spc.asm
 LIB1ASMFUNCS = _mulsi3 _divsi3 _modsi3
 
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
 # Multilibs for LEON
 # LEON is a SPARC-V8, but the AT697 implementation has a bug in the
 # V8-specific instructions.
diff --git a/gcc/config/sparc/t-leon3 b/gcc/config/sparc/t-leon3
--- a/gcc/config/sparc/t-leon3
+++ b/gcc/config/sparc/t-leon3
@@ -1,4 +1,4 @@ 
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -16,18 +16,6 @@ 
 # along with GCC; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
 
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
 # Multilibs for LEON3
 MULTILIB_OPTIONS = msoft-float
 MULTILIB_DIRNAMES = soft
diff --git a/gcc/config/spu/t-spu-elf b/gcc/config/spu/t-spu-elf
--- a/gcc/config/spu/t-spu-elf
+++ b/gcc/config/spu/t-spu-elf
@@ -30,10 +30,6 @@  TARGET_LIBGCC2_CFLAGS = -fPIC -mwarn-rel
 # own versions below and/or via direct expansion.
 LIB2FUNCS_EXCLUDE = _floatdisf _floatundisf _floattisf _floatunstisf
 
-# We provide our own version of __divdf3 that performs better and has
-# better support for non-default rounding modes.
-DPBIT_FUNCS := $(filter-out _div_df, $(DPBIT_FUNCS))
-
 LIB2FUNCS_STATIC_EXTRA = $(srcdir)/config/spu/float_unssidf.c \
 			 $(srcdir)/config/spu/float_unsdidf.c \
 			 $(srcdir)/config/spu/float_unsdisf.c \
@@ -47,18 +43,6 @@  LIB2FUNCS_STATIC_EXTRA = $(srcdir)/confi
 			 $(srcdir)/config/spu/divmodti4.c \
 			 $(srcdir)/config/spu/divv2df3.c
 
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c $(srcdir)/config/spu/t-spu-elf
-	cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c $(srcdir)/config/spu/t-spu-elf
-	echo '#define FLOAT' > fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
 # Build TImode conversion routines to support Fortran 128-bit
 # integer data types.
 LIB2_SIDITI_CONV_FUNCS=yes
diff --git a/gcc/config/stormy16/t-stormy16 b/gcc/config/stormy16/t-stormy16
--- a/gcc/config/stormy16/t-stormy16
+++ b/gcc/config/stormy16/t-stormy16
@@ -1,6 +1,6 @@ 
 # -*- makefile -*-
 #
-# Copyright (C) 2001, 2004, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2004, 2010, 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -36,15 +36,4 @@  LIB2FUNCS_EXTRA = \
 	$(srcdir)/config/stormy16/stormy16-lib2-cmpsi2.c \
 	$(srcdir)/config/stormy16/stormy16-lib2-ucmpsi2.c
 
-# Floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT'				> fp-bit.c
-	cat $(srcdir)/config/fp-bit.c			>> fp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	cat $(srcdir)/config/fp-bit.c > dp-bit.c
-
 TARGET_LIBGCC2_CFLAGS = -O2
diff --git a/gcc/config/v850/t-v850 b/gcc/config/v850/t-v850
--- a/gcc/config/v850/t-v850
+++ b/gcc/config/v850/t-v850
@@ -1,5 +1,5 @@ 
-# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2008, 2009, 2010
-# Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2008, 2009, 2010,
+# 2011 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -78,24 +78,6 @@  LIB1ASMFUNCS	= _mulsi3 \
 		  _ucmpdi2 \
 		  _muldi3
 
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#ifdef __LITTLE_ENDIAN__' > dp-bit.c
-	echo '#define FLOAT_BIT_ORDER_MISMATCH' >>dp-bit.c
-	echo '#endif' 		>> dp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-	echo '#define FLOAT' > fp-bit.c
-	echo '#ifdef __LITTLE_ENDIAN__' >> fp-bit.c
-	echo '#define FLOAT_BIT_ORDER_MISMATCH' >>fp-bit.c
-	echo '#endif' 		>> fp-bit.c
-	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
 # Create target-specific versions of the libraries
 MULTILIB_OPTIONS  = mv850/mv850e/mv850e2/mv850e2v3
 MULTILIB_DIRNAMES = v850 v850e v850e2 v850e2v3
diff --git a/gcc/doc/fragments.texi b/gcc/doc/fragments.texi
--- a/gcc/doc/fragments.texi
+++ b/gcc/doc/fragments.texi
@@ -49,29 +49,6 @@  Compiler flags to use when compiling @fi
 A list of source file names to be compiled or assembled and inserted
 into @file{libgcc.a}.
 
-@findex Floating Point Emulation
-@item Floating Point Emulation
-To have GCC include software floating point libraries in @file{libgcc.a}
-define @code{FPBIT} and @code{DPBIT} along with a few rules as follows:
-@smallexample
-# We want fine grained libraries, so use the new code
-# to build the floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
-        echo '#define FLOAT' > fp-bit.c
-        cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
-        cat $(srcdir)/config/fp-bit.c > dp-bit.c
-@end smallexample
-
-You may need to provide additional #defines at the beginning of @file{fp-bit.c}
-and @file{dp-bit.c} to control target endianness and other options.
-
-
 @findex CRTSTUFF_T_CFLAGS
 @item CRTSTUFF_T_CFLAGS
 Special flags used when compiling @file{crtstuff.c}.
diff --git a/gcc/po/EXCLUDES b/gcc/po/EXCLUDES
--- a/gcc/po/EXCLUDES
+++ b/gcc/po/EXCLUDES
@@ -22,8 +22,6 @@ 
 # .def are examined to begin with.
 
 #   These files are part of libgcc, or target headers provided by gcc.
-config/fp-bit.c
-config/fp-bit.h
 config/vxlib.c
 crtstuff.c
 gbl-ctors.h
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
--- a/libgcc/Makefile.in
+++ b/libgcc/Makefile.in
@@ -37,6 +37,8 @@  SHELL = @SHELL@
 
 cpu_type = @cpu_type@
 enable_shared = @enable_shared@
+double_type_size = @double_type_size@
+long_double_type_size = @long_double_type_size@
 decimal_float = @decimal_float@
 enable_decimal_float = @enable_decimal_float@
 fixed_point = @fixed_point@
@@ -256,6 +258,21 @@  LIBGCC_VER_GNU_PREFIX = __
 LIBGCC_VER_FIXEDPOINT_GNU_PREFIX = __
 LIBGCC_VER_SYMBOLS_PREFIX =
 
+FPBIT_FUNCS = _pack_sf _unpack_sf _addsub_sf _mul_sf _div_sf \
+    _fpcmp_parts_sf _compare_sf _eq_sf _ne_sf _gt_sf _ge_sf \
+    _lt_sf _le_sf _unord_sf _si_to_sf _sf_to_si _negate_sf _make_sf \
+    _sf_to_df _sf_to_tf _thenan_sf _sf_to_usi _usi_to_sf
+
+DPBIT_FUNCS = _pack_df _unpack_df _addsub_df _mul_df _div_df \
+    _fpcmp_parts_df _compare_df _eq_df _ne_df _gt_df _ge_df \
+    _lt_df _le_df _unord_df _si_to_df _df_to_si _negate_df _make_df \
+    _df_to_sf _df_to_tf _thenan_df _df_to_usi _usi_to_df
+
+TPBIT_FUNCS = _pack_tf _unpack_tf _addsub_tf _mul_tf _div_tf \
+    _fpcmp_parts_tf _compare_tf _eq_tf _ne_tf _gt_tf _ge_tf \
+    _lt_tf _le_tf _unord_tf _si_to_tf _tf_to_si _negate_tf _make_tf \
+    _tf_to_df _tf_to_sf _thenan_tf _tf_to_usi _usi_to_tf
+
 # Additional sources to handle exceptions; overridden by targets as needed.
 LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \
   $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
@@ -445,34 +462,25 @@  lib2-divmod-s-o = $(patsubst %,%_s$(obje
 libgcc-s-objects += $(lib2-divmod-s-o)
 endif
 
-# $(FPBIT) et al. are pathnames relative to the GCC build
-# directory; the supporting files are made by the GCC
-# Makefile.
-# FIXME: Soon we will be able to move this logic into this directory.
-
-ifneq ($(fpbit-in-libgcc),yes)
-FPBIT:=$(if $(FPBIT),$(gcc_objdir)/$(FPBIT),)
-DPBIT:=$(if $(DPBIT),$(gcc_objdir)/$(DPBIT),)
-TPBIT:=$(if $(TPBIT),$(gcc_objdir)/$(TPBIT),)
-endif
-
 ifeq ($(TPBIT),)
 # _sf_to_tf and _df_to_tf require tp-bit.c being compiled in.
 FPBIT_FUNCS := $(filter-out _sf_to_tf,$(FPBIT_FUNCS))
 DPBIT_FUNCS := $(filter-out _df_to_tf,$(DPBIT_FUNCS))
 endif
 
+fpbit-src := $(srcdir)/fp-bit.c
+
 # Build FPBIT.
 ifneq ($(FPBIT),)
 fpbit-o = $(patsubst %,%$(objext),$(FPBIT_FUNCS))
-$(fpbit-o): %$(objext): $(FPBIT)
-	$(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* -c $(FPBIT) $(vis_hide)
+$(fpbit-o): %$(objext): $(fpbit-src)
+	$(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* -DFLOAT $(FPBIT_CFLAGS) -c $< $(vis_hide)
 libgcc-objects += $(fpbit-o)
 
 ifeq ($(enable_shared),yes)
 fpbit-s-o = $(patsubst %,%_s$(objext),$(FPBIT_FUNCS))
-$(fpbit-s-o): %_s$(objext): $(FPBIT)
-	$(gcc_s_compile) -DFINE_GRAINED_LIBRARIES -DL$* -c $(FPBIT)
+$(fpbit-s-o): %_s$(objext): $(fpbit-src)
+	$(gcc_s_compile) -DFINE_GRAINED_LIBRARIES -DL$* -DFLOAT $(FPBIT_CFLAGS)  -c $<
 libgcc-s-objects += $(fpbit-s-o)
 endif
 endif
@@ -480,14 +488,14 @@  endif
 # Build DPBIT.
 ifneq ($(DPBIT),)
 dpbit-o = $(patsubst %,%$(objext),$(DPBIT_FUNCS))
-$(dpbit-o): %$(objext): $(DPBIT)
-	$(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* -c $(DPBIT) $(vis_hide)
+$(dpbit-o): %$(objext): $(fpbit-src)
+	$(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* $(DPBIT_CFLAGS) -c $< $(vis_hide)
 libgcc-objects += $(dpbit-o)
 
 ifeq ($(enable_shared),yes)
 dpbit-s-o = $(patsubst %,%_s$(objext),$(DPBIT_FUNCS))
-$(dpbit-s-o): %_s$(objext): $(DPBIT)
-	$(gcc_s_compile) -DFINE_GRAINED_LIBRARIES -DL$* -c $(DPBIT)
+$(dpbit-s-o): %_s$(objext): $(fpbit-src)
+	$(gcc_s_compile) -DFINE_GRAINED_LIBRARIES -DL$* $(DPBIT_CFLAGS) -c $<
 libgcc-s-objects += $(dpbit-s-o)
 endif
 endif
@@ -495,14 +503,14 @@  endif
 # Build TPBIT.
 ifneq ($(TPBIT),)
 tpbit-o = $(patsubst %,%$(objext),$(TPBIT_FUNCS))
-$(tpbit-o): %$(objext): $(TPBIT)
-	$(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* -c $(TPBIT) $(vis_hide)
+$(tpbit-o): %$(objext): $(fpbit-src)
+	$(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* -DTFLOAT $(TPBIT_CFLAGS) -c $< $(vis_hide)
 libgcc-objects += $(tpbit-o)
 
 ifeq ($(enable_shared),yes)
 tpbit-s-o = $(patsubst %,%_s$(objext),$(TPBIT_FUNCS))
-$(tpbit-s-o): %_s$(objext): $(TPBIT)
-	$(gcc_s_compile) -DFINE_GRAINED_LIBRARIES -DL$* -c $(TPBIT)
+$(tpbit-s-o): %_s$(objext): $(fpbit-src)
+	$(gcc_s_compile) -DFINE_GRAINED_LIBRARIES -DL$* -DTFLOAT $(TPBIT_CFLAGS) -c $<
 libgcc-s-objects += $(tpbit-s-o)
 endif
 endif
diff --git a/libgcc/config.host b/libgcc/config.host
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -72,6 +72,7 @@  cpu_type=`echo ${host} | sed 's/-.*$//'`
 case ${host} in
 m32c*-*-*)
         cpu_type=m32c
+	tmake_file=t-fdpbit
         ;;
 alpha*-*-*)
 	cpu_type=alpha
@@ -121,6 +122,7 @@  microblaze*-*-*)
 	;;
 mips*-*-*)
 	cpu_type=mips
+	tmake_file=mips/t-mips
 	;;
 powerpc*-*-*)
 	cpu_type=rs6000
@@ -265,8 +267,10 @@  alpha*-dec-*vms*)
 	md_unwind_header=alpha/vms-unwind.h
 	;;
 arm-wrs-vxworks)
+	tmake_file=t-fdpbit
 	;;
 arm*-*-freebsd*)
+	tmake_file=t-fdpbit
 	;;
 arm*-*-netbsdelf*)
 	;;
@@ -309,40 +313,56 @@  arm*-*-elf)
 arm*-wince-pe*)
 	;;
 avr-*-rtems*)
+	tmake_file=t-fpbit
 	;;
 avr-*-*)
-    # Make HImode functions for AVR
-    tmake_file=${cpu_type}/t-avr
+	# Make HImode functions for AVR
+	tmake_file="${cpu_type}/t-avr t-fpbit"
+
 	;;
 bfin*-elf*)
+	tmke_file=t-fdpbit
         ;;
 bfin*-uclinux*)
+	tmake_file=t-fdpbit
 	md_unwind_header=bfin/linux-unwind.h
         ;;
 bfin*-linux-uclibc*)
+	tmake_file=t-fdpbit
 	# No need to build crtbeginT.o on uClibc systems.  Should probably
 	# be moved to the OS specific section above.
 	extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
 	md_unwind_header=bfin/linux-unwind.h
 	;;
+bfin*-rtems*)
+	tmake_file=t-fdpbit
+	;;
 bfin*-*)
+	tmake_file=t-fdpbit
         ;;
 crisv32-*-elf | crisv32-*-none | cris-*-elf | cris-*-none)
+	tmake_file=t-fdpbit
 	extra_parts="crtbegin.o crtend.o"
 	;;
 cris-*-linux* | crisv32-*-linux*)
+	tmake_file=t-fdpbit
 	;;
 fido-*-elf)
 	;;
 fr30-*-elf)
+	tmake_file=t-fdpbit
 	;;
 frv-*-elf)
+	tmake_file=t-fdpbit
 	;;
 frv-*-*linux*)
+	tmake_file=t-fdpbit
 	;;
 h8300-*-rtems*)
+	tmake_file=t-fpbit
 	;;
 h8300-*-elf*)
+	tmake_file=t-fpbit
 	;;
 hppa*64*-*-linux*)
 	;;
@@ -458,6 +478,7 @@  ia64-hp-*vms*)
 	md_unwind_header=ia64/vms-unwind.h
 	;;
 iq2000*-*-elf*)
+	tmake_file=t-fdpbit
         ;;
 lm32-*-elf*|lm32-*-rtems*)
         extra_parts="crtbegin.o crtend.o crti.o crtn.o"
@@ -468,12 +489,16 @@  lm32-*-uclinux*)
         tmake_file="lm32/t-lm32 lm32/t-uclinux t-softfp"
 	;;	
 m32r-*-elf*|m32r-*-rtems*)
+	tmake_file=t-fdpbit
  	;;
 m32rle-*-elf*)
+	tmake_file=t-fdpbit
 	;;
 m32r-*-linux*)
+	tmake_file=t-fdpbit
  	;;
 m32rle-*-linux*)
+	tmake_file=t-fdpbit
 	;;
 m68k-*-elf*)
 	;;
@@ -492,29 +517,41 @@  m68k-*-linux*)			# Motorola m68k's runni
 m68k-*-rtems*)
 	;;
 mcore-*-elf)
+	tmake_file=t-fdpbit
 	;;
 microblaze*-*-*)
-        tmake_file="microblaze/t-microblaze"
+        tmake_file="microblaze/t-microblaze t-fdpbit"
 	;;
 mips-sgi-irix6.5*)
-	tmake_file="mips/t-irix6 t-crtfm t-slibgcc mips/t-slibgcc-irix"
+	tmake_file="$tmake_file mips/t-irix6 t-crtfm mips/t-tpbit t-slibgcc mips/t-slibgcc-irix"
 	extra_parts="crtbegin.o crtend.o crtfastmath.o irix-crti.o irix-crtn.o"
 	md_unwind_header=mips/irix6-unwind.h
 	;;
 mips*-*-netbsd*)			# NetBSD/mips, either endian.
 	;;
-mips64*-*-linux*)
+mips64*-*-linux* | mipsisa64*-*-linux*)
 	extra_parts="$extra_parts crtfastmath.o"
-	tmake_file="{$tmake_file} t-crtfm"
+	tmake_file="${tmake_file} t-crtfm mips/t-tpbit"
 	md_unwind_header=mips/linux-unwind.h
 	;;
 mips*-*-linux*)				# Linux MIPS, either endian.
 	extra_parts="$extra_parts crtfastmath.o"
-	tmake_file="{$tmake_file} t-crtfm"
+	tmake_file="${tmake_file} t-crtfm"
 	md_unwind_header=mips/linux-unwind.h
 	;;
 mips*-*-openbsd*)
 	;;
+mips*-sde-elf*)
+	case "${with_newlib}" in
+	  yes)
+	    # newlib / libgloss.
+	    ;;
+	  *)
+	    # MIPS toolkit libraries.
+	    tmake_file=mips/t-sdemtk
+	    ;;
+	esac
+	;;
 mipsisa32-*-elf* | mipsisa32el-*-elf*)
 	;;
 mipsisa32r2-*-elf* | mipsisa32r2el-*-elf*)
@@ -524,6 +561,7 @@  mipsisa64-*-elf* | mipsisa64el-*-elf*)
 mipsisa64r2-*-elf* | mipsisa64r2el-*-elf*)
 	;;
 mipsisa64sr71k-*-elf*)
+	tmake_file=t-fdpbit
         ;;
 mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
 	;;
@@ -546,15 +584,17 @@  mmix-knuth-mmixware)
 	tmake_file="${tmake_file} ${cpu_type}/t-${cpu_type}"
 	;;
 mn10300-*-*)
+	tmake_file=t-fdpbit
 	;;
 moxie-*-*)
 	tmake_file="moxie/t-moxie moxie/t-moxie-softfp"
 	extra_parts="crtbegin.o crtend.o crti.o crtn.o"
 	;;
 pdp11-*-*)
+	tmake_file=t-fdpbit
 	;;
 picochip-*-*)
-	tmake_file=picochip/t-picochip
+	tmake_file="picochip/t-picochip t-fpbit"
         ;;
 powerpc-*-darwin*)
 	case ${host} in
@@ -580,44 +620,60 @@  powerpc-*-eabispe*)
 	tmake_file="${tmake_file} rs6000/t-ppccomm"
 	;;
 powerpc-*-eabisimaltivec*)
+	tmake_file=t-fdpbit
 	;;
 powerpc-*-eabisim*)
+	tmake_file=t-fdpbit
 	;;
 powerpc-*-elf*)
+	tmake_file=t-fdpbit
 	;;
 powerpc-*-eabialtivec*)
+	tmake_file=t-fdpbit
+	;;
+powerpc-xilinx-eabi*)
+	tmake_file=t-fdpbit
 	;;
 powerpc-*-eabi*)
-	tmake_file="${tmake_file} rs6000/t-ppccomm"
+	tmake_file="${tmake_file} rs6000/t-ppccomm t-fdpbit"
 	;;
 powerpc-*-rtems*)
+	tmake_file=t-fdpbit
 	;;
 powerpc-*-linux* | powerpc64-*-linux*)
-	tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128 t-softfp t-dfprules"
+	tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128 t-softfp t-dfprules rs6000/t-ppc64-fp"
 	md_unwind_header=rs6000/linux-unwind.h
 	;;
 powerpc-wrs-vxworks|powerpc-wrs-vxworksae)
+	tmake_file=t-fdpbit
 	;;
 powerpc-*-lynxos*)
+	tmake_file=t-fdpbit
 	;;
 powerpcle-*-elf*)
+	tmake_file=t-fdpbit
 	;;
 powerpcle-*-eabisim*)
+	tmake_file=t-fdpbit
 	;;
 powerpcle-*-eabi*)
+	tmake_file=t-fdpbit
 	;;
 rs6000-ibm-aix4.[3456789]* | powerpc-ibm-aix4.[3456789]*)
 	md_unwind_header=rs6000/aix-unwind.h
+	tmake_file="t-fdpbit rs6000/t-ppc64-fp"
 	;;
 rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*)
 	md_unwind_header=rs6000/aix-unwind.h
+	tmake_file="t-fdpbit rs6000/t-ppc64-fp"
 	;;
 rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
 	md_unwind_header=rs6000/aix-unwind.h
+	tmake_file="t-fdpbit rs6000/t-ppc64-fp"
 	;;
 rx-*-elf)
 	extra_parts="crtbegin.o crtend.o"
-	tmake_file="rx/t-rx"
+	tmake_file="rx/t-rx t-fdpbit"
 	;;
 s390-*-linux*)
 	tmake_file="${tmake_file} s390/t-crtstuff s390/t-linux s390/32/t-floattodi"
@@ -639,14 +695,25 @@  sh-*-elf* | sh[12346l]*-*-elf* | \
    sh64-*-netbsd* | sh64l*-*-netbsd*)
 	case ${host} in
 	sh*-*-linux*)
-		tmake_file="${tmake_file} sh/t-linux"
+		tmake_file="${tmake_file} sh/t-linux t-fdpbit"
 		md_unwind_header=sh/linux-unwind.h
 		;;
+	sh*-*-netbsd*)
+		# NetBSD's C library includes a fast software FP library that
+		# has support for setting/setting the rounding mode, exception
+		# mask, etc.  Therefore, we don't want to include software FP
+		# in libgcc.
+		;;
+	sh*-*-*)
+	        tmake_file=t-fdpbit
+		;;
 	esac
 	;;
 sh-*-rtems*)
+	tmake_file=t-fdpbit
 	;;
 sh-wrs-vxworks)
+	tmake_file=t-fdpbit
 	;;
 sparc-*-netbsdelf*)
 	;;
@@ -660,16 +727,21 @@  sparc-*-elf*)
 	  	tmake_file="sparc/t-softmul"
 	  	;;
 	esac
-	tmake_file="${tmake_file} sparc/t-softfp t-crtin t-crtfm"
+	tmake_file="${tmake_file} t-fdpbit t-crtin t-crtfm"
 	extra_parts="crtbegin.o crtend.o crti.o crtn.o crtfastmath.o"
 	;;
 sparc-*-linux*)		# SPARC's running GNU/Linux, libc6
+	case ${host} in
+	*-leon*)
+		tmake_file=t-fdpbit
+		;;
+	esac
 	extra_parts="$extra_parts crtfastmath.o"
 	tmake_file="${tmake_file} t-crtfm"
 	md_unwind_header=sparc/linux-unwind.h
 	;;
-sparc-*-rtems* | sparc64-*-rtems* )
-	tmake_file="sparc/t-elf t-crtin t-crtfm t-rtems"
+sparc-*-rtems*)
+	tmake_file="sparc/t-elf t-crtin t-crtfm t-rtems t-fdpbit"
 	extra_parts="crtbegin.o crtend.o crti.o crtn.o crtfastmath.o"
 	;;
 sparc*-*-solaris2*)
@@ -681,6 +753,10 @@  sparc64-*-elf*)
 	tmake_file="${tmake_file} t-crtin t-crtfm"
 	extra_parts="crtbegin.o crtend.o crti.o crtn.o crtfastmath.o"
 	;;
+sparc64-*-rtems*)
+	tmake_file="sparc/t-elf t-crtin t-crtfm t-rtems"
+	extra_parts="crtbegin.o crtend.o crti.o crtn.o crtfastmath.o"
+	;;
 sparc-wrs-vxworks)
 	;;
 sparc64-*-freebsd*|ultrasparc-*-freebsd*)
@@ -695,11 +771,13 @@  sparc64-*-linux*)		# 64-bit SPARC's runn
 sparc64-*-netbsd*)
 	;;
 spu-*-elf*)
+	tmake_file="t-fdpbit spu/t-elf"
 	;;
 tic6x-*-*)
 	tmake_file="${tmake_file} t-gnu-prefix"
 	;;
 v850*-*-*)
+	tmake_file=t-fdpbit
 	;;
 vax-*-linux*)
 	;;
@@ -708,6 +786,7 @@  vax-*-netbsdelf*)
 vax-*-openbsd*)
 	;;
 xstormy16-*-elf)
+	tmake_file=t-fdpbit
 	;;
 xtensa*-*-elf*)
 	tmake_file=xtensa/t-xtensa
@@ -718,10 +797,12 @@  xtensa*-*-linux*)
 	;;
 am33_2.0-*-linux*)
 	extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
+	tmake_file=t-fdpbit
 	;;
 m32c-*-elf*|m32c-*-rtems*)
  	;;
 mep*-*-*)
+	tmake_file=t-fdpbit
 	;;
 *)
 	echo "*** Configuration ${host} not supported" 1>&2
diff --git a/libgcc/config/avr/avr-lib.h b/libgcc/config/avr/avr-lib.h
new file mode 100644
--- /dev/null
+++ b/libgcc/config/avr/avr-lib.h
@@ -0,0 +1,4 @@ 
+#define CMPtype QItype
+#define DF SF
+#define DI SI
+typedef int QItype __attribute__ ((mode (QI)));
diff --git a/libgcc/config/h8300/h8300-lib.h b/libgcc/config/h8300/h8300-lib.h
new file mode 100644
--- /dev/null
+++ b/libgcc/config/h8300/h8300-lib.h
@@ -0,0 +1,5 @@ 
+#ifdef __H8300__
+#define CMPtype HItype
+#else
+#define CMPtype SItype
+#endif
diff --git a/libgcc/config/mips/t-irix6 b/libgcc/config/mips/t-irix6
--- a/libgcc/config/mips/t-irix6
+++ b/libgcc/config/mips/t-irix6
@@ -22,15 +22,3 @@  irix-crti.o: $(srcdir)/config/mips/irix-
 
 irix-crtn.o: $(srcdir)/config/mips/irix-crtn.S
 	$(crt_compile) -c $<
-
-TPBIT = tp-bit.c
-
-$(gcc_objdir)/tp-bit.c: $(gcc_srcdir)/config/fp-bit.c
-	echo '#ifdef __MIPSEL__'		 > $@
-	echo '# define FLOAT_BIT_ORDER_MISMATCH' >> $@
-	echo '#endif'				>> $@
-	echo '#define QUIET_NAN_NEGATED'	>> $@
-	echo '#if __LDBL_MANT_DIG__ == 106'	>> $@
-	echo '# define TFLOAT'			>> $@
-	cat $<					>> $@
-	echo '#endif'				>> $@
diff --git a/libgcc/config/mips/t-mips b/libgcc/config/mips/t-mips
new file mode 100644
--- /dev/null
+++ b/libgcc/config/mips/t-mips
@@ -0,0 +1,4 @@ 
+FPBIT = true
+FPBIT_CFLAGS = -DQUIET_NAN_NEGATED
+DPBIT = true
+DPBIT_CFLAGS = -DQUIET_NAN_NEGATED
diff --git a/libgcc/config/mips/t-sdemtk b/libgcc/config/mips/t-sdemtk
new file mode 100644
--- /dev/null
+++ b/libgcc/config/mips/t-sdemtk
@@ -0,0 +1,3 @@ 
+# Don't build FPBIT and DPBIT; we'll be using the SDE soft-float library.
+FPBIT =
+DPBIT =
diff --git a/libgcc/config/mips/t-tpbit b/libgcc/config/mips/t-tpbit
new file mode 100644
--- /dev/null
+++ b/libgcc/config/mips/t-tpbit
@@ -0,0 +1,4 @@ 
+ifeq ($(long_double_type_size),128)
+TPBIT = true
+TPBIT_CFLAGS = -DQUIET_NAN_NEGATED
+endif
diff --git a/gcc/config/rs6000/ppc64-fp.c b/libgcc/config/rs6000/ppc64-fp.c
rename from gcc/config/rs6000/ppc64-fp.c
rename to libgcc/config/rs6000/ppc64-fp.c
--- a/gcc/config/rs6000/ppc64-fp.c
+++ b/libgcc/config/rs6000/ppc64-fp.c
@@ -2,8 +2,8 @@ 
    libgcc2.c with macros expanded to force the use of specific types.
  
    Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001, 2002, 2003, 2004, 2006, 2009  Free Software Foundation,
-   Inc.
+   2000, 2001, 2002, 2003, 2004, 2006, 2009, 2011
+   Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -28,7 +28,7 @@  see the files COPYING3 and COPYING.RUNTI
 
 #if defined(__powerpc64__) || defined (__64BIT__) || defined(__ppc64__)
 #define TMODES
-#include "config/fp-bit.h"
+#include "fp-bit.h"
 
 extern DItype __fixtfdi (TFtype);
 extern DItype __fixdfdi (DFtype);
diff --git a/libgcc/config/rs6000/t-darwin b/libgcc/config/rs6000/t-darwin
--- a/libgcc/config/rs6000/t-darwin
+++ b/libgcc/config/rs6000/t-darwin
@@ -3,6 +3,8 @@  DARWIN_EXTRA_CRT_BUILD_CFLAGS = -mlongca
 crt2.o: $(srcdir)/config/rs6000/darwin-crt2.c
 	$(crt_compile) $(DARWIN_EXTRA_CRT_BUILD_CFLAGS) -c $<
 
+LIB2ADD += $(srcdir)/config/rs6000/ppc64-fp.c
+
 LIB2ADDEH += $(srcdir)/config/rs6000/darwin-fallback.c
 
 SHLIB_VERPFX = $(gcc_srcdir)/config/rs6000/darwin-libgcc
diff --git a/libgcc/config/rs6000/t-ppc64-fp b/libgcc/config/rs6000/t-ppc64-fp
new file mode 100644
--- /dev/null
+++ b/libgcc/config/rs6000/t-ppc64-fp
@@ -0,0 +1,2 @@ 
+# Can be used unconditionally, wrapped in __powerpc64__ || __64BIT__ __ppc64__.
+LIB2ADD += $(srcdir)/config/rs6000/ppc64-fp.c
diff --git a/libgcc/config/rx/rx-lib.h b/libgcc/config/rx/rx-lib.h
new file mode 100644
--- /dev/null
+++ b/libgcc/config/rx/rx-lib.h
@@ -0,0 +1,6 @@ 
+#ifdef FLOAT
+#ifndef __RX_64BIT_DOUBLES__
+#define DF SF
+#define FLOAT_ONLY
+#endif
+#endif
diff --git a/libgcc/config/rx/t-rx b/libgcc/config/rx/t-rx
--- a/libgcc/config/rx/t-rx
+++ b/libgcc/config/rx/t-rx
@@ -1,5 +1,5 @@ 
 # Makefile fragment for building LIBGCC for the Renesas RX target.
-# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2011 Free Software Foundation, Inc.
 # Contributed by Red Hat.
 #
 # This file is part of GCC.
@@ -28,17 +28,7 @@  LIB2ADD = $(srcdir)/config/rx/rx-abi-fun
 # We need special handling of the floating point conversion
 # routines, to allow for the varying size of a double:
 
-FPBIT = fp-bit.c
-$(gcc_objdir)/fp-bit.c: $(gcc_srcdir)/config/fp-bit.c
-	echo '#define FLOAT'		     > $@
-	echo '#ifndef __RX_64BIT_DOUBLES__' >> $@
-	echo '#define DF SF'		    >> $@
-	echo '#define FLOAT_ONLY'	    >> $@
-	echo '#endif' 			    >> $@
-	cat $(gcc_srcdir)/config/fp-bit.c   >> $@
-
-DPBIT = dp-bit.c
-$(gcc_objdir)/dp-bit.c: $(gcc_srcdir)/config/fp-bit.c
-	echo '#ifdef __RX_64BIT_DOUBLES__'   > $@
-	cat $(gcc_srcdir)/config/fp-bit.c   >> $@
-	echo '#endif'		      	    >> $@
+FPBIT = true
+ifeq ($(double_type_size),64)
+DPBIT = true
+endif
diff --git a/libgcc/config/sparc/t-softfp b/libgcc/config/sparc/t-softfp
deleted file mode 100644
--- a/libgcc/config/sparc/t-softfp
+++ /dev/null
@@ -1,29 +0,0 @@ 
-# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
-#
-# This file is part of GCC.
-#
-# GCC is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GCC is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GCC; see the file COPYING3.  If not see
-# <http://www.gnu.org/licenses/>.
-
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-$(gcc_objdir)/dp-bit.c: $(gcc_srcdir)/config/fp-bit.c
-	cat $<			> $@
-
-$(gcc_objdir)/fp-bit.c: $(gcc_srcdir)/config/fp-bit.c
-	echo '#define FLOAT'	> $@
-	cat $<			>> $@
diff --git a/libgcc/config/spu/t-elf b/libgcc/config/spu/t-elf
new file mode 100644
--- /dev/null
+++ b/libgcc/config/spu/t-elf
@@ -0,0 +1,3 @@ 
+# We provide our own version of __divdf3 that performs better and has
+# better support for non-default rounding modes.
+DPBIT_FUNCS := $(filter-out _div_df, $(DPBIT_FUNCS))
diff --git a/libgcc/config/t-fdpbit b/libgcc/config/t-fdpbit
new file mode 100644
--- /dev/null
+++ b/libgcc/config/t-fdpbit
@@ -0,0 +1,2 @@ 
+FPBIT = true
+DPBIT = true
diff --git a/libgcc/config/t-fpbit b/libgcc/config/t-fpbit
new file mode 100644
--- /dev/null
+++ b/libgcc/config/t-fpbit
@@ -0,0 +1,2 @@ 
+FPBIT = true
+FPBIT_CFLAGS = -DFLOAT_ONLY -DSMALL_MACHINE
diff --git a/libgcc/configure.ac b/libgcc/configure.ac
--- a/libgcc/configure.ac
+++ b/libgcc/configure.ac
@@ -152,6 +152,13 @@  GCC_NO_EXECUTABLES
 AC_PROG_CC
 AC_PROG_CPP_WERROR
 
+AC_CHECK_SIZEOF([double])
+AC_CHECK_SIZEOF([long double])
+AS_VAR_ARITH([double_type_size], [$ac_cv_sizeof_double \* 8])
+AS_VAR_ARITH([long_double_type_size], [$ac_cv_sizeof_long_double \* 8])
+AC_SUBST(double_type_size)
+AC_SUBST(long_double_type_size)
+
 # Check for decimal float support.
 AC_CACHE_CHECK([whether decimal floating point is supported], [libgcc_cv_dfp],
 	       [AC_COMPILE_IFELSE([_Decimal32 x;], [libgcc_cv_dfp=yes],
diff --git a/gcc/config/fp-bit.c b/libgcc/fp-bit.c
rename from gcc/config/fp-bit.c
rename to libgcc/fp-bit.c
--- a/gcc/config/fp-bit.c
+++ b/libgcc/fp-bit.c
@@ -1,7 +1,7 @@ 
 /* This is a software floating point library which can be used
    for targets without hardware floating point. 
    Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003,
-   2004, 2005, 2008, 2009, 2010 Free Software Foundation, Inc.
+   2004, 2005, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -37,7 +37,7 @@  see the files COPYING3 and COPYING.RUNTI
 #include "tconfig.h"
 #include "coretypes.h"
 #include "tm.h"
-#include "config/fp-bit.h"
+#include "fp-bit.h"
 
 /* The following macros can be defined to change the behavior of this file:
    FLOAT: Implement a `float', aka SFmode, fp library.  If this is not
diff --git a/gcc/config/fp-bit.h b/libgcc/fp-bit.h
rename from gcc/config/fp-bit.h
rename to libgcc/fp-bit.h
--- a/gcc/config/fp-bit.h
+++ b/libgcc/fp-bit.h
@@ -1,5 +1,5 @@ 
 /* Header file for fp-bit.c.  */
-/* Copyright (C) 2000, 2002, 2003, 2006, 2009, 2010
+/* Copyright (C) 2000, 2002, 2003, 2006, 2009, 2010, 2011
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -129,6 +129,14 @@  typedef unsigned int UTItype __attribute
 #define NO_DI_MODE
 #endif
 
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#define FLOAT_BIT_ORDER_MISMATCH
+#endif
+
+#if __BYTE_ORDER__ != __FLOAT_WORD_ORDER__
+#define FLOAT_WORD_ORDER_MISMATCH
+#endif
+
 #ifdef TFLOAT
 # ifndef TMODES
 #  error "TFLOAT requires long double to have 113 bits of mantissa"