diff mbox

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

Message ID yddbowzv35g.fsf@manam.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth July 12, 2011, 5:07 p.m. UTC
This patch is a bit more involved because it touches many targets, but
it allows for an enormous simplification of our configuration.  We
currently have many copies of the makefile snippets to build
[fdt]p-bit.o, which are removed by this patch.

Instead, it includes the definitions of of DFLOAT and TFLOAT directly in
the libgcc/Makefile.in rules, provides three t-* files for the cases
found:

* float-only (t-fpbit)

* float and double (t-fdpbit)

* long double (mips/t-fpbit, mips-only)

As Joseph previously noted, the definitions of FLOAT_BIT_ORDER_MISMATCH
seem to correspond to little-endian targets, so I'm making this
explicit.

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've also moved rs6000/ppc64-fp.c over since it depends on the fp-bit.h
header.

One of my targets it affected (IRIX 6.5), so I've tested the patch with
a mips-sgi-irix6.5 non-bootstrap C-only build without regressions.
A powerpc-apple-darwin9.8.0 bootstrap is currently running and is at
least well beyond stage1, so this stuff still builds.

I'm not including any of the affected target maintainers in the Cc:
since there are far too many of them, but I don't think there's anything
particularly problematic in this patch.

How best to proceed with this patch?

Thanks.
        Rainer


