pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/clang clang: Fix SunOS include paths. Bump PKGRE...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1ee212661971
branches:  trunk
changeset: 318319:1ee212661971
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Wed Jan 23 15:44:34 2019 +0000

description:
clang: Fix SunOS include paths.  Bump PKGREVISION.

diffstat:

 lang/clang/Makefile                                        |   3 +-
 lang/clang/distinfo                                        |   6 +-
 lang/clang/patches/patch-lib_Driver_ToolChains_Solaris.cpp |  83 ++++++++++++-
 lang/clang/patches/patch-lib_Driver_ToolChains_Solaris.h   |  12 +-
 4 files changed, 90 insertions(+), 14 deletions(-)

diffs (191 lines):

diff -r 42937de5b6f7 -r 1ee212661971 lang/clang/Makefile
--- a/lang/clang/Makefile       Wed Jan 23 15:41:48 2019 +0000
+++ b/lang/clang/Makefile       Wed Jan 23 15:44:34 2019 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.46 2018/12/09 20:04:38 adam Exp $
+# $NetBSD: Makefile,v 1.47 2019/01/23 15:44:34 jperkin Exp $
 
 PKGNAME=               ${DISTNAME:S/.src//:S/cfe/clang/}
+PKGREVISION=           1
 PYTHON_FOR_BUILD_ONLY= yes
 
 CMAKE_ARGS+=   -DCLANG_ENABLE_STATIC_ANALYZER=OFF
diff -r 42937de5b6f7 -r 1ee212661971 lang/clang/distinfo
--- a/lang/clang/distinfo       Wed Jan 23 15:41:48 2019 +0000
+++ b/lang/clang/distinfo       Wed Jan 23 15:44:34 2019 +0000
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.56 2018/12/23 00:11:39 adam Exp $
+$NetBSD: distinfo,v 1.57 2019/01/23 15:44:34 jperkin Exp $
 
 SHA1 (cfe-7.0.1.src.tar.xz) = 427e12762836d808583fb4149c033d02de0a8db2
 RMD160 (cfe-7.0.1.src.tar.xz) = 914adafed7c97e5ebab15a437670906c404cb8bd
 SHA512 (cfe-7.0.1.src.tar.xz) = df2f38153ebdc261bcfa6a569567f759bbb1a803192882a9d4eca55a47878166ac9057151a94ad341dc1281136547e4faa783a68070dfde2307b48cacd4b9194
 Size (cfe-7.0.1.src.tar.xz) = 12488668 bytes
 SHA1 (patch-lib_Basic_Targets_OSTargets.h) = 2a00f6de42c67d8c8aca0153339aba1adc455280
-SHA1 (patch-lib_Driver_ToolChains_Solaris.cpp) = 17b6b748135fb051101e926f86910fd3bb55f312
-SHA1 (patch-lib_Driver_ToolChains_Solaris.h) = 07dacb5c341360bdce229f512bdfa95e5d6ef81c
+SHA1 (patch-lib_Driver_ToolChains_Solaris.cpp) = 7e951a4c82f47ec0c9c18054d9622984ffb9f751
+SHA1 (patch-lib_Driver_ToolChains_Solaris.h) = 94968d0de0972ff832727822fbdc02442be74ab8
 SHA1 (patch-lib_Frontend_InitHeaderSearch.cpp) = 497ddbe1eac8726d736bed58557a795dce207d1a
diff -r 42937de5b6f7 -r 1ee212661971 lang/clang/patches/patch-lib_Driver_ToolChains_Solaris.cpp
--- a/lang/clang/patches/patch-lib_Driver_ToolChains_Solaris.cpp        Wed Jan 23 15:41:48 2019 +0000
+++ b/lang/clang/patches/patch-lib_Driver_ToolChains_Solaris.cpp        Wed Jan 23 15:44:34 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-lib_Driver_ToolChains_Solaris.cpp,v 1.2 2018/12/09 20:04:38 adam Exp $
+$NetBSD: patch-lib_Driver_ToolChains_Solaris.cpp,v 1.3 2019/01/23 15:44:34 jperkin Exp $
 
 Use compiler-rt instead of libgcc.
 Pull in libcxx correctly.
@@ -53,7 +53,7 @@
      }
  
      // libpthread has been folded into libc since Solaris 10, no need to do
