[gcc/devel/omp/gcc-9] PR libstdc++/90361 add missing macro definition

Tobias Burnus burnus@gcc.gnu.org
Thu Mar 5 13:52:00 GMT 2020


https://gcc.gnu.org/g:06b6df92d435b2580b140fdcaca290fccd3c4662

commit 06b6df92d435b2580b140fdcaca290fccd3c4662
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Aug 13 14:14:45 2019 +0100

    PR libstdc++/90361 add missing macro definition
    
    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

Diff:
---
 libstdc++-v3/ChangeLog                | 8 ++++++++
 libstdc++-v3/src/c++17/string-inst.cc | 6 ++++++
 2 files changed, 14 insertions(+)

diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 8ac5025..904d8db 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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.
diff --git a/libstdc++-v3/src/c++17/string-inst.cc b/libstdc++-v3/src/c++17/string-inst.cc
index c095a90..4dc0a9c 100644
--- a/libstdc++-v3/src/c++17/string-inst.cc
+++ b/libstdc++-v3/src/c++17/string-inst.cc
@@ -26,6 +26,12 @@
 // 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)



More information about the Libstdc++-cvs mailing list