pkgsrc-Changes archive

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

CVS commit: pkgsrc/lang/clang



Module Name:    pkgsrc
Committed By:   jperkin
Date:           Wed Jan 23 15:44:34 UTC 2019

Modified Files:
        pkgsrc/lang/clang: Makefile distinfo
        pkgsrc/lang/clang/patches: patch-lib_Driver_ToolChains_Solaris.cpp
            patch-lib_Driver_ToolChains_Solaris.h

Log Message:
clang: Fix SunOS include paths.  Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 pkgsrc/lang/clang/Makefile
cvs rdiff -u -r1.56 -r1.57 pkgsrc/lang/clang/distinfo
cvs rdiff -u -r1.2 -r1.3 \
    pkgsrc/lang/clang/patches/patch-lib_Driver_ToolChains_Solaris.cpp \
    pkgsrc/lang/clang/patches/patch-lib_Driver_ToolChains_Solaris.h

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

Modified files:

Index: pkgsrc/lang/clang/Makefile
diff -u pkgsrc/lang/clang/Makefile:1.46 pkgsrc/lang/clang/Makefile:1.47
--- pkgsrc/lang/clang/Makefile:1.46     Sun Dec  9 20:04:38 2018
+++ pkgsrc/lang/clang/Makefile  Wed Jan 23 15:44:34 2019
@@ -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

Index: pkgsrc/lang/clang/distinfo
diff -u pkgsrc/lang/clang/distinfo:1.56 pkgsrc/lang/clang/distinfo:1.57
--- pkgsrc/lang/clang/distinfo:1.56     Sun Dec 23 00:11:39 2018
+++ pkgsrc/lang/clang/distinfo  Wed Jan 23 15:44:34 2019
@@ -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

Index: pkgsrc/lang/clang/patches/patch-lib_Driver_ToolChains_Solaris.cpp
diff -u pkgsrc/lang/clang/patches/patch-lib_Driver_ToolChains_Solaris.cpp:1.2 pkgsrc/lang/clang/patches/patch-lib_Driver_ToolChains_Solaris.cpp:1.3
--- pkgsrc/lang/clang/patches/patch-lib_Driver_ToolChains_Solaris.cpp:1.2       Sun Dec  9 20:04:38 2018
+++ pkgsrc/lang/clang/patches/patch-lib_Driver_ToolChains_Solaris.cpp   Wed Jan 23 15:44:34 2019
@@ -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 @@ Test removing -Bdynamic for golang.
      }
  
      // 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 @@ Test removing -Bdynamic for golang.
 +          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 @@ Test removing -Bdynamic for golang.
      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 @@ Test removing -Bdynamic for golang.
  
    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 @@ Test removing -Bdynamic for golang.
  }
  
  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 @@ Test removing -Bdynamic for golang.
  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;
+ }
Index: pkgsrc/lang/clang/patches/patch-lib_Driver_ToolChains_Solaris.h
diff -u pkgsrc/lang/clang/patches/patch-lib_Driver_ToolChains_Solaris.h:1.2 pkgsrc/lang/clang/patches/patch-lib_Driver_ToolChains_Solaris.h:1.3
--- pkgsrc/lang/clang/patches/patch-lib_Driver_ToolChains_Solaris.h:1.2 Sun Dec  9 20:04:38 2018
+++ pkgsrc/lang/clang/patches/patch-lib_Driver_ToolChains_Solaris.h     Wed Jan 23 15:44:34 2019
@@ -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