gcc/libstdc++-v3
Jonathan Wakely de4db54fd9 PR libstdc++/86756 Move rest of std::filesystem to libstdc++.so
Move std::filesystem directory iterators and operations from
libstdc++fs.a to main libstdc++ library. These components have many
dependencies on OS support, which is not available on all targets. Some
additional autoconf checks and conditional compilation is needed to
ensure the files will build for all targets. Previously this code was
not compiled without --enable-libstdcxx-filesystem-ts but the C++17
components should be available for all hosted builds.

The tests for these components no longer need to link to libstdc++fs.a,
but are not expected to pass on all targets. To avoid numerous failures
on targets which are not expected to pass the tests (due to missing OS
functionality) leave the dg-require-filesystem-ts directives in place
for now. This will ensure the tests only run for builds where the
filesystem-ts library is built, which presumably means some level of OS
support is present.

	PR libstdc++/86756
	* acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
	lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
	* config.h.in: Regenerate.
	* config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
	remaining std::filesystem types and functions.
	* configure: Regenerate.
	* src/c++17/Makefile.am: Add C++17 filesystem sources.
	* src/c++17/Makefile.in: Regenerate.
	* src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
	here, and change name of included file.
	* src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
	here, and change name of included file.
	* src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
	path to dir-common.h.
	* src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
	path to ops-common.h. Disable -Wunused-parameter warnings.
	(internal_file_clock): Define unconditionally.
	[!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
	define.
	(do_copy_file, do_space): Move definitions to ops.common.h.
	(copy, file_size, hard_link_count, last_write_time, space): Only
	perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
	report an error.
	(last_write_time, read_symlink): Remove unused attributes from
	parameters.
	* src/filesystem/Makefile.am: Remove C++17 filesystem sources.
	* src/filesystem/Makefile.in: Regenerate.
	* src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
	* src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
	* src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
	* src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
	* src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
	dummy types and functions instead of using #error.
	* src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
	* src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
	in terms of stat.
	[!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
	(do_copy_file, do_space): Move definitions here from std-ops.cc.
	* src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
	to account for new namespace.
	* testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
	-lstdc++fs from dg-options.
	* testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
	* testsuite/27_io/filesystem/file_status/1.cc: Likewise.
	* testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
	* testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
	* testsuite/27_io/filesystem/iterators/directory_iterator.cc:
	Likewise.
	* testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
	* testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
	Likewise.
	* testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
	* testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
	* testsuite/27_io/filesystem/operations/copy.cc: Likewise.
	* testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
	* testsuite/27_io/filesystem/operations/create_directories.cc:
	Likewise.
	* testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
	* testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
	* testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
	* testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
	* testsuite/27_io/filesystem/operations/exists.cc: Likewise.
	* testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
	* testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
	* testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
	* testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
	* testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
	* testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
	* testsuite/27_io/filesystem/operations/relative.cc: Likewise.
	* testsuite/27_io/filesystem/operations/remove.cc: Likewise.
	* testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
	* testsuite/27_io/filesystem/operations/space.cc: Likewise.
	* testsuite/27_io/filesystem/operations/status.cc: Likewise.
	* testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
	* testsuite/27_io/filesystem/operations/temp_directory_path.cc:
	Likewise.
	* testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.

From-SVN: r267616
2019-01-06 22:34:37 +00:00
..
config PR libstdc++/86756 Move rest of std::filesystem to libstdc++.so 2019-01-06 22:34:37 +00:00
doc Update copyright years. 2019-01-01 13:31:55 +01:00
include PR libstdc++/87431 fix regression introduced by r264574 2019-01-06 20:52:34 +00:00
libsupc++ Update copyright years. 2019-01-01 13:31:55 +01:00
po Update copyright years. 2019-01-01 13:31:55 +01:00
python Update copyright years. 2019-01-01 13:31:55 +01:00
scripts Update copyright years. 2019-01-01 13:31:55 +01:00
src PR libstdc++/86756 Move rest of std::filesystem to libstdc++.so 2019-01-06 22:34:37 +00:00
testsuite PR libstdc++/86756 Move rest of std::filesystem to libstdc++.so 2019-01-06 22:34:37 +00:00
ChangeLog PR libstdc++/86756 Move rest of std::filesystem to libstdc++.so 2019-01-06 22:34:37 +00:00
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014 Rotate libstdc++-v3/ChangeLog 2015-01-02 16:50:36 +00:00
ChangeLog-2015 Update copyright years. 2016-01-04 15:30:50 +01:00
ChangeLog-2016 Update copyright years. 2017-01-01 13:07:43 +01:00
ChangeLog-2017 Update copyright years. 2018-01-03 11:03:58 +01:00
ChangeLog-2018 Update copyright years. 2019-01-01 13:31:55 +01:00
Makefile.am Update copyright years. 2019-01-01 13:31:55 +01:00
Makefile.in Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
README
acinclude.m4 PR libstdc++/86756 Move rest of std::filesystem to libstdc++.so 2019-01-06 22:34:37 +00:00
aclocal.m4 Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
config.h.in PR libstdc++/86756 Move rest of std::filesystem to libstdc++.so 2019-01-06 22:34:37 +00:00
configure PR libstdc++/86756 Move rest of std::filesystem to libstdc++.so 2019-01-06 22:34:37 +00:00
configure.ac PR libstdc++/67843 set shared_ptr lock policy at build-time 2018-11-27 23:25:56 +00:00
configure.host Don't force visibility to hidden for Darwin > 8. 2018-08-25 09:02:28 +00:00
crossconfig.m4 Define _GLIBCXX_USE_DEV_RANDOM as replacement for _GLIBCXX_USE_RANDOM_TR1 2018-10-16 15:49:29 +01:00
fragment.am PR libstdc++/86450 use -Wabi=2 and simplify -Werror use 2018-07-17 14:18:47 +01:00
linkage.m4

README

file: libstdc++-v3/README

New users may wish to point their web browsers to the file
index.html in the 'doc/html' subdirectory.  It contains brief
building instructions and notes on how to configure the library in
interesting ways.