diff mbox series

PR libstdc++/90361 add missing macro definition

Message ID 20190812164114.GA19378@redhat.com
State New
Headers show
Series PR libstdc++/90361 add missing macro definition | expand

Commit Message

Jonathan Wakely Aug. 12, 2019, 4:41 p.m. UTC
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.

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

Tested x86_64-linux, committed to trunk.
commit 5225243411b6c5ffb5c30e558b25721450337c01
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Mon Aug 12 17:16:55 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.
    
            PR libstdc++/90361
            * src/c++17/string-inst.cc: Use _GLIBCXX_USE_CXX11_ABI=1 by default.

Comments

Jonathan Wakely Aug. 14, 2019, 11:18 a.m. UTC | #1
On 12/08/19 17:41 +0100, Jonathan Wakely wrote:
>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.
>
>	PR libstdc++/90361
>	* src/c++17/string-inst.cc: Use _GLIBCXX_USE_CXX11_ABI=1 by default.
>
>Tested x86_64-linux, committed to trunk.

This documents the bug in the gcc-9 release notes.

Committed to CVS.
diff mbox series

Patch

diff --git a/libstdc++-v3/src/c++17/string-inst.cc b/libstdc++-v3/src/c++17/string-inst.cc
index c095a90587e..4dc0a9ca449 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)