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
This commit is contained in:
Jonathan Wakely 2015-10-03 00:21:41 +01:00 committed by Jonathan Wakely
parent ee216d80a5
commit 8b75621078
9 changed files with 124 additions and 4 deletions

View file

@ -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:

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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>

View file

@ -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>

View file

@ -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;