EXTRA_CFLAGS = @EXTRA_CFLAGS@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
FGREP = @FGREP@
+FREESTANDING_FLAGS = @FREESTANDING_FLAGS@
GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
GLIBCXX_LIBS = @GLIBCXX_LIBS@
GREP = @GREP@
dnl
AC_DEFUN([GLIBCXX_COMPUTE_STDIO_INTEGER_CONSTANTS], [
+if test "$is_hosted" = yes; then
AC_CACHE_CHECK([for the value of EOF], glibcxx_cv_stdio_eof, [
AC_COMPUTE_INT([glibcxx_cv_stdio_eof], [[EOF]],
[#include <stdio.h>],
])
AC_DEFINE_UNQUOTED(_GLIBCXX_STDIO_SEEK_END, $glibcxx_cv_stdio_seek_end,
[Define to the value of the SEEK_END integer constant.])
+fi
])
dnl
enable_hosted_libstdcxx=yes
;;
esac])
+ freestanding_flags=
if test "$enable_hosted_libstdcxx" = no; then
AC_MSG_NOTICE([Only freestanding libraries will be built])
is_hosted=no
hosted_define=0
enable_abi_check=no
enable_libstdcxx_pch=no
+ if test "x$with_headers" = xno; then
+ freestanding_flags="-ffreestanding"
+ fi
else
is_hosted=yes
hosted_define=1
GLIBCXX_CONDITIONAL(GLIBCXX_HOSTED, test $is_hosted = yes)
AC_DEFINE_UNQUOTED(_GLIBCXX_HOSTED, $hosted_define,
[Define to 1 if a full hosted library is built, or 0 if freestanding.])
+ FREESTANDING_FLAGS="$freestanding_flags"
+ AC_SUBST(FREESTANDING_FLAGS)
])
glibcxx_PCHFLAGS
GLIBCXX_BUILD_PCH_FALSE
GLIBCXX_BUILD_PCH_TRUE
+FREESTANDING_FLAGS
GLIBCXX_HOSTED_FALSE
GLIBCXX_HOSTED_TRUE
glibcxx_compiler_shared_flag
# Libtool setup.
-if test "x${with_newlib}" != "xyes" && test "x${with_avrlibc}" != "xyes"; then
+if test "x${with_newlib}" != "xyes" &&
+ test "x${with_avrlibc}" != "xyes" &&
+ test "x$with_headers" != "xno"; then
enable_dlopen=yes
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12179 "configure"
+#line 12182 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12285 "configure"
+#line 12288 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
esac
fi
+ freestanding_flags=
if test "$enable_hosted_libstdcxx" = no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Only freestanding libraries will be built" >&5
$as_echo "$as_me: Only freestanding libraries will be built" >&6;}
hosted_define=0
enable_abi_check=no
enable_libstdcxx_pch=no
+ if test "x$with_headers" = xno; then
+ freestanding_flags="-ffreestanding"
+ fi
else
is_hosted=yes
hosted_define=1
#define _GLIBCXX_HOSTED $hosted_define
_ACEOF
+ FREESTANDING_FLAGS="$freestanding_flags"
+
# Enable descriptive messages to standard output on termination.
# Fake what AC_TRY_COMPILE does.
cat > conftest.$ac_ext << EOF
-#line 15963 "configure"
+#line 15972 "configure"
int main()
{
typedef bool atomic_type;
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15998 "configure"
+#line 16007 "configure"
int main()
{
typedef short atomic_type;
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 16033 "configure"
+#line 16042 "configure"
int main()
{
// NB: _Atomic_word not necessarily int.
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 16069 "configure"
+#line 16078 "configure"
int main()
{
typedef long long atomic_type;
# unnecessary for this test.
cat > conftest.$ac_ext << EOF
-#line 16222 "configure"
+#line 16231 "configure"
int main()
{
_Decimal32 d1;
# unnecessary for this test.
cat > conftest.$ac_ext << EOF
-#line 16264 "configure"
+#line 16273 "configure"
template<typename T1, typename T2>
struct same
{ typedef T2 type; };
# For the EOF, SEEK_CUR, and SEEK_END integer constants.
+if test "$is_hosted" = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the value of EOF" >&5
$as_echo_n "checking for the value of EOF... " >&6; }
if ${glibcxx_cv_stdio_eof+:} false; then :
#define _GLIBCXX_STDIO_SEEK_END $glibcxx_cv_stdio_seek_end
_ACEOF
+fi
# For gettimeofday support.
$as_echo "#define HAVE_MEMALIGN 1" >>confdefs.h
- else
+ elif test "x$with_headers" != "xno"; then
# Base decisions on target environment.
case "${host}" in
fi
+if test "$is_hosted" = yes; then
+# TODO: remove this and change src/c++11/compatibility-atomic-c++0x.cc to
+# use <stdint.h> instead of <gstdint.h>.
inttype_headers=`echo inttypes.h sys/inttypes.h | sed -e 's/,/ /g'`
+fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU c++filt" >&5
GLIBCXX_CONFIGURE
# Libtool setup.
-if test "x${with_newlib}" != "xyes" && test "x${with_avrlibc}" != "xyes"; then
+if test "x${with_newlib}" != "xyes" &&
+ test "x${with_avrlibc}" != "xyes" &&
+ test "x$with_headers" != "xno"; then
AC_LIBTOOL_DLOPEN
fi
AM_PROG_LIBTOOL
AC_DEFINE(HAVE_ICONV)
AC_DEFINE(HAVE_MEMALIGN)
- else
+ elif test "x$with_headers" != "xno"; then
GLIBCXX_CROSSCONFIG
fi
GCC_LINUX_FUTEX([AC_DEFINE(HAVE_LINUX_FUTEX, 1, [Define if futex syscall is available.])])
+if test "$is_hosted" = yes; then
+# TODO: remove this and change src/c++11/compatibility-atomic-c++0x.cc to
+# use <stdint.h> instead of <gstdint.h>.
GCC_HEADER_STDINT(include/gstdint.h)
+fi
GLIBCXX_ENABLE_SYMVERS([yes])
AC_SUBST(libtool_VERSION)
EXTRA_CFLAGS = @EXTRA_CFLAGS@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
FGREP = @FGREP@
+FREESTANDING_FLAGS = @FREESTANDING_FLAGS@
GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
GLIBCXX_LIBS = @GLIBCXX_LIBS@
GREP = @GREP@
EXTRA_CFLAGS = @EXTRA_CFLAGS@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
FGREP = @FGREP@
+FREESTANDING_FLAGS = @FREESTANDING_FLAGS@
GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
GLIBCXX_LIBS = @GLIBCXX_LIBS@
GREP = @GREP@
# as the occasion call for it.
AM_CXXFLAGS = \
$(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
- $(XTEMPLATE_FLAGS) \
+ $(XTEMPLATE_FLAGS) $(FREESTANDING_FLAGS) \
$(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS)
AM_MAKEFLAGS = \
EXTRA_CFLAGS = @EXTRA_CFLAGS@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
FGREP = @FGREP@
+FREESTANDING_FLAGS = @FREESTANDING_FLAGS@
GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
GLIBCXX_LIBS = @GLIBCXX_LIBS@
GREP = @GREP@
# as the occasion call for it.
AM_CXXFLAGS = \
$(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
- $(XTEMPLATE_FLAGS) \
+ $(XTEMPLATE_FLAGS) $(FREESTANDING_FLAGS) \
$(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS)
AM_MAKEFLAGS = \
EXTRA_CFLAGS = @EXTRA_CFLAGS@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
FGREP = @FGREP@
+FREESTANDING_FLAGS = @FREESTANDING_FLAGS@
GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
GLIBCXX_LIBS = @GLIBCXX_LIBS@
GREP = @GREP@
EXTRA_CFLAGS = @EXTRA_CFLAGS@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
FGREP = @FGREP@
+FREESTANDING_FLAGS = @FREESTANDING_FLAGS@
GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
GLIBCXX_LIBS = @GLIBCXX_LIBS@
GREP = @GREP@
EXTRA_CFLAGS = @EXTRA_CFLAGS@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
FGREP = @FGREP@
+FREESTANDING_FLAGS = @FREESTANDING_FLAGS@
GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
GLIBCXX_LIBS = @GLIBCXX_LIBS@
GREP = @GREP@
EXTRA_CFLAGS = @EXTRA_CFLAGS@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
FGREP = @FGREP@
+FREESTANDING_FLAGS = @FREESTANDING_FLAGS@
GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
GLIBCXX_LIBS = @GLIBCXX_LIBS@
GREP = @GREP@
EXTRA_CFLAGS = @EXTRA_CFLAGS@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
FGREP = @FGREP@
+FREESTANDING_FLAGS = @FREESTANDING_FLAGS@
GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
GLIBCXX_LIBS = @GLIBCXX_LIBS@
GREP = @GREP@
EXTRA_CFLAGS = @EXTRA_CFLAGS@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
FGREP = @FGREP@
+FREESTANDING_FLAGS = @FREESTANDING_FLAGS@
GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
GLIBCXX_LIBS = @GLIBCXX_LIBS@
GREP = @GREP@
EXTRA_CFLAGS = @EXTRA_CFLAGS@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
FGREP = @FGREP@
+FREESTANDING_FLAGS = @FREESTANDING_FLAGS@
GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
GLIBCXX_LIBS = @GLIBCXX_LIBS@
GREP = @GREP@
EXTRA_CFLAGS = @EXTRA_CFLAGS@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
FGREP = @FGREP@
+FREESTANDING_FLAGS = @FREESTANDING_FLAGS@
GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
GLIBCXX_LIBS = @GLIBCXX_LIBS@
GREP = @GREP@
EXTRA_CFLAGS = @EXTRA_CFLAGS@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
FGREP = @FGREP@
+FREESTANDING_FLAGS = @FREESTANDING_FLAGS@
GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@
GLIBCXX_LIBS = @GLIBCXX_LIBS@
GREP = @GREP@