-@@ -88,13 +104,11 @@ void solaris::Linker::ConstructJob(Compi
+@@ -88,21 +104,21 @@ void solaris::Linker::ConstructJob(Compi
    if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) {
      if (!Args.hasArg(options::OPT_shared))
        CmdArgs.push_back(
@@ -61,16 +61,26 @@
 +          Args.MakeArgString(SysPath + "crt1.o"));
  
 -    CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath("crti.o")));
--    CmdArgs.push_back(
--        Args.MakeArgString(getToolChain().GetFilePath("values-Xa.o")));
 +    CmdArgs.push_back(Args.MakeArgString(SysPath + "crti.o"));
      CmdArgs.push_back(
+-        Args.MakeArgString(getToolChain().GetFilePath("values-Xa.o")));
+-    CmdArgs.push_back(
 -        Args.MakeArgString(getToolChain().GetFilePath("crtbegin.o")));
 +        Args.MakeArgString(SysPath + "values-Xa.o"));
    }
  
    // Provide __start___sancov_guards.  Solaris ld doesn't automatically create
-@@ -113,21 +127,18 @@ void solaris::Linker::ConstructJob(Compi
+   // __start_SECNAME labels.
++#if 0
+   CmdArgs.push_back("--whole-archive");
+   CmdArgs.push_back(
+       getToolChain().getCompilerRTArgString(Args, "sancov_begin", false));
+   CmdArgs.push_back("--no-whole-archive");
++#endif
+ 
+   getToolChain().AddFilePathLibArgs(Args, CmdArgs);
+ 
+@@ -113,37 +129,32 @@ void solaris::Linker::ConstructJob(Compi
    AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs, JA);
  
    if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) {
@@ -102,9 +112,15 @@
      if (NeedsSanitizerDeps)
        linkSanitizerRuntimeDeps(getToolChain(), CmdArgs);
    }
