]> granicus.if.org Git - clang/commit
As reported in https://llvm.org/bugs/show_bug.cgi?id=25496, on FreeBSD,
authorDimitry Andric <dimitry@andric.com>
Sun, 14 Feb 2016 16:08:20 +0000 (16:08 +0000)
committerDimitry Andric <dimitry@andric.com>
Sun, 14 Feb 2016 16:08:20 +0000 (16:08 +0000)
commit3c7f04f6360bef27557212d7c1b4662f6e5aeb76
tree07cd0e10af0e31f15d61b37f403388d160f6c33e
parentc077371eb6feb59039ef906f7dc4c87a3ce4ba76
As reported in https://llvm.org/bugs/show_bug.cgi?id=25496, on FreeBSD,
C++ programs compiled for profiling (using `-pg`) should be linked with
`-lc++_p` (or `-lstdc++_p`, depending on the `-stdlib=` setting), not
with the regular C++ libraries.

Add a `FreeBSD::AddCXXStdlibLibArgs()` override to handle this, and add
a test case for it.  While here, extend the test case for the proper
passing of -lm and -lm_p.

Reviewers: compnerd, davide, dws, emaste
Reviewed By: compnerd
Differential Revision: http://reviews.llvm.org/D16264

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260851 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/ToolChains.cpp
lib/Driver/ToolChains.h
test/Driver/freebsd.cpp