2011-06-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc:
	* Makefile.in (FPBIT_FUNCS, DPBIT_FUNCS, TPBIT_FUNCS): Remove.
	(libgcc-support): Remove $(FPBIT), $(DPBIT), $(TPBIT)
	dependencies.
	(libgcc.mvars): Remove FPBIT, FPBIT_FUNCS, DPBIT, DPBIT_FUNCS,
	TPBIT, TPBIT_FUNCS.
	* config/fp-bit.c, config/fp-bit.h: Move to ../libgcc.
	* config/arm/t-strongarm-elf (FPBIT, DPBIT, dp-bit.c, fp-bit.c):
	Remove.
	* config/arm/t-vxworks: Likewise.
	* config/arm/t-wince-pe: Likewise.
	* config/avr/t-avr (fp-bit.c, FPBIT): Remove.
	* config/bfin/t-bfin (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
	* config/bfin/t-bfin-elf: Likewise.
	* config/bfin/t-bfin-linux: Likewise.
	* config/bfin/t-bfin-uclinux: Likewise.
	* config/cris/t-cris (FPBIT, DPBIT, dp-bit.c, tmplibgcc_fp_bit.c):
	Remove.
	* config/fr30/t-fr30: Likewise.
	* config/frv/t-frv: Likewise.
	* config/h8300/t-h8300 (FPBIT, fp-bit.c): Remove.
	* config/iq2000/t-iq2000 (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
	* config/m32c/t-m32c: Likewise.
	* config/m32r/t-linux: (LIB2FUNCS_EXTRA, fp-bit.c, dp-bit.c): Remove.
	* config/m32r/t-m32r (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
	* config/mcore/t-mcore: Likewise.
	* config/mep/t-mep: Likewise.
	* config/microblaze/t-microblaze: Likewise.
	* config/mips/t-linux64 (TPBIT, tp-bit.c): Remove.
	* config/mips/t-mips (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
	* config/mips/t-sdemtk (FPBIT, DPBIT): Remove.
	* config/mips/t-sr71k (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
	* config/mn10300/t-linux: Remove.
	* config/mn10300/t-mn10300 (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
	* config/pdp11/t-pdp11: Likewise.
	* config/picochip/t-picochip (FPBIT, fp-bit.c): Remove.
	* config/rs6000/ppc64-fp.c: Move to ../libgcc/config/rs6000.
	* config/rs6000/t-aix43 (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
	(LIB2FUNCS_EXTRA): Remove $(srcdir)/config/rs6000/ppc64-fp.c.
	* config/rs6000/t-aix52: Likewise.
	* config/rs6000/t-darwin (LIB2FUNCS_EXTRA): Remove
	$(srcdir)/config/rs6000/ppc64-fp.c.
	* config/rs6000/t-fprules-fpbit: Remove.
	* config/rs6000/t-linux64 (LIB2FUNCS_EXTRA): Remove.
	* config/rs6000/t-lynx (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
	* config/sh/t-netbsd (FPBIT, DPBIT): Remove.
	* config/sh/t-sh (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
	* config/sparc/t-elf: Likewise.
	* config/sparc/t-leon: Likewise.
	* config/sparc/t-leon3: Likewise.
	* config/spu/t-spu-elf: Likewise.
	(DPBIT_FUNCS): Remove.
	* config/stormy16/t-stormy16 (FPBIT, DPBIT, dp-bit.c, fp-bit.c): Remove.
	* config/v850/t-v850: Likewise.
	* config.gcc (arm*-*-freebsd*): Add arm/fwom.h to libgcc_tm_file.
	(arm*-wince-pe*): Likewise.
	(avr-*-rtems*): Add avr/avr-lib.h to libgcc_tm_file.
	(avr-*-*): Likewise.
	(h8300-*-rtems*, h8300-*-elf*): Set libgcc_tm_file.
	(powerpc-*-eabisimaltivec*): Remove
	rs6000/t-fprules-fpbit from tmake_file.
	(powerpc-*-eabisim*): Likewise.
	(powerpc-*-elf*): Likewise.
	(powerpc-*-eabialtivec*): Likewise.
	(powerpc-xilinx-eabi*): Likewise.
	(powerpc-*-eabi*): Likewise.
	(powerpc-*-rtems*): Likewise.
	(powerpc-wrs-vxworks): Likewise.
	(powerpcle-*-elf*): Likewise.
	(powerpcle-*-eabisim*): Likewise.
	(powerpcle-*-eabi*): Likewise.
	(rx-*-elf*): Add rx/rx-lib.h to libgcc_tm_file.
	(am33_2.0-*-linux*): Remove tmake_file.
	* doc/fragments.texi (Target Fragment, Floating Point Emulation):
	Remove.

	gcc/po:
	* EXCLUDES (config/fp-bit.c, config/fp-bit.h): Remove.

	libgcc:
	* Makefile.in: Remove $(fpbit-in-libgcc) support.
	(FPBIT_FUNCS, DPBIT_FUNCS, TPBIT_FUNCS): New variables.
	(fpbit-src): New variable.
	($(fpbit-o), $(fpbit-s-o)): Use $(fpbit-src) instead of $(FPBIT).
	Compile with -DFLOAT $(FPBIT_CFLAGS).
	Use $<.
	($(dpbit-o), $(dpbit-s-o)): Use $(fpbit-src) instead of $(DPBIT).
	Compile with $(FPBIT_CFLAGS).
	Use $<.
	($(tpbit-o), $(tpbit-s-o): Use $(fpbit-src) instead of $(TPBIT).
	Compile with -DFLOAT $(TPBIT_CFLAGS).
	Use $<.
	* fp-bit.c, fp-bit.h: New files.
	* config/arm/fwom.h: New file.
	* config/avr/avr-lib.h: New file.
	* config.host (m32c*-*-*): Add t-fdpbit to tmake_file.
	(mips*-*-*): Likewise.
	(arm-wrs-vxworks): Likewise.
	(arm*-*-freebsd*): Likewise.
	(avr-*-rtems*): Add t-fpbit to tmake_file.
	(avr-*-*): Likewise.
	(bfin*-elf*): Add t-fdpbit to tmake_file.
	(bfin*-uclinux*): Likewise.
	(bfin*-linux-uclibc*): Likewise.
	(bfin*-rtems*): New case.
	Add t-fdpbit to tmake_file.
	(bfin*-*): Add t-fdpbit to tmake_file.
	(crisv32-*-elf): Likewise.
	(cris-*-linux*): Likewise.
	(fr30-*-elf): Likewise.
	(frv-*-elf, frv-*-*linux*): Likewise.
	(h8300-*-rtems*, h8300-*-elf*): Add t-fpbit to tmake_file.
	(iq2000*-*-elf*): Add t-fdpbit to tmake_file.
	(m32r-*-elf*): Likewise.
	(m32rle-*-elf*): Likewise.
	(m32r-*-linux*): Likewise.
	(m32rle-*-linux*): Likewise.
	(mcore-*-elf): Add t-fdpbit to tmake_file.
	(microblaze*-*-*): Likewise.
	(mips-sgi-irix6.5*): Add t-tpbit to tmake_file.
	(mips*-*-netbsd*): Add mips/t-mips to tmake_file.
	(mips64*-*-linux*): Also handle mipsisa64*-*-linux*.
	Fix typo.
	Add mips/t-tpbit to tmake-file.
	(mips*-*-linux*): Fix typo.
	(mips*-sde-elf*): New case
	Add mips/t-sdemtk unless using newlib.
	(mipsisa64sr71k-*-elf*): Add t-fdpbit to tmake_file.
	(mipsisa64sb1-*-elf*): Add mips/t-mips to tmake_file.
	(mn10300-*-*): Likewise.
	(pdp11-*-*): Likewise.
	(picochip-*-*): Add t-fpbit to tmake_file.
	(rs6000-ibm-aix4.[3456789]*, rs6000-ibm-aix5.1.*): Add t-fdpbit,
	rs6000/t-ppc64-fp to tmake_file.
	(rs6000-ibm-aix[56789].*): Likewise.
	(powerpc-*-eabispe*): Likewise.
	(powerpc-*-eabisimaltivec*): Likewise.
	(powerpc-*-eabisim*): Likewise.
	(powerpc-*-elf*): Likewise.
	(powerpc-*-eabialtivec*): Likewise.
	(powerpc-xilinx-eabi*): New case.
	Add t-fdpbit to tmake_file.
	(powerpc-*-eabi*):  Add t-fdpbit to tmake_file.
	(powerpc-*-rtems*): Likewise.
	(powerpc-*-linux*): Add rs6000/t-ppc64-fp to tmake_file if 64-bit.
	(powerpc-wrs-vxworks): Add t-fdpbit to tmake_file.
	(powerpc-*-lynxos*): Likewise.
	(powerpcle-*-elf*): Likewise.
	(powerpcle-*-eabisim*): Likewise.
	(powerpcle-*-eabi*): Likewise.
	(rx-*-elf): Likewise.
	(sh-*-elf*, sh-*-linux*, sh*-*-netbsd*): Add t-fdpbit to
	tmake_file except on sh*-*-netbsd*.
	(sh-*-rtems*): Likewise.
	(sh-wrs-vxworks): Likewise.
	(sparc-*-elf*): Use t-fdpbit instead of sparc/t-softfp.
	(sparc-*-linux*): Add t-fdpbit to tmake_file for *-leon*.
	(sparc-*-rtems*, sparc64-*-rtems*): Split off ...
	(sparc64-*-rtems*): ... new case.
	(sparc-*-rtems*): Add t-fdpbit to tmake_file.
	(spu-*-elf*): Likewise.
	Add spu/t-spu-elf to tmake_file.
	(v850*-*-*): Add t-fdpbit to tmake_file.
	(xstormy16-*-elf): Likewise.
	(am33_2.0-*-linux*): Add t-fdpbit to tmake_file.
	(mep*-*-*): Likewise.
	* config/h8300/h8300-lib.h: New file.
	* config/mips/t-irix6 (TPBIT, $(gcc_objdir)/tp-bit.c): Remove.
	* config/mips/t-mips: New file.
	* config/mips/t-sdemtk: New file.
	* config/rs6000/ppc64-fp.c: New file.
	* config/rs6000/t-darwin (LIB2ADD): Add
	$(srcdir)/config/rs6000/ppc64-fp.c.
	* config/rs6000/t-ppc64-fp: New file.
	* config/rx/rx-lib.h: New file.
	* config/rx/t-rx (FPBIT): Set to true.
	($(gcc_objdir)/fp-bit.c): Remove.
	(DPBIT): Set to true only with -m64bit-doubles.
	($(gcc_objdir)/dp-bit.c): Remove.
	* config/sparc/t-softfp: Remove.
	* config/spu/t-spu-elf: New file.
	* config/t-fdpbit, config/t-fpbit: New files.

Comments

Richard Henderson July 12, 2011, 5:46 p.m. UTC | #1
On 07/12/2011 10:07 AM, 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.

Re QUIET_NAN_NEGATED, it seems like we should be able to make use
of the __builtin_nan("") function.

Perhaps

  if (isnan (src))
    {
      FLO_type ret = __builtin_nan("");
      if (sign)
	ret = -ret;
      return ret;
    }

... assuming __builtin_nan gets re-defined in fp-bit for the type
as appropriate.


r~
Joseph Myers July 21, 2011, 3:59 p.m. UTC | #2
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.

> 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.
>  #
> @@ -21,15 +21,3 @@ MULTILIB_DIRNAMES = n32 32 64
>  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

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.)
Rainer Orth July 22, 2011, 2:55 p.m. UTC | #3
Joseph,

>> -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
>
> 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?

Richard Sandiford already pointed this out in private mail.  My initial
analysis was based on the IRIX case, where long double has
__LDBL_MANT_DIG__ = 106 (ibm extended format), which is used for all
supported ABIs.  Unfortunately, I forgot that at least Linux/MIPS still
supports (or even defaults to) the O32 ABI, where double and long double
are both 64-bit.

> (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.)

That's one option, which I currently prefer.

RX has a similar issue, where I sort of solved it like this

ifneq ($(filter -m64bit-doubles,$(INTERNAL_CFLAGS)),)
DPBIT = true
endif

but it seems this cannot reliably be done on mips.  I see two possible
solutions:

* Provide fpbit_wrap_start/fpbit_wrap_end as in soft-fp, which is a
  general solution.

* Use configure tests.  My current preference would be to use
  AC_CHECK_SIZEOF([double]) (for rx) and AC_CHECK_SIZEOF([long double])
  (for mips) and substitute ac_cv_sizeof_double/ac_cv_sizeof_long_double
  (perhaps * 8) as make variables to do the test above.

Preferences?

	Rainer
Joseph Myers July 22, 2011, 3:17 p.m. UTC | #4
On Fri, 22 Jul 2011, Rainer Orth wrote:

> * Provide fpbit_wrap_start/fpbit_wrap_end as in soft-fp, which is a
>   general solution.
> 
> * Use configure tests.  My current preference would be to use
>   AC_CHECK_SIZEOF([double]) (for rx) and AC_CHECK_SIZEOF([long double])
>   (for mips) and substitute ac_cv_sizeof_double/ac_cv_sizeof_long_double
>   (perhaps * 8) as make variables to do the test above.
> 
> Preferences?

I prefer the configure test; the softfp_wrap_* settings should be seen as 
a workaround for not being able to vary gcc/ directory settings on a 
per-multilib basis, rather than as something to emulate in the toplevel 
libgcc directory.
diff mbox

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
@@ -1877,8 +1862,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)
@@ -1890,13 +1874,6 @@  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
@@ -821,6 +821,7 @@  arm-wrs-vxworks)
 	;;
 arm*-*-freebsd*)
 	tm_file="dbxelf.h elfos.h ${fbsd_tm_file} arm/elf.h arm/aout.h arm/freebsd.h arm/arm.h"
+	libgcc_tm_file="$libgcc_tm_file arm/fwom.h"
 	tmake_file="${tmake_file} arm/t-arm arm/t-strongarm-elf"
 	;;
 arm*-*-netbsdelf*)
@@ -923,18 +924,21 @@  arm*-*-elf)
 	;;
 arm*-wince-pe*)
 	tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h dbxcoff.h arm/pe.h arm/wince-pe.h"
+	libgcc_tm_file="$libgcc_tm_file arm/fwom.h"
 	tmake_file="arm/t-arm arm/t-wince-pe"
 	extra_options="${extra_options} arm/pe.opt"
 	extra_objs="pe.o"
 	;;
 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"
@@ -1031,10 +1035,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"
@@ -2018,7 +2024,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*)
@@ -2066,42 +2072,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"
@@ -2149,7 +2155,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
@@ -2174,18 +2180,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
 	;;
@@ -2236,7 +2242,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*)
@@ -2625,7 +2631,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
@@ -89,19 +89,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.
 #
@@ -21,15 +21,3 @@  MULTILIB_DIRNAMES = n32 32 64
 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
@@ -23,8 +23,6 @@ 
 
 #   These files are part of libgcc, or target headers provided by gcc.
 config/darwin-crt2.c
-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
@@ -255,6 +255,21 @@  objects = $(filter %$(objext),$^)
 LIBGCC_VER_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
@@ -444,34 +459,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
@@ -479,14 +485,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
@@ -494,14 +500,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
@@ -259,8 +261,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*)
 	;;
