Fix for compiling on Solaris

bill rushmore bill.rushmore at oracle.com
Fri Feb 27 10:04:02 PST 2015


I have a very simple patch for Makefile.rules that solves the problem of 
trying to build on Solaris.  The issue is that Solaris' gcc uses the 
Solaris linker and that linker doesn't have the --gc-sections flag.  
This patch fixes Bug 18517.

Bill Rushmore
-------------- next part --------------
Index: Makefile.rules
===================================================================
--- Makefile.rules	(revision 230649)
+++ Makefile.rules	(working copy)
@@ -637,8 +637,8 @@
 ifndef NO_DEAD_STRIP
   ifeq ($(HOST_OS),Darwin)
     LD.Flags += -Wl,-dead_strip
-  else
-    ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
+  else	
+    ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW SunOS))
       LD.Flags += -Wl,--gc-sections
     endif
   endif


More information about the llvm-commits mailing list