Index: tools/llvm-shlib/Makefile
===================================================================
--- tools/llvm-shlib/Makefile	(revision 110638)
+++ tools/llvm-shlib/Makefile	(working copy)
@@ -57,3 +57,9 @@
     # Don't allow unresolved symbols.
     LLVMLibsOptions += -Wl,--no-undefined
 endif
+
+ifeq ($(HOST_OS), FreeBSD)
+    # Include everything from the .a's into the shared library.
+    LLVMLibsOptions := -Wl,--whole-archive $(LLVMLibsOptions) \
+                       -Wl,--no-whole-archive
+endif
