components/llvm/patches/003-Makefile.rules.patch
author xiao qing lu - Sun Microsystems - Beijing China <xiaoqing.lu@oracle.com>
Tue, 12 Jul 2016 19:50:03 -0700
changeset 6403 9d25dbe7eb71
parent 5434 9f55c805ce9d
permissions -rw-r--r--
23209274 Upgrade libsigsegv to 2.10

# 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