Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Fix c++ support on recent DragonFly BSD releases #25596

Open Quuxplusone opened 8 years ago

Quuxplusone commented 8 years ago
Bugzilla Link PR25597
Status NEW
Importance P normal
Reported by John Marino (draco@marino.st)
Reported on 2015-11-21 16:33:15 -0800
Last modified on 2015-12-02 18:13:38 -0800
Version trunk
Hardware PC DragonFly BSD
CC dimitry@andric.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments patch-upgrade-dragonfly (5742 bytes, text/plain)
patch-upgrade-dragonfly2 (4863 bytes, text/plain)
Blocks
Blocked by
See also PR25595
Created attachment 15328
Update clang driver to support current DragonFly BSD out of the box

Clang support for DragonFly BSD is lagging a bit, resulting in poor support for
c++.

DragonFlyBSD is unique in that it has two base compilers.  At the time of the
last Clang update for DragonFly, these compilers were GCC 4.4 and GCC 4.7
(default).

With DragonFly Release 4.2, GCC 4.4 was replaced with GCC 5.0, partially
because the C++11 support of GCC 4.7 was incomplete.  The DragonFly project
will Release version 4.4 soon.

This patch updates the Clang driver to use libstdc++ from GCC 5.2  The support
for falling back to the alternate compiler was removed for two reasons:

1) The last release to use GCC 4.7 is DF 4.0 which has already reached EOL
2) GCC 4.7 libstdc++ is insufficient for many "ports"

Therefore, I think it is reasonable that the development version of clang
expects GCC 5.2 to be in place and not try to fall back to another compiler.

The attached patch will do this.  The Tools.cpp file was signficantly modified
to fix the linking which had been changed somewhere along the line.  The rest
of the changes should be self-explanatory.
Quuxplusone commented 8 years ago

hmm, let's put this patch on hold.

Using clang, I see an undefined reference to _Unwind_Resume which I would guess is coming from the link order I changed. I'll need to take a closer look at it.

Quuxplusone commented 8 years ago

Attached patch-upgrade-dragonfly (5742 bytes, text/plain): Update clang driver to support current DragonFly BSD out of the box

Quuxplusone commented 8 years ago

Attached patch-upgrade-dragonfly2 (4863 bytes, text/plain): Updated: clang driver to support current DragonFly BSD out of the box

Quuxplusone commented 8 years ago

Can somebody pick up this PR? The patch should apply directly to trunk and it's harmless in the sense that it only affects DragonFly.

Quuxplusone commented 8 years ago

Review posted at http://reviews.llvm.org/D15166, cfe-commits on CC.