Enable libstdc++ compilation on AVR targets

Enable libstdc++ compilation in AVR targets with AVR-Libc. Most
floating point math functions are already defined in AVR-Libc, so
defines are in place to avoid multiple definition of these functions.

2016-12-06  Felipe Magno de Almeida  <felipe@expertisesolutions.com.br>

	* crossconfig.m4: Add avr target for cross-compilation.
	* configure: Regenerate.

From-SVN: r243309
This commit is contained in:
Felipe Magno de Almeida 2016-12-06 17:58:05 +00:00 committed by Jonathan Wakely
parent 34022d2b2e
commit 6649ad7efd
3 changed files with 80 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2016-12-06 Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
* crossconfig.m4: Add avr target for cross-compilation.
* configure: Regenerate.
2016-12-06 Jonathan Wakely <jwakely@redhat.com> 2016-12-06 Jonathan Wakely <jwakely@redhat.com>
* python/libstdcxx/v6/printers.py (StdVariantPrinter): Update for new * python/libstdcxx/v6/printers.py (StdVariantPrinter): Update for new

View File

@ -28902,6 +28902,55 @@ case "${host}" in
# This is a freestanding configuration; there is nothing to do here. # This is a freestanding configuration; there is nothing to do here.
;; ;;
avr*-*-*)
$as_echo "#define HAVE_ACOSF 1" >>confdefs.h
$as_echo "#define HAVE_ASINF 1" >>confdefs.h
$as_echo "#define HAVE_ATAN2F 1" >>confdefs.h
$as_echo "#define HAVE_ATANF 1" >>confdefs.h
$as_echo "#define HAVE_CEILF 1" >>confdefs.h
$as_echo "#define HAVE_COSF 1" >>confdefs.h
$as_echo "#define HAVE_COSHF 1" >>confdefs.h
$as_echo "#define HAVE_EXPF 1" >>confdefs.h
$as_echo "#define HAVE_FABSF 1" >>confdefs.h
$as_echo "#define HAVE_FLOORF 1" >>confdefs.h
$as_echo "#define HAVE_FMODF 1" >>confdefs.h
$as_echo "#define HAVE_FREXPF 1" >>confdefs.h
$as_echo "#define HAVE_SQRTF 1" >>confdefs.h
$as_echo "#define HAVE_HYPOTF 1" >>confdefs.h
$as_echo "#define HAVE_LDEXPF 1" >>confdefs.h
$as_echo "#define HAVE_LOG10F 1" >>confdefs.h
$as_echo "#define HAVE_LOGF 1" >>confdefs.h
$as_echo "#define HAVE_MODFF 1" >>confdefs.h
$as_echo "#define HAVE_POWF 1" >>confdefs.h
$as_echo "#define HAVE_SINF 1" >>confdefs.h
$as_echo "#define HAVE_SINHF 1" >>confdefs.h
$as_echo "#define HAVE_TANF 1" >>confdefs.h
$as_echo "#define HAVE_TANHF 1" >>confdefs.h
;;
mips*-sde-elf*) mips*-sde-elf*)
# These definitions are for the SDE C library rather than newlib. # These definitions are for the SDE C library rather than newlib.
SECTION_FLAGS='-ffunction-sections -fdata-sections' SECTION_FLAGS='-ffunction-sections -fdata-sections'

View File

@ -9,6 +9,32 @@ case "${host}" in
# This is a freestanding configuration; there is nothing to do here. # This is a freestanding configuration; there is nothing to do here.
;; ;;
avr*-*-*)
AC_DEFINE(HAVE_ACOSF)
AC_DEFINE(HAVE_ASINF)
AC_DEFINE(HAVE_ATAN2F)
AC_DEFINE(HAVE_ATANF)
AC_DEFINE(HAVE_CEILF)
AC_DEFINE(HAVE_COSF)
AC_DEFINE(HAVE_COSHF)
AC_DEFINE(HAVE_EXPF)
AC_DEFINE(HAVE_FABSF)
AC_DEFINE(HAVE_FLOORF)
AC_DEFINE(HAVE_FMODF)
AC_DEFINE(HAVE_FREXPF)
AC_DEFINE(HAVE_SQRTF)
AC_DEFINE(HAVE_HYPOTF)
AC_DEFINE(HAVE_LDEXPF)
AC_DEFINE(HAVE_LOG10F)
AC_DEFINE(HAVE_LOGF)
AC_DEFINE(HAVE_MODFF)
AC_DEFINE(HAVE_POWF)
AC_DEFINE(HAVE_SINF)
AC_DEFINE(HAVE_SINHF)
AC_DEFINE(HAVE_TANF)
AC_DEFINE(HAVE_TANHF)
;;
mips*-sde-elf*) mips*-sde-elf*)
# These definitions are for the SDE C library rather than newlib. # These definitions are for the SDE C library rather than newlib.
SECTION_FLAGS='-ffunction-sections -fdata-sections' SECTION_FLAGS='-ffunction-sections -fdata-sections'