Index: tools/llvm-shlib/Makefile
===================================================================
--- tools/llvm-shlib/Makefile	(revision 102662)
+++ tools/llvm-shlib/Makefile	(working copy)
@@ -49,9 +49,14 @@
                             -Wl,-install_name \
                             -Wl,"@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)"
     endif
-endif
+else ifeq ($(HOST_OS),Solaris)
+    # FIXME: This is untested.
+    # Include everything from the .a's into the shared library.
+    LLVMLibsOptions := -Wl,-z,allextract $(LLVMLibsOptions) \
+                       -Wl,-z,defaultextract
+else
+    # Assume the gnu linker.
 
-ifeq ($(HOST_OS), Linux)
     # Include everything from the .a's into the shared library.
     LLVMLibsOptions := -Wl,--whole-archive $(LLVMLibsOptions) \
                        -Wl,--no-whole-archive
