pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

clang-netbsd: Don't add -ldl for NetBSD



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Tue Jun 20 18:09:14 2017 +0200
Changeset:	496bc4fff1a8511639397fbf793aca56eaa0cc2b

Modified Files:
	clang-netbsd/distinfo
Added Files:
	clang-netbsd/patches/patch-lib_Driver_ToolChains_CommonArgs.cpp
	clang-netbsd/patches/patch-lib_Driver_ToolChains_Gnu.cpp

Log Message:
clang-netbsd: Don't add -ldl for NetBSD

This fixes sanitizer constructs.

Sponsored by <The NetBSD Foundation>

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=496bc4fff1a8511639397fbf793aca56eaa0cc2b

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 clang-netbsd/distinfo                                      |  2 ++
 .../patches/patch-lib_Driver_ToolChains_CommonArgs.cpp     | 14 ++++++++++++++
 clang-netbsd/patches/patch-lib_Driver_ToolChains_Gnu.cpp   | 14 ++++++++++++++
 3 files changed, 30 insertions(+)

diffs:
diff --git a/clang-netbsd/distinfo b/clang-netbsd/distinfo
index c88dcdc222..0569b18bbb 100644
--- a/clang-netbsd/distinfo
+++ b/clang-netbsd/distinfo
@@ -13,6 +13,8 @@ SHA1 (llvm-3.6.2.src.tar.xz) = 7a00257eb2bc9431e4c77c3a36b033072c54bc7e
 RMD160 (llvm-3.6.2.src.tar.xz) = 521cbc5fe2925ea3c6e90c7a31f752a04045c972
 Size (llvm-3.6.2.src.tar.xz) = 12802380 bytes
 SHA1 (patch-lib_Basic_Targets.cpp) = 7b2e13a71f2b09c3f7336f21371637d3e39e4043
+SHA1 (patch-lib_Driver_ToolChains_CommonArgs.cpp) = 9454e8f55ae3445bceabb4f33f80c86a616aeb60
+SHA1 (patch-lib_Driver_ToolChains_Gnu.cpp) = 241c603172fffe6bc8ef3a3733bd3f42c19abbf1
 SHA1 (patch-lib_Driver_ToolChains_NetBSD.cpp) = 7a45ff6e566467a30d4f0d48683141b9485eaa0e
 SHA1 (patch-lib_Driver_ToolChains_NetBSD.h) = 965f5c1a64461bbd3ea446148796e2dbddc2c9ca
 SHA1 (patch-test_Sema_128bitfloat.cpp) = cc11582dd9495b603a22ef73609ab04f65324da2
diff --git a/clang-netbsd/patches/patch-lib_Driver_ToolChains_CommonArgs.cpp b/clang-netbsd/patches/patch-lib_Driver_ToolChains_CommonArgs.cpp
new file mode 100644
index 0000000000..ca0499493a
--- /dev/null
+++ b/clang-netbsd/patches/patch-lib_Driver_ToolChains_CommonArgs.cpp
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- lib/Driver/ToolChains/CommonArgs.cpp.orig	2017-06-12 12:55:07.000000000 +0000
++++ lib/Driver/ToolChains/CommonArgs.cpp
+@@ -505,7 +505,8 @@ void tools::linkSanitizerRuntimeDeps(con
+   CmdArgs.push_back("-lm");
+   // There's no libdl on FreeBSD or RTEMS.
+   if (TC.getTriple().getOS() != llvm::Triple::FreeBSD &&
+-      TC.getTriple().getOS() != llvm::Triple::RTEMS)
++      TC.getTriple().getOS() != llvm::Triple::RTEMS &&
++      TC.getTriple().getOS() != llvm::Triple::NetBSD)
+     CmdArgs.push_back("-ldl");
+ }
+ 
diff --git a/clang-netbsd/patches/patch-lib_Driver_ToolChains_Gnu.cpp b/clang-netbsd/patches/patch-lib_Driver_ToolChains_Gnu.cpp
new file mode 100644
index 0000000000..d6a991f8e5
--- /dev/null
+++ b/clang-netbsd/patches/patch-lib_Driver_ToolChains_Gnu.cpp
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- lib/Driver/ToolChains/Gnu.cpp.orig	2017-06-17 19:09:48.000000000 +0000
++++ lib/Driver/ToolChains/Gnu.cpp
+@@ -347,7 +347,8 @@ static void linkXRayRuntimeDeps(const To
+   CmdArgs.push_back("-lrt");
+   CmdArgs.push_back("-lm");
+ 
+-  if (TC.getTriple().getOS() != llvm::Triple::FreeBSD)
++  if (TC.getTriple().getOS() != llvm::Triple::FreeBSD &&
++      TC.getTriple().getOS() != llvm::Triple::NetBSD)
+     CmdArgs.push_back("-ldl");
+ }
+ 


Home | Main Index | Thread Index | Old Index