summaryrefslogtreecommitdiff
path: root/lang/rust/patches/patch-src_llvm_Makefile.rules
diff options
context:
space:
mode:
Diffstat (limited to 'lang/rust/patches/patch-src_llvm_Makefile.rules')
-rw-r--r--lang/rust/patches/patch-src_llvm_Makefile.rules14
1 files changed, 14 insertions, 0 deletions
diff --git a/lang/rust/patches/patch-src_llvm_Makefile.rules b/lang/rust/patches/patch-src_llvm_Makefile.rules
new file mode 100644
index 00000000000..c87a7110d34
--- /dev/null
+++ b/lang/rust/patches/patch-src_llvm_Makefile.rules
@@ -0,0 +1,14 @@
+$NetBSD: patch-src_llvm_Makefile.rules,v 1.1 2016/09/06 10:36:49 jperkin Exp $
+
+"-z discard-unused" is only supported by Oracle Solaris ld.
+
+--- src/llvm/Makefile.rules.orig 2016-07-04 18:05:12.000000000 +0000
++++ src/llvm/Makefile.rules
+@@ -644,7 +644,6 @@ ifndef NO_DEAD_STRIP
+ LD.Flags += -Wl,-dead_strip
+ else
+ ifeq ($(HOST_OS),SunOS)
+- LD.Flags += -Wl,-z -Wl,discard-unused=sections
+ else
+ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
+ LD.Flags += -Wl,--gc-sections