[PATCH] D34212: docs: Document binary compatibility issue due to bug in gcc
Tom Stellard via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 2 15:15:25 PDT 2017
tstellar updated this revision to Diff 109438.
tstellar added a comment.
Add links to index.rst and UsersManual.rst, and fix link to bug.
https://reviews.llvm.org/D34212
Files:
docs/BinaryCompatibilityWithOtherCompilers.rst
docs/UsersManual.rst
docs/index.rst
Index: docs/index.rst
===================================================================
--- docs/index.rst
+++ docs/index.rst
@@ -40,6 +40,7 @@
Modules
MSVCCompatibility
ThinLTO
+ BinaryCompatibilityWithOtherCompilers
CommandGuide/index
FAQ
Index: docs/UsersManual.rst
===================================================================
--- docs/UsersManual.rst
+++ docs/UsersManual.rst
@@ -2013,6 +2013,9 @@
.. _objc:
+:doc:`BinaryCompatibilityWithOtherCompilers`
+--------------------------------------------
+
Objective-C Language Features
=============================
Index: docs/BinaryCompatibilityWithOtherCompilers.rst
===================================================================
--- /dev/null
+++ docs/BinaryCompatibilityWithOtherCompilers.rst
@@ -0,0 +1,39 @@
+=========================================
+Binary compatibility with other compilers
+=========================================
+
+Introduction
+============
+
+This document describes some of the known binary compatibility problems
+when mixing object files built by clang with object files built by
+other compilers.
+
+If you run into a compatibility issue, please file a bug at bugs.llvm.org.
+
+gcc C++ ABI bug with variadic templates
+=======================================
+
+Older versions of gcc incorrectly mangle variadic class/function templates,
+which can lead to undefined symbol errors when linking gcc built objects
+with clang built objects.
+
+gcc does emit the correct symbol name as an alias for the incorrect one,
+so libraries built by gcc are not affected by this bug. You can only
+hit this bug if you have a library built by clang and you try to link
+against it with a gcc built object that uses a variadic class/function
+template from the library.
+
+workarounds:
+^^^^^^^^^^^
+
+* Use gcc 5.1.0 or newer.
+* Pass the -fabi-version=6 option to gcc when using versions < 5.1.0.
+
+gcc bug report:
+^^^^^^^^^^^^^^^
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51322
+
+llvm bug report:
+^^^^^^^^^^^^^^^^
+https://bugs.llvm.org/show_bug.cgi?id=33161
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34212.109438.patch
Type: text/x-patch
Size: 2092 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170802/5bc91693/attachment.bin>
More information about the cfe-commits
mailing list