The next patch in the `move to toplevel libgcc' series is hopefully easier to get review and approval for. This one moves dfp-bit and related build stuff to libgcc. I think it's completely straight forward: it moves D{32, 64, 128}PBIT{, _FUNCS}, related Makefile fragments, and the source files themselves over. The only part that may require revision is the location of dfp-bit.? in libgcc: I've kept them in libgcc/config, as they lived in gcc/config before, but one might as well argue that they are generic and belong into libgcc itself.
Bootstrapped without regressions on x86_64-unknown-linux-gnu. Ok for mainline? Thanks. Rainer 2011-06-22 Rainer Orth <r...@cebitec.uni-bielefeld.de> gcc: * config/dfp-bit.c, config/dfp-bit.h: Move to ../libgcc/config. * config/t-dfprules: Likewise. * config.gcc (i[34567]86-*-linux*, i[34567]86-*-kfreebsd*-gnu, i[34567]86-*-knetbsd*-gnu, i[34567]86-*-gnu*, i[34567]86-*-kopensolaris*-gnu): Remove t-dfprules from tmake_file. (x86_64-*-linux*, x86_64-*-kfreebsd*-gnu, x86_64-*-knetbsd*-gnu): Likewise. (i[34567]86-*-cygwin*): Likewise. (i[34567]86-*-mingw*, x86_64-*-mingw*): Likewise. (powerpc-*-linux*, powerpc64-*-linux*): Likewise. * Makefile.in (D32PBIT_FUNCS, D64PBIT_FUNCS, D128PBIT_FUNCS): Remove. (libgcc.mvars): Remove DFP_ENABLE, DFP_CFLAGS, D32PBIT_FUNCS, D64PBIT_FUNCS, D128PBIT_FUNCS. libgcc: * config/dfp-bit.c, config/dfp-bit.h: New files. * Makefile.in (D32PBIT_FUNCS, D64PBIT_FUNCS, D128PBIT_FUNCS): New variables. ($(d32pbit-o)): Use $(srcdir) to refer to dfp-bit.c ($(d64pbit-o)): Likewise. ($(d128pbit-o)): Likewise. * config/t-dfprules: New file. * config.host (i[34567]86-*-linux*, i[34567]86-*-kfreebsd*-gnu, i[34567]86-*-knetbsd*-gnu, i[34567]86-*-gnu*, i[34567]86-*-kopensolaris*-gnu): Add t-dfprules to tmake_file. (x86_64-*-linux*, x86_64-*-kfreebsd*-gnu, x86_64-*-knetbsd*-gnu): Likewise. (i[34567]86-*-cygwin*): Likewise. (i[34567]86-*-mingw*, x86_64-*-mingw*): Likewise. (powerpc-*-linux*, powerpc64-*-linux*): Likewise. diff --git a/gcc/Makefile.in b/gcc/Makefile.in --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1548,30 +1548,6 @@ TPBIT_FUNCS = _pack_tf _unpack_tf _addsu _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 -D32PBIT_FUNCS = _addsub_sd _div_sd _mul_sd _plus_sd _minus_sd \ - _eq_sd _ne_sd _lt_sd _gt_sd _le_sd _ge_sd \ - _sd_to_si _sd_to_di _sd_to_usi _sd_to_udi \ - _si_to_sd _di_to_sd _usi_to_sd _udi_to_sd \ - _sd_to_sf _sd_to_df _sd_to_xf _sd_to_tf \ - _sf_to_sd _df_to_sd _xf_to_sd _tf_to_sd \ - _sd_to_dd _sd_to_td _unord_sd _conv_sd - -D64PBIT_FUNCS = _addsub_dd _div_dd _mul_dd _plus_dd _minus_dd \ - _eq_dd _ne_dd _lt_dd _gt_dd _le_dd _ge_dd \ - _dd_to_si _dd_to_di _dd_to_usi _dd_to_udi \ - _si_to_dd _di_to_dd _usi_to_dd _udi_to_dd \ - _dd_to_sf _dd_to_df _dd_to_xf _dd_to_tf \ - _sf_to_dd _df_to_dd _xf_to_dd _tf_to_dd \ - _dd_to_sd _dd_to_td _unord_dd _conv_dd - -D128PBIT_FUNCS = _addsub_td _div_td _mul_td _plus_td _minus_td \ - _eq_td _ne_td _lt_td _gt_td _le_td _ge_td \ - _td_to_si _td_to_di _td_to_usi _td_to_udi \ - _si_to_td _di_to_td _usi_to_td _udi_to_td \ - _td_to_sf _td_to_df _td_to_xf _td_to_tf \ - _sf_to_td _df_to_td _xf_to_td _tf_to_td \ - _td_to_sd _td_to_dd _unord_td _conv_td - # 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 @@ -1929,14 +1905,6 @@ libgcc.mvars: config.status Makefile $(L echo DPBIT_FUNCS = '$(DPBIT_FUNCS)' >> tmp-libgcc.mvars echo TPBIT = '$(TPBIT)' >> tmp-libgcc.mvars echo TPBIT_FUNCS = '$(TPBIT_FUNCS)' >> tmp-libgcc.mvars - echo DFP_ENABLE = '$(DFP_ENABLE)' >> tmp-libgcc.mvars - echo DFP_CFLAGS='$(DFP_CFLAGS)' >> tmp-libgcc.mvars - echo D32PBIT='$(D32PBIT)' >> tmp-libgcc.mvars - echo D32PBIT_FUNCS='$(D32PBIT_FUNCS)' >> tmp-libgcc.mvars - echo D64PBIT='$(D64PBIT)' >> tmp-libgcc.mvars - echo D64PBIT_FUNCS='$(D64PBIT_FUNCS)' >> tmp-libgcc.mvars - echo D128PBIT='$(D128PBIT)' >> tmp-libgcc.mvars - echo D128PBIT_FUNCS='$(D128PBIT_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 @@ -1299,7 +1299,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfree i[34567]86-*-kopensolaris*-gnu) tm_file="${tm_file} i386/gnu-user.h kopensolaris-gnu.h i386/kopensolaris-gnu.h" ;; i[34567]86-*-gnu*) tm_file="$tm_file i386/gnu-user.h gnu.h i386/gnu.h";; esac - tmake_file="${tmake_file} i386/t-crtstuff i386/t-crtpc i386/t-crtfm t-dfprules" + tmake_file="${tmake_file} i386/t-crtstuff i386/t-crtpc i386/t-crtfm" ;; x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu) tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h \ @@ -1311,7 +1311,7 @@ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu x86_64-*-kfreebsd*-gnu) tm_file="${tm_file} kfreebsd-gnu.h i386/kfreebsd-gnu64.h" ;; x86_64-*-knetbsd*-gnu) tm_file="${tm_file} knetbsd-gnu.h" ;; esac - tmake_file="${tmake_file} i386/t-linux64 i386/t-crtstuff i386/t-crtpc i386/t-crtfm t-dfprules" + tmake_file="${tmake_file} i386/t-linux64 i386/t-crtstuff i386/t-crtpc i386/t-crtfm" ;; i[34567]86-pc-msdosdjgpp*) xm_file=i386/xm-djgpp.h @@ -1430,7 +1430,7 @@ i[34567]86-*-cygwin*) else tmake_dlldir_file="i386/t-dlldir-x" fi - tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} i386/t-cygming i386/t-cygwin t-dfprules" + tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} i386/t-cygming i386/t-cygwin" target_gtfiles="\$(srcdir)/config/i386/winnt.c" extra_options="${extra_options} i386/cygming.opt" extra_objs="winnt.o winnt-stubs.o" @@ -1496,7 +1496,7 @@ i[34567]86-*-mingw* | x86_64-*-mingw*) else tmake_dlldir_file="i386/t-dlldir-x" fi - tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} i386/t-cygming t-dfprules" + tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} i386/t-cygming" case ${target} in x86_64-w64-*) tmake_file="${tmake_file} i386/t-mingw-w64" @@ -2078,7 +2078,7 @@ powerpc-*-rtems*) powerpc-*-linux* | powerpc64-*-linux*) tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h" extra_options="${extra_options} rs6000/sysv4.opt" - tmake_file="t-dfprules rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm" + tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm" maybe_biarch=yes case ${target} in powerpc64-*-linux*spe* | powerpc64-*-linux*paired*) diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in --- a/libgcc/Makefile.in +++ b/libgcc/Makefile.in @@ -569,6 +569,30 @@ endif libgcc-objects += $(decbits-objects) # Next build individual support functions. +D32PBIT_FUNCS = _addsub_sd _div_sd _mul_sd _plus_sd _minus_sd \ + _eq_sd _ne_sd _lt_sd _gt_sd _le_sd _ge_sd \ + _sd_to_si _sd_to_di _sd_to_usi _sd_to_udi \ + _si_to_sd _di_to_sd _usi_to_sd _udi_to_sd \ + _sd_to_sf _sd_to_df _sd_to_xf _sd_to_tf \ + _sf_to_sd _df_to_sd _xf_to_sd _tf_to_sd \ + _sd_to_dd _sd_to_td _unord_sd _conv_sd + +D64PBIT_FUNCS = _addsub_dd _div_dd _mul_dd _plus_dd _minus_dd \ + _eq_dd _ne_dd _lt_dd _gt_dd _le_dd _ge_dd \ + _dd_to_si _dd_to_di _dd_to_usi _dd_to_udi \ + _si_to_dd _di_to_dd _usi_to_dd _udi_to_dd \ + _dd_to_sf _dd_to_df _dd_to_xf _dd_to_tf \ + _sf_to_dd _df_to_dd _xf_to_dd _tf_to_dd \ + _dd_to_sd _dd_to_td _unord_dd _conv_dd + +D128PBIT_FUNCS = _addsub_td _div_td _mul_td _plus_td _minus_td \ + _eq_td _ne_td _lt_td _gt_td _le_td _ge_td \ + _td_to_si _td_to_di _td_to_usi _td_to_udi \ + _si_to_td _di_to_td _usi_to_td _udi_to_td \ + _td_to_sf _td_to_df _td_to_xf _td_to_tf \ + _sf_to_td _df_to_td _xf_to_td _tf_to_td \ + _td_to_sd _td_to_dd _unord_td _conv_td + ifeq ($(enable_decimal_float),bid) ifneq ($(D32PBIT),) D32PBIT_FUNCS:=$(filter-out _plus_sd _minus_sd _conv_sd, $(D32PBIT_FUNCS)) @@ -588,7 +612,7 @@ d32pbit-o = $(patsubst %,%$(objext),$(D3 ifeq ($(enable_decimal_float),bid) $(d32pbit-o): %$(objext): $(srcdir)/config/libbid/%.c else -$(d32pbit-o): %$(objext): $(gcc_srcdir)/config/dfp-bit.c +$(d32pbit-o): %$(objext): $(srcdir)/config/dfp-bit.c endif $(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* -DWIDTH=32 -c $< libgcc-objects += $(d32pbit-o) @@ -599,7 +623,7 @@ d64pbit-o = $(patsubst %,%$(objext),$(D6 ifeq ($(enable_decimal_float),bid) $(d64pbit-o): %$(objext): $(srcdir)/config/libbid/%.c else -$(d64pbit-o): %$(objext): $(gcc_srcdir)/config/dfp-bit.c +$(d64pbit-o): %$(objext): $(srcdir)/config/dfp-bit.c endif $(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* -DWIDTH=64 -c $< libgcc-objects += $(d64pbit-o) @@ -610,7 +634,7 @@ d128pbit-o = $(patsubst %,%$(objext),$(D ifeq ($(enable_decimal_float),bid) $(d128pbit-o): %$(objext): $(srcdir)/config/libbid/%.c else -$(d128pbit-o): %$(objext): $(gcc_srcdir)/config/dfp-bit.c +$(d128pbit-o): %$(objext): $(srcdir)/config/dfp-bit.c endif $(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* -DWIDTH=128 -c $< libgcc-objects += $(d128pbit-o) diff --git a/libgcc/config.host b/libgcc/config.host --- a/libgcc/config.host +++ b/libgcc/config.host @@ -379,12 +379,12 @@ i[34567]86-*-openbsd*) ;; i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu) extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" - tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm" + tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm t-dfprules" md_unwind_header=i386/linux-unwind.h ;; x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu) extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" - tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm" + tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm t-dfprules" md_unwind_header=i386/linux-unwind.h ;; i[34567]86-pc-msdosdjgpp*) @@ -413,14 +413,15 @@ i[4567]86-wrs-vxworks|i[4567]86-wrs-vxwo ;; i[34567]86-*-cygwin*) extra_parts="crtbegin.o crtend.o crtfastmath.o" - tmake_file="i386/t-cygming i386/t-crtfm" + tmake_file="i386/t-cygming i386/t-crtfm t-dfprules" ;; i[34567]86-*-mingw*) extra_parts="crtbegin.o crtend.o crtfastmath.o" - tmake_file="i386/t-cygming i386/t-crtfm" + tmake_file="i386/t-cygming i386/t-crtfm t-dfprules" md_unwind_header=i386/w32-unwind.h ;; x86_64-*-mingw*) + tmake_file=t-dfprules ;; i[34567]86-*-interix3*) ;; @@ -581,7 +582,7 @@ powerpc-*-eabi*) powerpc-*-rtems*) ;; powerpc-*-linux* | powerpc64-*-linux*) - tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128 t-softfp" + tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128 t-softfp t-dfprules" md_unwind_header=rs6000/linux-unwind.h ;; powerpc-wrs-vxworks|powerpc-wrs-vxworksae) diff --git a/gcc/config/dfp-bit.c b/libgcc/config/dfp-bit.c rename from gcc/config/dfp-bit.c rename to libgcc/config/dfp-bit.c diff --git a/gcc/config/dfp-bit.h b/libgcc/config/dfp-bit.h rename from gcc/config/dfp-bit.h rename to libgcc/config/dfp-bit.h diff --git a/gcc/config/t-dfprules b/libgcc/config/t-dfprules rename from gcc/config/t-dfprules rename to libgcc/config/t-dfprules -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University