pkgsrc-WIP-changes archive

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

clang-netbsd: Fix NetBSD driver for current



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Wed Apr 18 07:20:51 2018 +0200
Changeset:	035c534f5986291bc7a8a07c7b891fff0f5c4ff1

Modified Files:
	clang-netbsd/distinfo
	clang-netbsd/patches/patch-lib_Driver_ToolChains_NetBSD.cpp

Log Message:
clang-netbsd: Fix NetBSD driver for current

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=035c534f5986291bc7a8a07c7b891fff0f5c4ff1

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_NetBSD.cpp | 51 +++++-----------------
 2 files changed, 11 insertions(+), 42 deletions(-)

diffs:
diff --git a/clang-netbsd/distinfo b/clang-netbsd/distinfo
index 3432e5d4b9..fb3388e3a5 100644
--- a/clang-netbsd/distinfo
+++ b/clang-netbsd/distinfo
@@ -1,6 +1,6 @@
 $NetBSD: distinfo,v 1.35 2015/09/11 01:21:57 tnn Exp $
 
 SHA1 (patch-lib_Basic_Targets_OSTargets.h) = 9d229074c8e36be37176349971667817b227eaa5
-SHA1 (patch-lib_Driver_ToolChains_NetBSD.cpp) = e9fa3adccfb3ddfc24b83d51ced5dfa9ac17938e
+SHA1 (patch-lib_Driver_ToolChains_NetBSD.cpp) = 35117f4a3d6bb7b3bc46f06885e5a5f1d2ec5210
 SHA1 (patch-test_Sema_128bitfloat.cpp) = cc11582dd9495b603a22ef73609ab04f65324da2
 SHA1 (patch-tools_clang-format_CMakeLists.txt) = f119d2a94cbfb8c00a285d1aa7789ed26f8309cf
diff --git a/clang-netbsd/patches/patch-lib_Driver_ToolChains_NetBSD.cpp b/clang-netbsd/patches/patch-lib_Driver_ToolChains_NetBSD.cpp
index 56b1aaf42a..35f71664d2 100644
--- a/clang-netbsd/patches/patch-lib_Driver_ToolChains_NetBSD.cpp
+++ b/clang-netbsd/patches/patch-lib_Driver_ToolChains_NetBSD.cpp
@@ -1,39 +1,8 @@
 $NetBSD$
 
---- lib/Driver/ToolChains/NetBSD.cpp.orig	2018-02-16 03:40:05.438666489 +0000
+--- lib/Driver/ToolChains/NetBSD.cpp.orig	2018-02-16 03:40:05.000000000 +0000
 +++ lib/Driver/ToolChains/NetBSD.cpp
