This is an archive of the discontinued LLVM Phabricator instance.

Add check for BSD when setting LIB_NAMES for GNU ld
ClosedPublic

Authored by ararslan on Jan 2 2017, 12:02 AM.

Details

Summary

FreeBSD (as well as DragonFly BSD) uses GNU ld for linking, but is not captured in the conditional on Linux or MinGW when setting LIB_NAMES. This causes a shared library with no symbols on FreeBSD. This patch simply adds a check for whether the CMake system name is FreeBSD or DragonFly in addition to the existing checks for Linux and MinGW.

This patch is based on that used by the FreeBSD LLVM 3.9 port, revision 426189. The majority of the diff is by Koop Mast (kwm). Alex Arslan (ararslan) updated it for use on the current LLVM trunk.

Diff Detail

Repository
rL LLVM

Event Timeline

ararslan updated this revision to Diff 82796.Jan 2 2017, 12:02 AM
ararslan retitled this revision from to Add check for BSD when setting LIB_NAMES for GNU ld.
ararslan updated this object.
ararslan added reviewers: chandlerc, axw.
ararslan added a subscriber: llvm-commits.
tkelman added a subscriber: tkelman.Jan 4 2017, 8:46 AM
axw accepted this revision.Jan 15 2017, 4:03 PM
axw edited edge metadata.
This revision is now accepted and ready to land.Jan 15 2017, 4:03 PM

Thanks for taking a look at this, @axw. Is there anything else that needs to happen before this can be merged?

This revision was automatically updated to reflect the committed changes.
axw added a comment.Mar 25 2017, 11:11 PM

Thanks for taking a look at this, @axw. Is there anything else that needs to happen before this can be merged?

Nope, sorry - I've committed it now.