From b588ae3074e258f5c736034c212e7499a565746f Mon Sep 17 00:00:00 2001 From: Georg-Johann Lay Date: Wed, 5 Sep 2012 08:47:50 +0000 Subject: re PR target/54461 ([avr] add configure option for better AVR-Libc integration) PR target/54461 * configure.ac (noconfigdirs,target=avr-*-*): Add target-newlib, target-libgloss if not configured --with-avrlibc=no. * configure: Regenerate. libgcc/ PR target/54461 * config.host (tmake_file,host=avr-*-*): Add avr/t-avrlibc if not configured --with-avrlibc=no. * config/avr/t-avrlibc: New file. * Makefile.in (FPBIT_FUNCS): filter-out LIB2FUNCS_EXCLUDE. (DPBIT_FUNCS): Ditto. (TPBIT_FUNCS): Ditto. gcc/ PR target/54461 * config.gcc (tm_file,target=avr-*-*): Add avr/avrlibc.h if not configured --with-avrlibc=no. (tm_defines,target=avr-*-*): Add WITH_AVRLIBC if not configured --with-avrlibc=no. * config/avr/avrlibc.h: New file. * config/avr/avr-c.c: Build-in define __WITH_AVRLIBC__ if not configured --with-avrlibc=no. * doc/invoke.texi (AVR Built-in Macros): Document __WITH_AVRLIBC__ From-SVN: r190967 --- libgcc/ChangeLog | 10 +++++++ libgcc/Makefile.in | 4 +++ libgcc/config.host | 3 +++ libgcc/config/avr/t-avrlibc | 66 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 83 insertions(+) create mode 100644 libgcc/config/avr/t-avrlibc (limited to 'libgcc') diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index ed5b2af..7ffb58c 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,13 @@ +2012-09-05 Georg-Johann Lay + + PR target/54461 + * config.host (tmake_file,host=avr-*-*): Add avr/t-avrlibc if + not configured --with-avrlibc=no. + * config/avr/t-avrlibc: New file. + * Makefile.in (FPBIT_FUNCS): filter-out LIB2FUNCS_EXCLUDE. + (DPBIT_FUNCS): Ditto. + (TPBIT_FUNCS): Ditto. + 2012-09-04 Teresa Johnson * libgcov.c (struct gcov_summary_buffer): New structure. diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in index 1de1b8e..43b14a0 100644 --- a/libgcc/Makefile.in +++ b/libgcc/Makefile.in @@ -516,6 +516,10 @@ FPBIT_FUNCS := $(filter-out _sf_to_tf,$(FPBIT_FUNCS)) DPBIT_FUNCS := $(filter-out _df_to_tf,$(DPBIT_FUNCS)) endif +FPBIT_FUNCS := $(filter-out $(LIB2FUNCS_EXCLUDE),$(FPBIT_FUNCS)) +DPBIT_FUNCS := $(filter-out $(LIB2FUNCS_EXCLUDE),$(DPBIT_FUNCS)) +TPBIT_FUNCS := $(filter-out $(LIB2FUNCS_EXCLUDE),$(TPBIT_FUNCS)) + fpbit-src := $(srcdir)/fp-bit.c # Build FPBIT. diff --git a/libgcc/config.host b/libgcc/config.host index f9bab01..486b715 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -380,6 +380,9 @@ avr-*-rtems*) avr-*-*) # Make HImode functions for AVR tmake_file="${cpu_type}/t-avr t-fpbit" + if test x${with_avrlibc} != xno; then + tmake_file="$tmake_file ${cpu_type}/t-avrlibc" + fi tm_file="$tm_file avr/avr-lib.h" ;; bfin*-elf*) diff --git a/libgcc/config/avr/t-avrlibc b/libgcc/config/avr/t-avrlibc new file mode 100644 index 0000000..d2c8b87 --- /dev/null +++ b/libgcc/config/avr/t-avrlibc @@ -0,0 +1,66 @@ +# This file is used if not configured --with-avrlibc=no +# +# AVR-Libc comes with hand-optimized float routines. +# For historical reasons, these routines live in AVR-Libc +# and not in libgcc and use the same function names like libgcc. +# To get the best support, i.e. always use the routines from +# AVR-Libc, we remove these routines from libgcc. +# +# See also PR54461. +# +# +# Arithmetic: +# __addsf3 __subsf3 __divsf3 __mulsf3 __negsf2 +# +# Comparison: +# __cmpsf2 __unordsf2 +# __eqsf2 __lesf2 __ltsf2 __nesf2 __gesf2 __gtsf2 +# +# Conversion: +# __fixsfdi __fixunssfdi __floatdisf __floatundisf +# __fixsfsi __fixunssfsi __floatsisf __floatunsisf +# +# +# These functions are contained in modules: +# +# _addsub_sf.o: __addsf3 __subsf3 +# _mul_sf.o: __mulsf3 +# _div_sf.o: __divsf3 +# _negate_sf.o: __negsf2 +# +# _compare_sf.o: __cmpsf2 +# _unord_sf.o: __unordsf2 +# _eq_sf.o: __eqsf2 +# _ne_sf.o: __nesf2 +# _ge_sf.o: __gesf2 +# _gt_sf.o: __gtsf2 +# _le_sf.o: __lesf2 +# _lt_sf.o: __ltsf2 +# +# _fixsfdi.o: __fixsfdi +# _fixunssfdi.o: __fixunssfdi +# _fixunssfsi.o: __fixunssfsi +# _floatdisf.o: __floatdisf +# _floatundisf.o: __floatundisf +# _sf_to_si.o: __fixsfsi +# _si_to_sf.o: __floatsisf +# _usi_to_sf.o: __floatunsisf + + +# SFmode +LIB2FUNCS_EXCLUDE += \ + _addsub_sf \ + _negate_sf \ + _mul_sf _div_sf \ + \ + _compare_sf \ + _unord_sf \ + _eq_sf _ne_sf \ + _gt_sf _ge_sf \ + _lt_sf _le_sf \ + \ + _si_to_sf _sf_to_si \ + _usi_to_sf _sf_to_usi \ + _fixunssfsi _fixsfdi \ + _fixunssfdi \ + _floatdisf _floatundisf -- cgit v1.1