This is an archive of the discontinued LLVM Phabricator instance.

Work around GCC PR37804
ClosedPublic

Authored by mdaniels on Jan 3 2017, 12:16 PM.

Details

Summary

Using gcc with libc++ is not able to build boost's program_options library.

It looks like this is caused by a bug in gcc[0], and this change attempts to work around a couple cases where it gets hit.

The gcc report also mentions a problem with vector/string but I was not able to reproduce that locally, and believe that specific case was fixed with https://reviews.llvm.org/D7201

[0] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37804

Diff Detail

Event Timeline

mdaniels updated this revision to Diff 82929.Jan 3 2017, 12:16 PM
mdaniels retitled this revision from to Work around GCC PR37804.
mdaniels updated this object.
mdaniels added reviewers: EricWF, mclow.lists.
EricWF accepted this revision.Jan 4 2017, 2:04 PM
EricWF edited edge metadata.

Well that is a shitty GCC bug. Thanks for the workaround.

include/__tree
26
  1. This should probably be #if defined(__GNUC__) && !defined(__clang__)
  2. Please use the bug URL gcc.gnu.org/PR37804 is the comment instead.
This revision is now accepted and ready to land.Jan 4 2017, 2:04 PM
mdaniels updated this revision to Diff 83136.Jan 4 2017, 2:14 PM
mdaniels edited edge metadata.

Update based on Eric's feedback.

mdaniels marked an inline comment as done.Jan 4 2017, 2:15 PM

Mark done.

mclow.lists closed this revision.Jan 23 2019, 3:06 PM

I changed the _LIBCPP_TYPE_VIS_ONLY to _LIBCPP_TEMPLATE_VIS and committed this as revision 351993.

Hey Marshall and Michael,

As mentioned in my email to all the lists[1], patches posted to Phabricator before the new license was installed should be confirmed as under the new license before being rebased and applied. Not sure that happened here as the file headers are still the old file headers.

I'll update the file headers anyways, and I think this is fine as Michael is contributing with an @apple.com email address and so all of this is covered by their agreement anyways. But I wanted to mention it in case there are other in-flight patches on Phabricator where this is relevant.

-Chandler

[1]: http://lists.llvm.org/pipermail/llvm-dev/2018-December/128695.html (llvm-dev), http://lists.llvm.org/pipermail/libcxx-dev/2019-January/000140.html (libcxx-dev)