@@ -301,40 +305,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*)
 	;;
@@ -453,6 +473,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"
@@ -463,12 +484,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*)
 	;;
@@ -487,29 +512,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*)
@@ -519,6 +556,7 @@  mipsisa64-*-elf* | mipsisa64el-*-elf*)
 mipsisa64r2-*-elf* | mipsisa64r2el-*-elf*)
 	;;
 mipsisa64sr71k-*-elf*)
+	tmake_file=t-fdpbit
         ;;
 mipsisa64sb1-*-elf* | mipsisa64sb1el-*-elf*)
 	;;
@@ -541,15 +579,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
@@ -570,47 +610,63 @@  powerpc-*-freebsd*)
 powerpc-*-netbsd*)
 	;;
 powerpc-*-eabispe*)
-	tmake_file="${tmake_file} rs6000/t-ppccomm"
+	tmake_file="${tmake_file} rs6000/t-ppccomm t-fdpbit"
 	;;
 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"
@@ -632,14 +688,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*)
 	;;
@@ -653,16 +720,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*)
@@ -674,6 +746,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*)
@@ -686,8 +762,10 @@  sparc64-*-linux*)		# 64-bit SPARC's runn
 sparc64-*-netbsd*)
 	;;
 spu-*-elf*)
+	tmake_file="t-fdpbit spu/t-spu-elf"
 	;;
 v850*-*-*)