-@@ -139,11 +150,7 @@ void solaris::Linker::ConstructJob(Compi
+ 
+   // Provide __stop___sancov_guards.  Solaris ld doesn't automatically create
+   // __stop_SECNAME labels.
++#if 0
+   CmdArgs.push_back("--whole-archive");
+   CmdArgs.push_back(
        getToolChain().getCompilerRTArgString(Args, "sancov_end", false));
    CmdArgs.push_back("--no-whole-archive");
++#endif
  
 -  if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) {
 -    CmdArgs.push_back(
@@ -115,7 +131,7 @@
  
    getToolChain().addProfileRTLibs(Args, CmdArgs);
  
-@@ -172,26 +179,9 @@ Solaris::Solaris(const Driver &D, const 
+@@ -172,26 +183,9 @@ Solaris::Solaris(const Driver &D, const
                   const ArgList &Args)
      : Generic_ELF(D, Triple, Args) {
  
@@ -145,7 +161,7 @@
  }
  
  SanitizerMask Solaris::getSupportedSanitizers() const {
-@@ -211,6 +201,32 @@ Tool *Solaris::buildAssembler() const {
+@@ -211,6 +205,32 @@ Tool *Solaris::buildAssembler() const {
  
  Tool *Solaris::buildLinker() const { return new tools::solaris::Linker(*this); }
  
@@ -178,3 +194,54 @@
  void Solaris::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
                                          ArgStringList &CC1Args) const {
    const Driver &D = getDriver();
+@@ -243,40 +263,20 @@ void Solaris::AddClangSystemIncludeArgs(
+     return;
+   }
+ 
+-  // Add include directories specific to the selected multilib set and multilib.
+-  if (GCCInstallation.isValid()) {
+-    const MultilibSet::IncludeDirsFunc &Callback =
+-        Multilibs.includeDirsCallback();
+-    if (Callback) {
+-      for (const auto &Path : Callback(GCCInstallation.getMultilib()))
+-        addExternCSystemIncludeIfExists(
+-            DriverArgs, CC1Args, GCCInstallation.getInstallPath() + Path);
+-    }
+-  }
+-
+   addExternCSystemInclude(DriverArgs, CC1Args, D.SysRoot + "/usr/include");
+ }
+ 
+-void Solaris::addLibStdCxxIncludePaths(
++void Solaris::addLibCxxIncludePaths(
+     const llvm::opt::ArgList &DriverArgs,
+     llvm::opt::ArgStringList &CC1Args) const {
+-  // We need a detected GCC installation on Solaris (similar to Linux)
+-  // to provide libstdc++'s headers.
+-  if (!GCCInstallation.isValid())
+-    return;
++  addSystemInclude(DriverArgs, CC1Args,
++                   llvm::sys::path::parent_path(getDriver().getInstalledDir())
++                   + "/include/c++/v1");
++}
+ 
+-  // By default, look for the C++ headers in an include directory adjacent to
+-  // the lib directory of the GCC installation.
+-  // On Solaris this usually looks like /usr/gcc/X.Y/include/c++/X.Y.Z
+-  StringRef LibDir = GCCInstallation.getParentLibPath();
+-  StringRef TripleStr = GCCInstallation.getTriple().str();
+-  const Multilib &Multilib = GCCInstallation.getMultilib();
+-  const GCCVersion &Version = GCCInstallation.getVersion();
+-
+-  // The primary search for libstdc++ supports multiarch variants.
+-  addLibStdCXXIncludePaths(LibDir.str() + "/../include", "/c++/" + Version.Text,
+-                           TripleStr,
+-                           /*GCCMultiarchTriple*/ "",
+-                           /*TargetMultiarchTriple*/ "",
+-                           Multilib.includeSuffix(), DriverArgs, CC1Args);
++void Solaris::addLibStdCxxIncludePaths(
++    const llvm::opt::ArgList &DriverArgs,
++    llvm::opt::ArgStringList &CC1Args) const {
++  // Location of GCC includes is not reliable so do not support it.
++  return;
+ }
diff -r 42937de5b6f7 -r 1ee212661971 lang/clang/patches/patch-lib_Driver_ToolChains_Solaris.h
--- a/lang/clang/patches/patch-lib_Driver_ToolChains_Solaris.h  Wed Jan 23 15:41:48 2019 +0000
+++ b/lang/clang/patches/patch-lib_Driver_ToolChains_Solaris.h  Wed Jan 23 15:44:34 2019 +0000
@@ -1,10 +1,18 @@
-$NetBSD: patch-lib_Driver_ToolChains_Solaris.h,v 1.2 2018/12/09 20:04:38 adam Exp $
+$NetBSD: patch-lib_Driver_ToolChains_Solaris.h,v 1.3 2019/01/23 15:44:34 jperkin Exp $
 
 Override AddCXXStdlibLibArgs().
 
 --- lib/Driver/ToolChains/Solaris.h.orig       2018-02-05 23:59:13.000000000 +0000
 +++ lib/Driver/ToolChains/Solaris.h
-@@ -67,6 +67,9 @@ public:
+@@ -62,11 +62,17 @@ public:
+                             llvm::opt::ArgStringList &CC1Args) const override;
+ 
+   void
++  addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs,
++                        llvm::opt::ArgStringList &CC1Args) const override;
++  void
+   addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs,
+                            llvm::opt::ArgStringList &CC1Args) const override;
  
    SanitizerMask getSupportedSanitizers() const override;
    unsigned GetDefaultDwarfVersion() const override { return 2; }



Home | Main Index | Thread Index | Old Index