diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2018-07-24 22:09:55 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2018-07-24 22:09:55 +0100 |
commit | dfaa3c47cc0a5e858ff45e0f2ab4d686048f718e (patch) | |
tree | 2fa7f48a9def9b3dad9d767bd6a1148ed6d72af4 /libstdc++-v3/configure | |
parent | e874029dd994ce1dd098a143aa06a0894da7b7de (diff) | |
download | gcc-dfaa3c47cc0a5e858ff45e0f2ab4d686048f718e.zip gcc-dfaa3c47cc0a5e858ff45e0f2ab4d686048f718e.tar.gz gcc-dfaa3c47cc0a5e858ff45e0f2ab4d686048f718e.tar.bz2 |
Add initial version of C++17 <memory_resource> header
This is missing the synchronized_pool_resource and
unsynchronized_pool_resource classes but is otherwise complete.
This is a new implementation, not based on the existing code in
<experimental/memory_resource>, but memory_resource and
polymorphic_allocator ended up looking almost the same anyway.
The constant_init kluge in src/c++17/memory_resource.cc is apparently
due to Richard Smith and ensures that the objects are constructed during
constant initialiation phase and not destroyed (because the
constant_init destructor doesn't destroy the union member and the
storage is not reused).
* config/abi/pre/gnu.ver: Export new symbols.
* configure: Regenerate.
* include/Makefile.am: Add new <memory_resource> header.
* include/Makefile.in: Regenerate.
* include/precompiled/stdc++.h: Include <memory_resource> for C++17.
* include/std/memory_resource: New header.
(memory_resource, polymorphic_allocator, new_delete_resource)
(null_memory_resource, set_default_resource, get_default_resource)
(pool_options, monotonic_buffer_resource): Define.
* src/Makefile.am: Add c++17 directory.
* src/Makefile.in: Regenerate.
* src/c++11/Makefile.am: Fix comment.
* src/c++17/Makefile.am: Add makefile for new sub-directory.
* src/c++17/Makefile.in: Generate.
* src/c++17/memory_resource.cc: New.
(newdel_res_t, null_res_t, constant_init, newdel_res, null_res)
(default_res, new_delete_resource, null_memory_resource)
(set_default_resource, get_default_resource): Define.
* testsuite/20_util/memory_resource/1.cc: New test.
* testsuite/20_util/memory_resource/2.cc: New test.
* testsuite/20_util/monotonic_buffer_resource/1.cc: New test.
* testsuite/20_util/monotonic_buffer_resource/allocate.cc: New test.
* testsuite/20_util/monotonic_buffer_resource/deallocate.cc: New test.
* testsuite/20_util/monotonic_buffer_resource/release.cc: New test.
* testsuite/20_util/monotonic_buffer_resource/upstream_resource.cc:
New test.
* testsuite/20_util/polymorphic_allocator/1.cc: New test.
* testsuite/20_util/polymorphic_allocator/resource.cc: New test.
* testsuite/20_util/polymorphic_allocator/select.cc: New test.
* testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource):
Define concrete memory resource for testing.
(__gnu_test::default_resource_mgr): Define RAII helper for changing
default resource.
From-SVN: r262953
Diffstat (limited to 'libstdc++-v3/configure')
-rwxr-xr-x | libstdc++-v3/configure | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 101dcd9..54a2e8a 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -4965,7 +4965,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; } # expandable list at autoconf time; the second provides an expandable list # (i.e., shell variable) at configure time. - SUBDIRS='include libsupc++ src src/c++98 src/c++11 src/filesystem doc po testsuite python' + SUBDIRS='include libsupc++ src src/c++98 src/c++11 src/c++17 src/filesystem doc po testsuite python' # These need to be absolute paths, yet at the same time need to # canonicalize only relative paths, because then amd will not unmount @@ -81841,7 +81841,7 @@ ac_config_files="$ac_config_files doc/xsl/customization.xsl" # append it here. Only modify Makefiles that have just been created. # # Also, get rid of this simulated-VPATH thing that automake does. -ac_config_files="$ac_config_files include/Makefile libsupc++/Makefile src/Makefile src/c++98/Makefile src/c++11/Makefile src/filesystem/Makefile doc/Makefile po/Makefile testsuite/Makefile python/Makefile" +ac_config_files="$ac_config_files include/Makefile libsupc++/Makefile src/Makefile src/c++98/Makefile src/c++11/Makefile src/c++17/Makefile src/filesystem/Makefile doc/Makefile po/Makefile testsuite/Makefile python/Makefile" ac_config_commands="$ac_config_commands generate-headers" @@ -83076,6 +83076,7 @@ do "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/c++98/Makefile") CONFIG_FILES="$CONFIG_FILES src/c++98/Makefile" ;; "src/c++11/Makefile") CONFIG_FILES="$CONFIG_FILES src/c++11/Makefile" ;; + "src/c++17/Makefile") CONFIG_FILES="$CONFIG_FILES src/c++17/Makefile" ;; "src/filesystem/Makefile") CONFIG_FILES="$CONFIG_FILES src/filesystem/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "po/Makefile") CONFIG_FILES="$CONFIG_FILES po/Makefile" ;; @@ -84913,6 +84914,17 @@ _EOF . ${multi_basedir}/config-ml.in { ml_norecursion=; unset ml_norecursion;} ;; + "src/c++17/Makefile":F) cat > vpsed$$ << \_EOF +s!`test -f '$<' || echo '$(srcdir)/'`!! +_EOF + sed -f vpsed$$ $ac_file > tmp$$ + mv tmp$$ $ac_file + rm vpsed$$ + echo 'MULTISUBDIR =' >> $ac_file + ml_norecursion=yes + . ${multi_basedir}/config-ml.in + { ml_norecursion=; unset ml_norecursion;} + ;; "src/filesystem/Makefile":F) cat > vpsed$$ << \_EOF s!`test -f '$<' || echo '$(srcdir)/'`!! _EOF |