]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR libstdc++/90361 add missing macro definition
authorJonathan Wakely <jwakely@redhat.com>
Tue, 13 Aug 2019 13:14:45 +0000 (14:14 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 13 Aug 2019 13:14:45 +0000 (14:14 +0100)
The src/c++17/string-inst.cc file needs to override the default string
ABI so that it still contains the expected symbols even when the library
is configured with --with-default-libstdcxx-abi=gcc4-compatible.

Backport from mainline
2019-08-12  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/90361
* src/c++17/string-inst.cc: Use _GLIBCXX_USE_CXX11_ABI=1 by default.

From-SVN: r274379

libstdc++-v3/ChangeLog
libstdc++-v3/src/c++17/string-inst.cc

index 8ac50251005ef7da9c7dd213159299c4594daa33..904d8dbf49a2beace79d5b5e95b91c47ad4dfd3f 100644 (file)
@@ -1,3 +1,11 @@
+2019-08-13  Jonathan Wakely  <jwakely@redhat.com>
+
+       Backport from mainline
+       2019-08-12  Jonathan Wakely  <jwakely@redhat.com>
+
+       PR libstdc++/90361
+       * src/c++17/string-inst.cc: Use _GLIBCXX_USE_CXX11_ABI=1 by default.
+
 2019-08-12  Release Manager
 
        * GCC 9.2.0 released.
index c095a90587eaf8f1c5a771d711274266a2b52880..4dc0a9ca449133087df3139bf44bd373e202546e 100644 (file)
 // ISO C++ 14882:2017 24  Strings library
 //
 
+#ifndef _GLIBCXX_USE_CXX11_ABI
+// Instantiations in this file use the new SSO std::string ABI unless included
+// by another file which defines _GLIBCXX_USE_CXX11_ABI=0.
+# define _GLIBCXX_USE_CXX11_ABI 1
+#endif
+
 #include <string>
 
 namespace std _GLIBCXX_VISIBILITY(default)