From: Felipe Magno de Almeida Date: Tue, 6 Dec 2016 17:58:05 +0000 (+0000) Subject: Enable libstdc++ compilation on AVR targets X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6649ad7efdd583d84099beb5ee2b03a0ed28b9ee;p=gcc.git 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 * crossconfig.m4: Add avr target for cross-compilation. * configure: Regenerate. From-SVN: r243309 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 56628091666..face139ee0f 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2016-12-06 Felipe Magno de Almeida + + * crossconfig.m4: Add avr target for cross-compilation. + * configure: Regenerate. + 2016-12-06 Jonathan Wakely * python/libstdcxx/v6/printers.py (StdVariantPrinter): Update for new diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 1f72e3ff9bb..cbd77f002bd 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -28902,6 +28902,55 @@ case "${host}" in # 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*) # These definitions are for the SDE C library rather than newlib. SECTION_FLAGS='-ffunction-sections -fdata-sections' diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4 index 4eaf20855f3..8cc788cf392 100644 --- a/libstdc++-v3/crossconfig.m4 +++ b/libstdc++-v3/crossconfig.m4 @@ -9,6 +9,32 @@ case "${host}" in # 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*) # These definitions are for the SDE C library rather than newlib. SECTION_FLAGS='-ffunction-sections -fdata-sections'