RFA: Add libstdc++-v3 support for avr 3/7: libstdc+-v3 avr configuration
Joern Rennecke
joern.rennecke@embecosm.com
Tue Oct 21 15:48:00 GMT 2014
-------------- next part --------------
libstdc++-v3:
2013-06-14 Joern Rennecke <joern.rennecke@embecosm.com>
* configure.ac [avr-*-*]: Don't use AC_LIBTOOL_DLOPEN.
* crossconfig.m4: Add avr-*-* settings.
* configure: Regenerate.
Index: configure.ac
===================================================================
--- configure.ac (revision 216243)
+++ configure.ac (working copy)
@@ -90,7 +90,13 @@ AH_TEMPLATE(VERSION, [Version number of
# Libtool setup.
if test "x${with_newlib}" != "xyes"; then
- AC_LIBTOOL_DLOPEN
+ case "${host}" in
+ avr-*-*)
+ ;;
+ *)
+ AC_LIBTOOL_DLOPEN
+ ;;
+ esac
fi
AM_PROG_LIBTOOL
ACX_LT_HOST_FLAGS
Index: crossconfig.m4
===================================================================
--- crossconfig.m4 (revision 216243)
+++ crossconfig.m4 (working copy)
@@ -9,6 +9,37 @@ AC_DEFUN([GLIBCXX_CROSSCONFIG],[
# This is a freestanding configuration; there is nothing to do here.
;;
+ avr-*-*)
+ AC_DEFINE(HAVE_ISINF)
+ AC_DEFINE(HAVE_ISNAN)
+ AC_DEFINE(HAVE_HYPOT)
+
+ # ??? avr-libc/include/math.h used crude defines for float functions.
+ # Should we rather disable these for c++ than acknowledge them?
+ AC_DEFINE(HAVE_FABSF)
+ AC_DEFINE(HAVE_ACOSF)
+ AC_DEFINE(HAVE_ASINF)
+ AC_DEFINE(HAVE_ATANF)
+ AC_DEFINE(HAVE_ATAN2F)
+ AC_DEFINE(HAVE_CEILF)
+ AC_DEFINE(HAVE_COSF)
+ AC_DEFINE(HAVE_COSHF)
+ AC_DEFINE(HAVE_EXPF)
+ 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_LOGF)
+ AC_DEFINE(HAVE_LOG10F)
+ 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'
Index: configure
===================================================================
--- configure (revision 216243)
+++ configure (working copy)
@@ -5301,10 +5301,16 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&
# Libtool setup.
if test "x${with_newlib}" != "xyes"; then
- enable_dlopen=yes
+ case "${host}" in
+ avr-*-*)
+ ;;
+ *)
+ enable_dlopen=yes
+ ;;
+ esac
fi
case `pwd` in
*\ * | *\ *)
@@ -11531,7 +11537,7 @@ return dld_link ();
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11534 "configure"
+#line 11540 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11637,7 +11643,7 @@ int main ()
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11640 "configure"
+#line 11646 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -15057,7 +15063,7 @@ main ()
#
# Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
cat > conftest.$ac_ext << EOF
-#line 15060 "configure"
+#line 15066 "configure"
struct S { ~S(); };
void bar();
void foo()
@@ -15409,7 +15415,7 @@ main ()
# Fake what AC_TRY_COMPILE does.
cat > conftest.$ac_ext << EOF
-#line 15412 "configure"
+#line 15418 "configure"
int main()
{
typedef bool atomic_type;
@@ -15444,7 +15450,7 @@ int main()
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15447 "configure"
+#line 15453 "configure"
int main()
{
typedef short atomic_type;
@@ -15479,7 +15485,7 @@ int main()
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15482 "configure"
+#line 15488 "configure"
int main()
{
// NB: _Atomic_word not necessarily int.
@@ -15515,7 +15521,7 @@ int main()
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15518 "configure"
+#line 15524 "configure"
int main()
{
typedef long long atomic_type;
@@ -15594,7 +15600,7 @@ int main()
# unnecessary for this test.
cat > conftest.$ac_ext << EOF
-#line 15597 "configure"
+#line 15603 "configure"
int main()
{
_Decimal32 d1;
@@ -15636,7 +15642,7 @@ int main()
# unnecessary for this test.
cat > conftest.$ac_ext << EOF
-#line 15639 "configure"
+#line 15645 "configure"
template<typename T1, typename T2>
struct same
{ typedef T2 type; };
@@ -15670,7 +15676,7 @@ int main()
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15673 "configure"
+#line 15679 "configure"
template<typename T1, typename T2>
struct same
{ typedef T2 type; };
@@ -27853,6 +27859,62 @@ main ()
# This is a freestanding configuration; there is nothing to do here.
;;
+ avr-*-*)
+ $as_echo "#define HAVE_ISINF 1" >>confdefs.h
+
+ $as_echo "#define HAVE_ISNAN 1" >>confdefs.h
+
+ $as_echo "#define HAVE_HYPOT 1" >>confdefs.h
+
+
+ # ??? avr-libc/include/math.h used crude defines for float functions.
+ # Should we rather disable these for c++ than acknowledge them?
+ $as_echo "#define HAVE_FABSF 1" >>confdefs.h
+
+ $as_echo "#define HAVE_ACOSF 1" >>confdefs.h
+
+ $as_echo "#define HAVE_ASINF 1" >>confdefs.h
+
+ $as_echo "#define HAVE_ATANF 1" >>confdefs.h
+
+ $as_echo "#define HAVE_ATAN2F 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_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_LOGF 1" >>confdefs.h
+
+ $as_echo "#define HAVE_LOG10F 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'
More information about the Gcc-patches
mailing list