diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2015-10-03 00:21:41 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2015-10-03 00:21:41 +0100 |
commit | 8b75621078b42aa4cc41110a3388bdf65205056a (patch) | |
tree | f61d556aaed6195025701fc00b2d20f44a9ac79d | |
parent | ee216d80a5673aca7300e720eae1b25c2392662f (diff) | |
download | gcc-8b75621078b42aa4cc41110a3388bdf65205056a.zip gcc-8b75621078b42aa4cc41110a3388bdf65205056a.tar.gz gcc-8b75621078b42aa4cc41110a3388bdf65205056a.tar.bz2 |
Enable dual ABI for Filesystem library
* src/filesystem/Makefile.am: Add cxx11_abi_sources.
* src/filesystem/Makefile.in: Regenerate.
* src/filesystem/cow-dir.cc: New.
* src/filesystem/cow-ops.cc: New.
* src/filesystem/cow-path.cc: New.
* src/filesystem/dir.cc: Define macro for new ABI.
* src/filesystem/ops.cc: Likewise.
* src/filesystem/path.cc: Likewise.
From-SVN: r228437
-rw-r--r-- | libstdc++-v3/ChangeLog | 11 | ||||
-rw-r--r-- | libstdc++-v3/src/filesystem/Makefile.am | 12 | ||||
-rw-r--r-- | libstdc++-v3/src/filesystem/Makefile.in | 15 | ||||
-rw-r--r-- | libstdc++-v3/src/filesystem/cow-dir.cc | 26 | ||||
-rw-r--r-- | libstdc++-v3/src/filesystem/cow-ops.cc | 26 | ||||
-rw-r--r-- | libstdc++-v3/src/filesystem/cow-path.cc | 26 | ||||
-rw-r--r-- | libstdc++-v3/src/filesystem/dir.cc | 4 | ||||
-rw-r--r-- | libstdc++-v3/src/filesystem/ops.cc | 4 | ||||
-rw-r--r-- | libstdc++-v3/src/filesystem/path.cc | 4 |
9 files changed, 124 insertions, 4 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index fd05a65..c70a3a0 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,14 @@ +2015-10-03 Jonathan Wakely <jwakely@redhat.com> + + * src/filesystem/Makefile.am: Add cxx11_abi_sources. + * src/filesystem/Makefile.in: Regenerate. + * src/filesystem/cow-dir.cc: New. + * src/filesystem/cow-ops.cc: New. + * src/filesystem/cow-path.cc: New. + * src/filesystem/dir.cc: Define macro for new ABI. + * src/filesystem/ops.cc: Likewise. + * src/filesystem/path.cc: Likewise. + 2015-10-02 Jonathan Wakely <jwakely@redhat.com> * testsuite/21_strings/basic_string/allocator/wchar_t/minimal.cc: diff --git a/libstdc++-v3/src/filesystem/Makefile.am b/libstdc++-v3/src/filesystem/Makefile.am index 128cba9..8e332ec4 100644 --- a/libstdc++-v3/src/filesystem/Makefile.am +++ b/libstdc++-v3/src/filesystem/Makefile.am @@ -26,10 +26,20 @@ toolexeclib_LTLIBRARIES = libstdc++fs.la headers = +if ENABLE_DUAL_ABI +cxx11_abi_sources = \ + cow-dir.cc \ + cow-ops.cc \ + cow-path.cc +else +cxx11_abi_sources = +endif + sources = \ dir.cc \ ops.cc \ - path.cc + path.cc \ + ${cxx11_abi_sources} # vpath % $(top_srcdir)/src/filesystem diff --git a/libstdc++-v3/src/filesystem/Makefile.in b/libstdc++-v3/src/filesystem/Makefile.in index a315bb6..bbc45a8 100644 --- a/libstdc++-v3/src/filesystem/Makefile.in +++ b/libstdc++-v3/src/filesystem/Makefile.in @@ -112,8 +112,10 @@ am__uninstall_files_from_dir = { \ am__installdirs = "$(DESTDIR)$(toolexeclibdir)" LTLIBRARIES = $(toolexeclib_LTLIBRARIES) libstdc__fs_la_LIBADD = -am__objects_1 = dir.lo ops.lo path.lo -am_libstdc__fs_la_OBJECTS = $(am__objects_1) +@ENABLE_DUAL_ABI_TRUE@am__objects_1 = cow-dir.lo cow-ops.lo \ +@ENABLE_DUAL_ABI_TRUE@ cow-path.lo +am__objects_2 = dir.lo ops.lo path.lo $(am__objects_1) +am_libstdc__fs_la_OBJECTS = $(am__objects_2) libstdc__fs_la_OBJECTS = $(am_libstdc__fs_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = @@ -353,10 +355,17 @@ WARN_CXXFLAGS = \ AM_CPPFLAGS = $(GLIBCXX_INCLUDES) $(CPPFLAGS) toolexeclib_LTLIBRARIES = libstdc++fs.la headers = +@ENABLE_DUAL_ABI_FALSE@cxx11_abi_sources = +@ENABLE_DUAL_ABI_TRUE@cxx11_abi_sources = \ +@ENABLE_DUAL_ABI_TRUE@ cow-dir.cc \ +@ENABLE_DUAL_ABI_TRUE@ cow-ops.cc \ +@ENABLE_DUAL_ABI_TRUE@ cow-path.cc + sources = \ dir.cc \ ops.cc \ - path.cc + path.cc \ + ${cxx11_abi_sources} # vpath % $(top_srcdir)/src/filesystem diff --git a/libstdc++-v3/src/filesystem/cow-dir.cc b/libstdc++-v3/src/filesystem/cow-dir.cc new file mode 100644 index 0000000..b4175ef --- /dev/null +++ b/libstdc++-v3/src/filesystem/cow-dir.cc @@ -0,0 +1,26 @@ +// Class filesystem::directory_entry etc. -*- C++ -*- + +// Copyright (C) 2015 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +#define _GLIBCXX_USE_CXX11_ABI 0 +#include "dir.cc" diff --git a/libstdc++-v3/src/filesystem/cow-ops.cc b/libstdc++-v3/src/filesystem/cow-ops.cc new file mode 100644 index 0000000..6096dec --- /dev/null +++ b/libstdc++-v3/src/filesystem/cow-ops.cc @@ -0,0 +1,26 @@ +// Filesystem operations -*- C++ -*- + +// Copyright (C) 2015 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +#define _GLIBCXX_USE_CXX11_ABI 0 +#include "ops.cc" diff --git a/libstdc++-v3/src/filesystem/cow-path.cc b/libstdc++-v3/src/filesystem/cow-path.cc new file mode 100644 index 0000000..386df59 --- /dev/null +++ b/libstdc++-v3/src/filesystem/cow-path.cc @@ -0,0 +1,26 @@ +// Class filesystem::path -*- C++ -*- + +// Copyright (C) 2015 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +#define _GLIBCXX_USE_CXX11_ABI 0 +#include "path.cc" diff --git a/libstdc++-v3/src/filesystem/dir.cc b/libstdc++-v3/src/filesystem/dir.cc index 33280ec..63c10e7 100644 --- a/libstdc++-v3/src/filesystem/dir.cc +++ b/libstdc++-v3/src/filesystem/dir.cc @@ -22,6 +22,10 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. +#ifndef _GLIBCXX_USE_CXX11_ABI +# define _GLIBCXX_USE_CXX11_ABI 1 +#endif + #include <experimental/filesystem> #include <utility> #include <stack> diff --git a/libstdc++-v3/src/filesystem/ops.cc b/libstdc++-v3/src/filesystem/ops.cc index 7b261fb..8152560 100644 --- a/libstdc++-v3/src/filesystem/ops.cc +++ b/libstdc++-v3/src/filesystem/ops.cc @@ -22,6 +22,10 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. +#ifndef _GLIBCXX_USE_CXX11_ABI +# define _GLIBCXX_USE_CXX11_ABI 1 +#endif + #include <experimental/filesystem> #include <functional> #include <stack> diff --git a/libstdc++-v3/src/filesystem/path.cc b/libstdc++-v3/src/filesystem/path.cc index e85c9fc..e9fe465 100644 --- a/libstdc++-v3/src/filesystem/path.cc +++ b/libstdc++-v3/src/filesystem/path.cc @@ -22,6 +22,10 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. +#ifndef _GLIBCXX_USE_CXX11_ABI +# define _GLIBCXX_USE_CXX11_ABI 1 +#endif + #include <experimental/filesystem> using std::experimental::filesystem::path; |