$ /usr/local/llvm50/bin/llvm-config --system-libs -lrt -l/usr/lib/libexecinfo.so -ltinfo -lpthread -lz -lm $ cc $(/usr/local/llvm50/bin/llvm-config --system-libs) test.c /usr/bin/ld: cannot find -l/usr/lib/libexecinfo.so cc: error: linker command failed with exit code 1 (use -v to see invocation) Shouldn't that say -lexecinfo instead of -l/usr/lib/libexecinfo.so?
I should probably add that I installed llvm50 via pkg.
This has been fixed in current. If it's a major issue and you can't switch your pkg repo to current I can look at merging the fix to the quarterly branch. Closing for now, but do reply if you need it fixed in the quarterly branch.
I now see that this change was merged last night.
I believe that this fix not being in quarterly results in other packages such as flang not becoming available in the quarterly branch. See: https://forums.freebsd.org/threads/64517/
This was fixed in 2018Q1 with https://svnweb.freebsd.org/ports?view=revision&revision=460693
Correction, I see the report is that that the merge broke flang, not that the fix was missing. That should have been reported clearly in a separate bug.
Apologies for the mistaken assessment. If the merge of the fix broke flang (and possibly other packages?), should a bug report be made for the flang port or is the problem with this port (since the merged change broke packages that rely on it)?
It looks like r459134 needs to be merged to 2018Q1 to fix clang-clang.
I have made a request for that revision of flang to be merged into the 2018Q1 branch (in an associated bug that was closed as a result of that revision). See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225174#c7