-@@ -24,6 +24,30 @@ using namespace clang::driver::toolchain
- using namespace clang;
- using namespace llvm::opt;
- 
-+static bool addXRayRuntime(const ToolChain &TC, const ArgList &Args,
-+                           ArgStringList &CmdArgs) {
-+  if (Args.hasArg(options::OPT_shared))
-+    return false;
-+
-+  if (Args.hasFlag(options::OPT_fxray_instrument,
-+                   options::OPT_fnoxray_instrument, false)) {
-+    CmdArgs.push_back("-whole-archive");
-+    CmdArgs.push_back(TC.getCompilerRTArgString(Args, "xray", false));
-+    CmdArgs.push_back("-no-whole-archive");
-+    return true;
-+  }
-+
-+  return false;
-+}
-+
-+static void linkXRayRuntimeDeps(const ToolChain &TC, const ArgList &Args,
-+                                ArgStringList &CmdArgs) {
-+  CmdArgs.push_back("--no-as-needed");
-+  CmdArgs.push_back("-pthread");
-+  CmdArgs.push_back("-lrt");
-+  CmdArgs.push_back("-lm");
-+}
-+
- void netbsd::Assembler::ConstructJob(Compilation &C, const JobAction &JA,
-                                      const InputInfo &Output,
-                                      const InputInfoList &Inputs,
-@@ -112,7 +136,9 @@ void netbsd::Linker::ConstructJob(Compil
+@@ -112,7 +112,9 @@ void netbsd::Linker::ConstructJob(Compil
                                    const InputInfoList &Inputs,
                                    const ArgList &Args,
                                    const char *LinkingOutput) const {
@@ -44,7 +13,7 @@ $NetBSD$
    ArgStringList CmdArgs;
  
    if (!D.SysRoot.empty())
-@@ -135,7 +161,7 @@ void netbsd::Linker::ConstructJob(Compil
+@@ -135,7 +137,7 @@ void netbsd::Linker::ConstructJob(Compil
  
    // Many NetBSD architectures support more than one ABI.
    // Determine the correct emulation for ld.
@@ -53,7 +22,7 @@ $NetBSD$
    case llvm::Triple::x86:
      CmdArgs.push_back("-m");
      CmdArgs.push_back("elf_i386");
-@@ -143,7 +169,7 @@ void netbsd::Linker::ConstructJob(Compil
+@@ -143,7 +145,7 @@ void netbsd::Linker::ConstructJob(Compil
    case llvm::Triple::arm:
    case llvm::Triple::thumb:
      CmdArgs.push_back("-m");
@@ -62,7 +31,7 @@ $NetBSD$
      case llvm::Triple::EABI:
      case llvm::Triple::GNUEABI:
        CmdArgs.push_back("armelf_nbsd_eabi");
-@@ -159,9 +185,9 @@ void netbsd::Linker::ConstructJob(Compil
+@@ -159,9 +161,9 @@ void netbsd::Linker::ConstructJob(Compil
      break;
    case llvm::Triple::armeb:
    case llvm::Triple::thumbeb:
@@ -74,7 +43,7 @@ $NetBSD$
      case llvm::Triple::EABI:
      case llvm::Triple::GNUEABI:
        CmdArgs.push_back("armelfb_nbsd_eabi");
-@@ -179,13 +205,13 @@ void netbsd::Linker::ConstructJob(Compil
+@@ -179,13 +181,13 @@ void netbsd::Linker::ConstructJob(Compil
    case llvm::Triple::mips64el:
      if (mips::hasMipsAbiArg(Args, "32")) {
        CmdArgs.push_back("-m");
@@ -90,7 +59,7 @@ $NetBSD$
          CmdArgs.push_back("elf64btsmip");
        else
          CmdArgs.push_back("elf64ltsmip");
-@@ -226,16 +252,16 @@ void netbsd::Linker::ConstructJob(Compil
+@@ -226,16 +228,16 @@ void netbsd::Linker::ConstructJob(Compil
    if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) {
      if (!Args.hasArg(options::OPT_shared)) {
        CmdArgs.push_back(
@@ -111,7 +80,7 @@ $NetBSD$
      }
    }
  
-@@ -248,13 +274,14 @@ void netbsd::Linker::ConstructJob(Compil
+@@ -248,13 +250,14 @@ void netbsd::Linker::ConstructJob(Compil
    Args.AddAllArgs(CmdArgs, options::OPT_r);
  
    bool NeedsSanitizerDeps = addSanitizerRuntimes(getToolChain(), Args, CmdArgs);
@@ -128,7 +97,7 @@ $NetBSD$
      case llvm::Triple::aarch64:
      case llvm::Triple::aarch64_be:
      case llvm::Triple::arm:
-@@ -278,12 +305,14 @@ void netbsd::Linker::ConstructJob(Compil
+@@ -278,12 +281,14 @@ void netbsd::Linker::ConstructJob(Compil
    if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) {
      addOpenMPRuntime(CmdArgs, getToolChain(), Args);
      if (D.CCCIsCXX()) {
@@ -145,7 +114,7 @@ $NetBSD$
      if (Args.hasArg(options::OPT_pthread))
        CmdArgs.push_back("-lpthread");
      CmdArgs.push_back("-lc");
-@@ -308,16 +337,16 @@ void netbsd::Linker::ConstructJob(Compil
+@@ -308,16 +313,16 @@ void netbsd::Linker::ConstructJob(Compil
    if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) {
      if (Args.hasArg(options::OPT_shared) || Args.hasArg(options::OPT_pie))
        CmdArgs.push_back(


Home | Main Index | Thread Index | Old Index