components/llvm/patches/003-Makefile.rules.patch
changeset 5434 9f55c805ce9d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/llvm/patches/003-Makefile.rules.patch	Wed Feb 10 11:54:12 2016 -0800
@@ -0,0 +1,18 @@
+# Strip unused sections in Solaris.
+# https://llvm.org/bugs/show_bug.cgi?id=24641
+--- Makefile.rules	2014-11-04 16:35:15.000000000 -0800
++++ Makefile.rules	2015-07-17 18:28:25.379220132 -0700
+@@ -638,9 +638,12 @@
+   ifeq ($(HOST_OS),Darwin)
+     LD.Flags += -Wl,-dead_strip
+   else
+-    ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
++    ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW SunOS))
+       LD.Flags += -Wl,--gc-sections
+     endif
++    ifeq ($(HOST_OS), $(filter $(HOST_OS), SunOS))
++      LD.Flags += -Wl,-z -Wl,discard-unused=sections
++    endif
+   endif
+ endif
+