+	tmake_file=t-fdpbit
 	;;
 vax-*-linux*)
 	;;
@@ -696,6 +774,7 @@  vax-*-netbsdelf*)
 vax-*-openbsd*)
 	;;
 xstormy16-*-elf)
+	tmake_file=t-fdpbit
 	;;
 xtensa*-*-elf*)
 	tmake_file=xtensa/t-xtensa
@@ -706,10 +785,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/arm/fwom.h b/libgcc/config/arm/fwom.h
new file mode 100644
--- /dev/null
+++ b/libgcc/config/arm/fwom.h
@@ -0,0 +1,3 @@ 
+#ifndef __ARMEB__
+#define FLOAT_WORD_ORDER_MISMATCH
+#endif
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,2 @@ 
+TPBIT = true
+TPBIT_CFLAGS = -DQUIET_NAN_NEGATED
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
@@ -1,3 +1,5 @@ 
+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
+ifneq ($(filter -m64bit-doubles,$(INTERNAL_CFLAGS)),)
+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-spu-elf b/libgcc/config/spu/t-spu-elf
new file mode 100644
--- /dev/null
+++ b/libgcc/config/spu/t-spu-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/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,10 @@  typedef unsigned int UTItype __attribute
 #define NO_DI_MODE
 #endif
 
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#define FLOAT_BIT_ORDER_MISMATCH
+#endif
+
 #ifdef TFLOAT
 # ifndef TMODES
 #  error "TFLOAT requires long double to have 113 bits of mantissa"