diff options
-rw-r--r-- | libstdc++-v3/Makefile.in | 1 | ||||
-rw-r--r-- | libstdc++-v3/acinclude.m4 | 8 | ||||
-rwxr-xr-x | libstdc++-v3/configure | 35 | ||||
-rw-r--r-- | libstdc++-v3/configure.ac | 10 | ||||
-rw-r--r-- | libstdc++-v3/doc/Makefile.in | 1 | ||||
-rw-r--r-- | libstdc++-v3/include/Makefile.in | 1 | ||||
-rw-r--r-- | libstdc++-v3/libsupc++/Makefile.am | 2 | ||||
-rw-r--r-- | libstdc++-v3/libsupc++/Makefile.in | 3 | ||||
-rw-r--r-- | libstdc++-v3/po/Makefile.in | 1 | ||||
-rw-r--r-- | libstdc++-v3/python/Makefile.in | 1 | ||||
-rw-r--r-- | libstdc++-v3/src/Makefile.in | 1 | ||||
-rw-r--r-- | libstdc++-v3/src/c++11/Makefile.in | 1 | ||||
-rw-r--r-- | libstdc++-v3/src/c++17/Makefile.in | 1 | ||||
-rw-r--r-- | libstdc++-v3/src/c++20/Makefile.in | 1 | ||||
-rw-r--r-- | libstdc++-v3/src/c++98/Makefile.in | 1 | ||||
-rw-r--r-- | libstdc++-v3/src/filesystem/Makefile.in | 1 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/Makefile.in | 1 |
17 files changed, 56 insertions, 14 deletions
diff --git a/libstdc++-v3/Makefile.in b/libstdc++-v3/Makefile.in index a1955dd..150e4d0 100644 --- a/libstdc++-v3/Makefile.in +++ b/libstdc++-v3/Makefile.in @@ -240,6 +240,7 @@ EXEEXT = @EXEEXT@ 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@ diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 635168d..b770d5b 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -2081,6 +2081,7 @@ dnl Compute the EOF, SEEK_CUR, and SEEK_END integer constants. 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>], @@ -2104,6 +2105,7 @@ AC_DEFUN([GLIBCXX_COMPUTE_STDIO_INTEGER_CONSTANTS], [ ]) AC_DEFINE_UNQUOTED(_GLIBCXX_STDIO_SEEK_END, $glibcxx_cv_stdio_seek_end, [Define to the value of the SEEK_END integer constant.]) +fi ]) dnl @@ -2923,12 +2925,16 @@ AC_DEFUN([GLIBCXX_ENABLE_HOSTED], [ 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 @@ -2936,6 +2942,8 @@ AC_DEFUN([GLIBCXX_ENABLE_HOSTED], [ 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) ]) diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index b1a0157..0f29186 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -771,6 +771,7 @@ thread_header glibcxx_PCHFLAGS GLIBCXX_BUILD_PCH_FALSE GLIBCXX_BUILD_PCH_TRUE +FREESTANDING_FLAGS GLIBCXX_HOSTED_FALSE GLIBCXX_HOSTED_TRUE glibcxx_compiler_shared_flag @@ -5949,7 +5950,9 @@ $as_echo "$as_me: OS config directory is $os_include_dir" >&6;} # 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 @@ -12176,7 +12179,7 @@ else 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 @@ -12282,7 +12285,7 @@ else 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 @@ -15623,6 +15626,7 @@ else 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;} @@ -15630,6 +15634,9 @@ $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 @@ -15640,6 +15647,8 @@ cat >>confdefs.h <<_ACEOF #define _GLIBCXX_HOSTED $hosted_define _ACEOF + FREESTANDING_FLAGS="$freestanding_flags" + # Enable descriptive messages to standard output on termination. @@ -15960,7 +15969,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; } # Fake what AC_TRY_COMPILE does. cat > conftest.$ac_ext << EOF -#line 15963 "configure" +#line 15972 "configure" int main() { typedef bool atomic_type; @@ -15995,7 +16004,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 15998 "configure" +#line 16007 "configure" int main() { typedef short atomic_type; @@ -16030,7 +16039,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 16033 "configure" +#line 16042 "configure" int main() { // NB: _Atomic_word not necessarily int. @@ -16066,7 +16075,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 16069 "configure" +#line 16078 "configure" int main() { typedef long long atomic_type; @@ -16219,7 +16228,7 @@ $as_echo "mutex" >&6; } # unnecessary for this test. cat > conftest.$ac_ext << EOF -#line 16222 "configure" +#line 16231 "configure" int main() { _Decimal32 d1; @@ -16261,7 +16270,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # 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; }; @@ -20183,6 +20192,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # 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 : @@ -20248,6 +20258,7 @@ cat >>confdefs.h <<_ACEOF #define _GLIBCXX_STDIO_SEEK_END $glibcxx_cv_stdio_seek_end _ACEOF +fi # For gettimeofday support. @@ -29129,7 +29140,7 @@ else $as_echo "#define HAVE_MEMALIGN 1" >>confdefs.h - else + elif test "x$with_headers" != "xno"; then # Base decisions on target environment. case "${host}" in @@ -74203,6 +74214,9 @@ $as_echo "#define HAVE_LINUX_FUTEX 1" >>confdefs.h 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'` @@ -74604,6 +74618,7 @@ ac_config_commands="$ac_config_commands include/gstdint.h" +fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU c++filt" >&5 diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac index 5b3c92f..827d770 100644 --- a/libstdc++-v3/configure.ac +++ b/libstdc++-v3/configure.ac @@ -90,7 +90,9 @@ AC_SYS_LARGEFILE 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 @@ -351,7 +353,7 @@ else AC_DEFINE(HAVE_ICONV) AC_DEFINE(HAVE_MEMALIGN) - else + elif test "x$with_headers" != "xno"; then GLIBCXX_CROSSCONFIG fi @@ -390,7 +392,11 @@ GCC_CHECK_UNWIND_GETIPINFO 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) diff --git a/libstdc++-v3/doc/Makefile.in b/libstdc++-v3/doc/Makefile.in index bfb3ce7..443d291 100644 --- a/libstdc++-v3/doc/Makefile.in +++ b/libstdc++-v3/doc/Makefile.in @@ -199,6 +199,7 @@ EXEEXT = @EXEEXT@ 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@ diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in index 4e4a240..0031f54 100644 --- a/libstdc++-v3/include/Makefile.in +++ b/libstdc++-v3/include/Makefile.in @@ -199,6 +199,7 @@ EXEEXT = @EXEEXT@ 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@ diff --git a/libstdc++-v3/libsupc++/Makefile.am b/libstdc++-v3/libsupc++/Makefile.am index 2a69a1c..65b5c1a 100644 --- a/libstdc++-v3/libsupc++/Makefile.am +++ b/libstdc++-v3/libsupc++/Makefile.am @@ -139,7 +139,7 @@ atomicity.cc: ${atomicity_file} # 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 = \ diff --git a/libstdc++-v3/libsupc++/Makefile.in b/libstdc++-v3/libsupc++/Makefile.in index 5776a56..5cbbf99 100644 --- a/libstdc++-v3/libsupc++/Makefile.in +++ b/libstdc++-v3/libsupc++/Makefile.in @@ -308,6 +308,7 @@ EXEEXT = @EXEEXT@ 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@ @@ -579,7 +580,7 @@ atomicity_file = ${glibcxx_srcdir}/$(ATOMICITY_SRCDIR)/atomicity.h # 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 = \ diff --git a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in index 8edd2e05..0d29364 100644 --- a/libstdc++-v3/po/Makefile.in +++ b/libstdc++-v3/po/Makefile.in @@ -199,6 +199,7 @@ EXEEXT = @EXEEXT@ 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@ diff --git a/libstdc++-v3/python/Makefile.in b/libstdc++-v3/python/Makefile.in index b3b56c4..07b5807 100644 --- a/libstdc++-v3/python/Makefile.in +++ b/libstdc++-v3/python/Makefile.in @@ -229,6 +229,7 @@ EXEEXT = @EXEEXT@ 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@ diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in index 05b25ed..fa4b243 100644 --- a/libstdc++-v3/src/Makefile.in +++ b/libstdc++-v3/src/Makefile.in @@ -298,6 +298,7 @@ EXEEXT = @EXEEXT@ 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@ diff --git a/libstdc++-v3/src/c++11/Makefile.in b/libstdc++-v3/src/c++11/Makefile.in index 8654050..d20d1ed 100644 --- a/libstdc++-v3/src/c++11/Makefile.in +++ b/libstdc++-v3/src/c++11/Makefile.in @@ -265,6 +265,7 @@ EXEEXT = @EXEEXT@ 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@ diff --git a/libstdc++-v3/src/c++17/Makefile.in b/libstdc++-v3/src/c++17/Makefile.in index 8c02be6..83d8490 100644 --- a/libstdc++-v3/src/c++17/Makefile.in +++ b/libstdc++-v3/src/c++17/Makefile.in @@ -245,6 +245,7 @@ EXEEXT = @EXEEXT@ 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@ diff --git a/libstdc++-v3/src/c++20/Makefile.in b/libstdc++-v3/src/c++20/Makefile.in index e6892d3..5f0acb4 100644 --- a/libstdc++-v3/src/c++20/Makefile.in +++ b/libstdc++-v3/src/c++20/Makefile.in @@ -240,6 +240,7 @@ EXEEXT = @EXEEXT@ 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@ diff --git a/libstdc++-v3/src/c++98/Makefile.in b/libstdc++-v3/src/c++98/Makefile.in index f9ebb0f..12c6f2d 100644 --- a/libstdc++-v3/src/c++98/Makefile.in +++ b/libstdc++-v3/src/c++98/Makefile.in @@ -261,6 +261,7 @@ EXEEXT = @EXEEXT@ 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@ diff --git a/libstdc++-v3/src/filesystem/Makefile.in b/libstdc++-v3/src/filesystem/Makefile.in index 74a6d27..e0693b1 100644 --- a/libstdc++-v3/src/filesystem/Makefile.in +++ b/libstdc++-v3/src/filesystem/Makefile.in @@ -269,6 +269,7 @@ EXEEXT = @EXEEXT@ 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@ diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/Makefile.in index c65cdaf..b442dfe 100644 --- a/libstdc++-v3/testsuite/Makefile.in +++ b/libstdc++-v3/testsuite/Makefile.in @@ -199,6 +199,7 @@ EXEEXT = @EXEEXT@ 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@ |