Bug#693498: patch for clang/kfreebsd
Christoph Egger
christoph at debian.org
Fri Nov 23 21:42:10 UTC 2012
Control: tag -1 +patch
The following works for me, Probably it would be cleaner to add this to
a kFreeBSD toolchain class but it's also in Linux just for the debian
case.
Regards
Christoph
--- clang-3.1+rt.orig/tools/clang/lib/Driver/ToolChains.h
+++ clang-3.1+rt/tools/clang/lib/Driver/ToolChains.h
@@ -130,6 +130,9 @@ public:
virtual bool IsUnwindTablesDefault() const;
virtual const char *GetDefaultRelocationModel() const;
virtual const char *GetForcedPicModel() const;
+ virtual void AddClangSystemIncludeArgs(const ArgList &DriverArgs,
+ ArgStringList &CC1Args) const;
+
protected:
/// \name ToolChain Implementation Helper Functions
--- clang-3.1+rt.orig/tools/clang/lib/Driver/ToolChains.cpp
+++ clang-3.1+rt/tools/clang/lib/Driver/ToolChains.cpp
@@ -1075,6 +1075,13 @@ Generic_GCC::GCCVersion Linux::GCCVersio
return GoodVersion;
}
+void Generic_GCC::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
+ ArgStringList &CC1Args) const {
+ // Under Debian, clang headers are installed into
+ // '/usr/include/clang/VERSION/include/'
+ addSystemInclude(DriverArgs, CC1Args, "/usr/include/clang/" + std::string(CLANG_VERSION_STRING) + "/include/");
+}
+
/// \brief Less-than for GCCVersion, implementing a Strict Weak Ordering.
bool Generic_GCC::GCCVersion::operator<(const GCCVersion &RHS) const {
if (Major < RHS.Major) return true; if (Major > RHS.Major) return false;
More information about the Pkg-llvm-team
mailing list