public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] PR libstdc++/90361 add missing macro definition
@ 2019-08-12 16:41 Jonathan Wakely
  2019-08-14 11:19 ` Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Wakely @ 2019-08-12 16:41 UTC (permalink / raw)
  To: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 344 bytes --]

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.



[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1096 bytes --]

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.

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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] PR libstdc++/90361 add missing macro definition
  2019-08-12 16:41 [PATCH] PR libstdc++/90361 add missing macro definition Jonathan Wakely
@ 2019-08-14 11:19 ` Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2019-08-14 11:19 UTC (permalink / raw)
  To: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 470 bytes --]

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.


[-- Attachment #2: patch.txt --]
[-- Type: text/x-patch, Size: 1434 bytes --]

Index: htdocs/gcc-9/changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-9/changes.html,v
retrieving revision 1.74
diff -u -r1.74 changes.html
--- htdocs/gcc-9/changes.html	12 Aug 2019 07:31:04 -0000	1.74
+++ htdocs/gcc-9/changes.html	14 Aug 2019 11:17:34 -0000
@@ -70,8 +70,18 @@
     definition of <code>std::rotate</code> is not used.
   </li>
   <li>
-      The automatic template instantiation at link time (<a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/C_002b_002b-Dialect-Options.html#index-frepo"><code>-frepo</code></a>) has been deprecated and
-    will be removed in a future release.
+    The automatic template instantiation at link time
+    (<a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/C_002b_002b-Dialect-Options.html#index-frepo"><code>-frepo</code></a>)
+    has been deprecated and will be removed in a future release.
+  </li>
+  <li>
+    The <code>--with-default-libstdcxx-abi=gcc4-compatible</code> configure
+    option is broken in the 9.1 and 9.2 releases, producing a shared library
+    with missing symbols
+    (see <a href="https://gcc.gnu.org/PR90361">Bug 90361</a>).
+    As a workaround, configure without that option and build GCC as normal,
+    then edit the installed <code>&lt;bits/c++config.h&gt;</code> headers
+    to define the <code>_GLIBCXX_USE_CXX11_ABI</code> macro to <code>0</code>.
   </li>
 
 </ul>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-14 11:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-12 16:41 [PATCH] PR libstdc++/90361 add missing macro definition Jonathan Wakely
2019-08-14 11:19 ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).