diff --git a/devel/llvm/Makefile b/devel/llvm/Makefile index 1ca40aaf357..2c3a2be107b 100644 --- a/devel/llvm/Makefile +++ b/devel/llvm/Makefile @@ -1,11 +1,10 @@ -# $OpenBSD: Makefile,v 1.14 2009/06/29 13:42:54 sthen Exp $ +# $OpenBSD: Makefile,v 1.15 2009/08/09 11:26:03 sthen Exp $ COMMENT = Low Level Virtual Machine (LLVM) compiler infrastructure -LLVM_V = 2.6pre20090621 +LLVM_V = 2.6pre20090808 DISTNAME = llvm-${LLVM_V} EXTRACT_SUFX = .tar.bz2 -PKGNAME = ${DISTNAME}p1 CATEGORIES = devel @@ -36,8 +35,13 @@ MODGCC4_ARCHES =* LIB_DEPENDS = elf::devel/libelf -BUILD_DEPENDS = ::math/graphviz -RUN_DEPENDS = ::math/graphviz +# graphviz can be optionally used to draw graphs, but adds heavy build and +# run dependencies, and this feature is often not needed. lie to autoconf +# so we can build consistent packages without pulling in a stack of gnome +# libraries; people wanting to use this can pkg_add graphviz. +CONFIGURE_ENV = ac_cv_path_DOT=${LOCALBASE}/bin/dot \ + ac_cv_path_DOTTY=${LOCALBASE}/bin/dotty \ + ac_cv_path_GV="echo gv" REGRESS_DEPENDS=::devel/dejagnu @@ -64,10 +68,8 @@ pre-configure: @ln -s ${MODPY_BIN} ${WRKDIR}/bin/python # XXX googletest doesn't build -# XXX symlink to workaround problem finding the correct clang binary path post-install: - @ln -s ${TRUEPREFIX}/libexec/clang-cc ${PREFIX}/bin @${INSTALL_DATA_DIR} ${PREFIX}/share/llvm @${INSTALL_DATA_DIR} ${WRKINST}/${MODPY_SITEPKG} @${INSTALL_SCRIPT} ${WRKSRC}/tools/clang/utils/ccc-analyzer \ diff --git a/devel/llvm/TODO b/devel/llvm/TODO deleted file mode 100644 index ccbf3b10ceb..00000000000 --- a/devel/llvm/TODO +++ /dev/null @@ -1,13 +0,0 @@ -clang: - -- /usr/local/bin/clang (front-end) doesn't search /usr/local/libexec for -the clang-cc backend. - -- library search order doesn't match base compilers (/usr/local/include -before /usr/include). - -- target-specific definitions (__OpenBSD__ etc); see -tools/clang/lib/Basic/Targets.cpp - -- scan-build'ing an autoconf project fails - diff --git a/devel/llvm/distinfo b/devel/llvm/distinfo index 7f59a0bc87b..3230907d908 100644 --- a/devel/llvm/distinfo +++ b/devel/llvm/distinfo @@ -1,5 +1,5 @@ -MD5 (llvm-2.6pre20090621.tar.bz2) = KZvB4QBd27Oyl+/22PWUgg== -RMD160 (llvm-2.6pre20090621.tar.bz2) = tXgWSI2MI3Z1rnBakrOXjN82WdA= -SHA1 (llvm-2.6pre20090621.tar.bz2) = ku3mZshKbfoPXy8ZuO/8/ZTTWUY= -SHA256 (llvm-2.6pre20090621.tar.bz2) = YEkBZqSHcwEhu2XBX4ScVHtBVJwqJvS5au1mJT34yLs= -SIZE (llvm-2.6pre20090621.tar.bz2) = 8336709 +MD5 (llvm-2.6pre20090808.tar.bz2) = 2/6Krvxxe3eUWV3b+whmng== +RMD160 (llvm-2.6pre20090808.tar.bz2) = BZLj/BzLVUPpqprjCFyc6/FCCd4= +SHA1 (llvm-2.6pre20090808.tar.bz2) = aRe7xnV4SPnxT2kCQv53xbg6nV4= +SHA256 (llvm-2.6pre20090808.tar.bz2) = e/i+NARAcjNQW3CnDzhhRUxRYaBd0Jj5XsTYpW6SnuM= +SIZE (llvm-2.6pre20090808.tar.bz2) = 9078269 diff --git a/devel/llvm/patches/patch-include_llvm_ADT_Triple_h b/devel/llvm/patches/patch-include_llvm_ADT_Triple_h deleted file mode 100644 index 9a7d3044a67..00000000000 --- a/devel/llvm/patches/patch-include_llvm_ADT_Triple_h +++ /dev/null @@ -1,11 +0,0 @@ -$OpenBSD: patch-include_llvm_ADT_Triple_h,v 1.1 2009/06/25 15:25:13 sthen Exp $ ---- include/llvm/ADT/Triple.h.orig Tue Jun 23 11:49:14 2009 -+++ include/llvm/ADT/Triple.h Tue Jun 23 11:50:07 2009 -@@ -52,6 +52,7 @@ class Triple { (public) - AuroraUX, - Darwin, - DragonFly, -+ OpenBSD, - FreeBSD, - Linux - }; diff --git a/devel/llvm/patches/patch-lib_Support_Triple_cpp b/devel/llvm/patches/patch-lib_Support_Triple_cpp deleted file mode 100644 index 867bee90f02..00000000000 --- a/devel/llvm/patches/patch-lib_Support_Triple_cpp +++ /dev/null @@ -1,20 +0,0 @@ -$OpenBSD: patch-lib_Support_Triple_cpp,v 1.1 2009/06/25 15:25:13 sthen Exp $ ---- lib/Support/Triple.cpp.orig Tue Jun 23 11:52:16 2009 -+++ lib/Support/Triple.cpp Tue Jun 23 11:53:41 2009 -@@ -46,6 +46,7 @@ const char *Triple::getOSTypeName(OSType Kind) { - case AuroraUX: return "auroraux"; - case Darwin: return "darwin"; - case DragonFly: return "dragonfly"; -+ case OpenBSD: return "openbsd"; - case FreeBSD: return "freebsd"; - case Linux: return "linux"; - } -@@ -86,6 +87,8 @@ void Triple::Parse() const { - OS = Darwin; - else if (memcmp(&OSName[0], "dragonfly", 9) == 0) - OS = DragonFly; -+ else if (memcmp(&OSName[0], "openbsd", 7) == 0) -+ OS = OpenBSD; - else if (memcmp(&OSName[0], "freebsd", 7) == 0) - OS = FreeBSD; - else if (memcmp(&OSName[0], "linux", 5) == 0) diff --git a/devel/llvm/patches/patch-tools_clang_include_clang_Driver_HostInfo_h b/devel/llvm/patches/patch-tools_clang_include_clang_Driver_HostInfo_h deleted file mode 100644 index 088dd7cdffd..00000000000 --- a/devel/llvm/patches/patch-tools_clang_include_clang_Driver_HostInfo_h +++ /dev/null @@ -1,12 +0,0 @@ -$OpenBSD: patch-tools_clang_include_clang_Driver_HostInfo_h,v 1.1 2009/06/25 15:25:13 sthen Exp $ ---- tools/clang/include/clang/Driver/HostInfo.h.orig Tue Jun 23 10:36:52 2009 -+++ tools/clang/include/clang/Driver/HostInfo.h Tue Jun 23 10:37:22 2009 -@@ -69,6 +69,8 @@ class HostInfo { (public) - - const HostInfo *createDarwinHostInfo(const Driver &D, - const llvm::Triple& Triple); -+const HostInfo *createOpenBSDHostInfo(const Driver &D, -+ const llvm::Triple& Triple); - const HostInfo *createFreeBSDHostInfo(const Driver &D, - const llvm::Triple& Triple); - const HostInfo *createDragonFlyHostInfo(const Driver &D, diff --git a/devel/llvm/patches/patch-tools_clang_lib_Basic_Targets_cpp b/devel/llvm/patches/patch-tools_clang_lib_Basic_Targets_cpp deleted file mode 100644 index 7a3ed75705e..00000000000 --- a/devel/llvm/patches/patch-tools_clang_lib_Basic_Targets_cpp +++ /dev/null @@ -1,91 +0,0 @@ -$OpenBSD: patch-tools_clang_lib_Basic_Targets_cpp,v 1.1 2009/06/25 15:25:13 sthen Exp $ ---- tools/clang/lib/Basic/Targets.cpp.orig Tue Jun 23 10:26:43 2009 -+++ tools/clang/lib/Basic/Targets.cpp Tue Jun 23 10:26:50 2009 -@@ -70,6 +70,19 @@ static void getSolarisDefines(const LangOptions &Opts, - Define(Defs, "__SVR4"); - } - -+static void getOpenBSDDefines(const LangOptions &Opts, bool is64Bit, -+ const char *Triple, std::vector &Defs) { -+ // OpenBSD defines; list based off of gcc output -+ -+ Define(Defs, "__OpenBSD__", "1"); -+ Define(Defs, "__KPRINTF_ATTRIBUTE__"); -+ DefineStd(Defs, "unix", Opts); -+ Define(Defs, "__ELF__", "1"); -+ if (is64Bit) { -+ Define(Defs, "__LP64__"); -+ } -+} -+ - static void getFreeBSDDefines(const LangOptions &Opts, bool is64Bit, - const char *Triple, std::vector &Defs) { - // FreeBSD defines; list based off of gcc output -@@ -862,6 +875,20 @@ class DarwinI386TargetInfo : public X86_32TargetInfo { - } // end anonymous namespace - - namespace { -+// x86-32 OpenBSD target -+class OpenBSDX86_32TargetInfo : public X86_32TargetInfo { -+public: -+ OpenBSDX86_32TargetInfo(const std::string& triple) : -+ X86_32TargetInfo(triple) { } -+ virtual void getTargetDefines(const LangOptions &Opts, -+ std::vector &Defines) const { -+ X86_32TargetInfo::getTargetDefines(Opts, Defines); -+ getOpenBSDDefines(Opts, 0, getTargetTriple(), Defines); -+ } -+}; -+} // end anonymous namespace -+ -+namespace { - // x86-32 FreeBSD target - class FreeBSDX86_32TargetInfo : public X86_32TargetInfo { - public: -@@ -983,6 +1010,20 @@ class X86_64TargetInfo : public X86TargetInfo { (publi - } // end anonymous namespace - - namespace { -+// x86-64 OpenBSD target -+class OpenBSDX86_64TargetInfo : public X86_64TargetInfo { -+public: -+ OpenBSDX86_64TargetInfo(const std::string &triple) -+ : X86_64TargetInfo(triple) {} -+ virtual void getTargetDefines(const LangOptions &Opts, -+ std::vector &Defines) const { -+ X86_64TargetInfo::getTargetDefines(Opts, Defines); -+ getOpenBSDDefines(Opts, 1, getTargetTriple(), Defines); -+ } -+}; -+} // end anonymous namespace -+ -+namespace { - // x86-64 FreeBSD target - class FreeBSDX86_64TargetInfo : public X86_64TargetInfo { - public: -@@ -1453,6 +1494,7 @@ TargetInfo* TargetInfo::CreateTargetInfo(const std::st - // Additions and corrections are welcome. - bool isDarwin = T.find("-darwin") != std::string::npos; - bool isDragonFly = T.find("-dragonfly") != std::string::npos; -+ bool isOpenBSD = T.find("-openbsd") != std::string::npos; - bool isFreeBSD = T.find("-freebsd") != std::string::npos; - bool isSolaris = T.find("-solaris") != std::string::npos; - bool isLinux = T.find("-linux") != std::string::npos; -@@ -1491,6 +1533,8 @@ TargetInfo* TargetInfo::CreateTargetInfo(const std::st - return new DarwinX86_64TargetInfo(T); - if (isLinux) - return new LinuxX86_64TargetInfo(T); -+ if (isOpenBSD) -+ return new OpenBSDX86_64TargetInfo(T); - if (isFreeBSD) - return new FreeBSDX86_64TargetInfo(T); - if (isSolaris) -@@ -1511,6 +1555,8 @@ TargetInfo* TargetInfo::CreateTargetInfo(const std::st - return new LinuxX86_32TargetInfo(T); - if (isDragonFly) - return new DragonFlyX86_32TargetInfo(T); -+ if (isOpenBSD) -+ return new OpenBSDX86_32TargetInfo(T); - if (isFreeBSD) - return new FreeBSDX86_32TargetInfo(T); - if (isSolaris) diff --git a/devel/llvm/patches/patch-tools_clang_lib_Driver_Driver_cpp b/devel/llvm/patches/patch-tools_clang_lib_Driver_Driver_cpp deleted file mode 100644 index de735735b1c..00000000000 --- a/devel/llvm/patches/patch-tools_clang_lib_Driver_Driver_cpp +++ /dev/null @@ -1,12 +0,0 @@ -$OpenBSD: patch-tools_clang_lib_Driver_Driver_cpp,v 1.1 2009/06/25 15:25:13 sthen Exp $ ---- tools/clang/lib/Driver/Driver.cpp.orig Tue Jun 23 10:35:26 2009 -+++ tools/clang/lib/Driver/Driver.cpp Tue Jun 23 10:35:59 2009 -@@ -1205,6 +1205,8 @@ const HostInfo *Driver::GetHostInfo(const char *Triple - return createDarwinHostInfo(*this, Triple); - case llvm::Triple::DragonFly: - return createDragonFlyHostInfo(*this, Triple); -+ case llvm::Triple::OpenBSD: -+ return createOpenBSDHostInfo(*this, Triple); - case llvm::Triple::FreeBSD: - return createFreeBSDHostInfo(*this, Triple); - case llvm::Triple::Linux: diff --git a/devel/llvm/patches/patch-tools_clang_lib_Driver_HostInfo_cpp b/devel/llvm/patches/patch-tools_clang_lib_Driver_HostInfo_cpp deleted file mode 100644 index 41ea6709c9b..00000000000 --- a/devel/llvm/patches/patch-tools_clang_lib_Driver_HostInfo_cpp +++ /dev/null @@ -1,74 +0,0 @@ -$OpenBSD: patch-tools_clang_lib_Driver_HostInfo_cpp,v 1.1 2009/06/25 15:25:13 sthen Exp $ ---- tools/clang/lib/Driver/HostInfo.cpp.orig Tue Jun 16 23:46:01 2009 -+++ tools/clang/lib/Driver/HostInfo.cpp Tue Jun 23 13:25:41 2009 -@@ -234,6 +234,57 @@ ToolChain *UnknownHostInfo::getToolChain(const ArgList - return TC; - } - -+// OpenBSD Host Info -+ -+/// OpenBSDHostInfo - OpenBSD host information implementation. -+class OpenBSDHostInfo : public HostInfo { -+ /// Cache of tool chains we have created. -+ mutable llvm::StringMap ToolChains; -+ -+public: -+ OpenBSDHostInfo(const Driver &D, const llvm::Triple& Triple) -+ : HostInfo(D, Triple) {} -+ ~OpenBSDHostInfo(); -+ -+ virtual bool useDriverDriver() const; -+ -+ virtual types::ID lookupTypeForExtension(const char *Ext) const { -+ return types::lookupTypeForExtension(Ext); -+ } -+ -+ virtual ToolChain *getToolChain(const ArgList &Args, -+ const char *ArchName) const; -+}; -+ -+OpenBSDHostInfo::~OpenBSDHostInfo() { -+ for (llvm::StringMap::iterator -+ it = ToolChains.begin(), ie = ToolChains.end(); it != ie; ++it) -+ delete it->second; -+} -+ -+bool OpenBSDHostInfo::useDriverDriver() const { -+ return false; -+} -+ -+ToolChain *OpenBSDHostInfo::getToolChain(const ArgList &Args, -+ const char *ArchName) const { -+ assert(!ArchName && -+ "Unexpected arch name on platform without driver driver support."); -+ -+ std::string Arch = getArchName(); -+ ArchName = Arch.c_str(); -+ -+ ToolChain *&TC = ToolChains[ArchName]; -+ if (!TC) { -+ llvm::Triple TCTriple(getTriple()); -+ TCTriple.setArchName(ArchName); -+ -+ TC = new toolchains::OpenBSD(*this, TCTriple); -+ } -+ -+ return TC; -+} -+ - // FreeBSD Host Info - - /// FreeBSDHostInfo - FreeBSD host information implementation. -@@ -414,6 +465,12 @@ const HostInfo * - clang::driver::createDarwinHostInfo(const Driver &D, - const llvm::Triple& Triple){ - return new DarwinHostInfo(D, Triple); -+} -+ -+const HostInfo * -+clang::driver::createOpenBSDHostInfo(const Driver &D, -+ const llvm::Triple& Triple) { -+ return new OpenBSDHostInfo(D, Triple); - } - - const HostInfo * diff --git a/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_cpp b/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_cpp deleted file mode 100644 index 87511050eab..00000000000 --- a/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_cpp +++ /dev/null @@ -1,40 +0,0 @@ -$OpenBSD: patch-tools_clang_lib_Driver_ToolChains_cpp,v 1.1 2009/06/25 15:25:13 sthen Exp $ ---- tools/clang/lib/Driver/ToolChains.cpp.orig Tue Jun 23 13:03:05 2009 -+++ tools/clang/lib/Driver/ToolChains.cpp Tue Jun 23 13:01:50 2009 -@@ -384,6 +384,36 @@ DerivedArgList *Generic_GCC::TranslateArgs(InputArgLis - return new DerivedArgList(Args, true); - } - -+/// OpenBSD - OpenBSD tool chain which can call as(1) and ld(1) directly. -+ -+OpenBSD::OpenBSD(const HostInfo &Host, const llvm::Triple& Triple) -+ : Generic_GCC(Host, Triple) { -+ getFilePaths().push_back(getHost().getDriver().Dir + "/../lib"); -+ getFilePaths().push_back("/usr/lib"); -+} -+ -+Tool &OpenBSD::SelectTool(const Compilation &C, const JobAction &JA) const { -+ Action::ActionClass Key; -+ if (getHost().getDriver().ShouldUseClangCompiler(C, JA, getArchName())) -+ Key = Action::AnalyzeJobClass; -+ else -+ Key = JA.getKind(); -+ -+ Tool *&T = Tools[Key]; -+ if (!T) { -+ switch (Key) { -+ case Action::AssembleJobClass: -+ T = new tools::openbsd::Assemble(*this); break; -+ case Action::LinkJobClass: -+ T = new tools::openbsd::Link(*this); break; -+ default: -+ T = &Generic_GCC::SelectTool(C, JA); -+ } -+ } -+ -+ return *T; -+} -+ - /// FreeBSD - FreeBSD tool chain which can call as(1) and ld(1) directly. - - FreeBSD::FreeBSD(const HostInfo &Host, const llvm::Triple& Triple, bool Lib32) diff --git a/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_h b/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_h deleted file mode 100644 index 08035b5c228..00000000000 --- a/devel/llvm/patches/patch-tools_clang_lib_Driver_ToolChains_h +++ /dev/null @@ -1,17 +0,0 @@ -$OpenBSD: patch-tools_clang_lib_Driver_ToolChains_h,v 1.1 2009/06/25 15:25:13 sthen Exp $ ---- tools/clang/lib/Driver/ToolChains.h.orig Tue Jun 23 13:16:32 2009 -+++ tools/clang/lib/Driver/ToolChains.h Tue Jun 23 13:17:32 2009 -@@ -107,6 +107,13 @@ class VISIBILITY_HIDDEN Darwin_GCC : public Generic_GC - virtual const char *GetDefaultRelocationModel() const { return "pic"; } - }; - -+class VISIBILITY_HIDDEN OpenBSD : public Generic_GCC { -+public: -+ OpenBSD(const HostInfo &Host, const llvm::Triple& Triple); -+ -+ virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; -+}; -+ - class VISIBILITY_HIDDEN FreeBSD : public Generic_GCC { - public: - FreeBSD(const HostInfo &Host, const llvm::Triple& Triple, bool Lib32); diff --git a/devel/llvm/patches/patch-tools_clang_lib_Driver_Tools_cpp b/devel/llvm/patches/patch-tools_clang_lib_Driver_Tools_cpp deleted file mode 100644 index 6fde1ede3b4..00000000000 --- a/devel/llvm/patches/patch-tools_clang_lib_Driver_Tools_cpp +++ /dev/null @@ -1,145 +0,0 @@ -$OpenBSD: patch-tools_clang_lib_Driver_Tools_cpp,v 1.1 2009/06/25 15:25:13 sthen Exp $ ---- tools/clang/lib/Driver/Tools.cpp.orig Mon Jun 8 23:48:20 2009 -+++ tools/clang/lib/Driver/Tools.cpp Thu Jun 25 10:01:13 2009 -@@ -1747,6 +1747,141 @@ void darwin::Lipo::ConstructJob(Compilation &C, const - Dest.addCommand(new Command(Exec, CmdArgs)); - } - -+void openbsd::Assemble::ConstructJob(Compilation &C, const JobAction &JA, -+ Job &Dest, const InputInfo &Output, -+ const InputInfoList &Inputs, -+ const ArgList &Args, -+ const char *LinkingOutput) const -+{ -+ ArgStringList CmdArgs; -+ -+ Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, -+ options::OPT_Xassembler); -+ -+ CmdArgs.push_back("-o"); -+ if (Output.isPipe()) -+ CmdArgs.push_back("-"); -+ else -+ CmdArgs.push_back(Output.getFilename()); -+ -+ for (InputInfoList::const_iterator -+ it = Inputs.begin(), ie = Inputs.end(); it != ie; ++it) { -+ const InputInfo &II = *it; -+ if (II.isPipe()) -+ CmdArgs.push_back("-"); -+ else -+ CmdArgs.push_back(II.getFilename()); -+ } -+ -+ const char *Exec = -+ Args.MakeArgString(getToolChain().GetProgramPath(C, "as").c_str()); -+ Dest.addCommand(new Command(Exec, CmdArgs)); -+} -+ -+void openbsd::Link::ConstructJob(Compilation &C, const JobAction &JA, -+ Job &Dest, const InputInfo &Output, -+ const InputInfoList &Inputs, -+ const ArgList &Args, -+ const char *LinkingOutput) const { -+ const Driver &D = getToolChain().getHost().getDriver(); -+ ArgStringList CmdArgs; -+ -+ if (Args.hasArg(options::OPT_static)) { -+ CmdArgs.push_back("-Bstatic"); -+ } else { -+ CmdArgs.push_back("--eh-frame-hdr"); -+ if (Args.hasArg(options::OPT_shared)) { -+ CmdArgs.push_back("-Bshareable"); -+ } else { -+ CmdArgs.push_back("-dynamic-linker"); -+ CmdArgs.push_back("/usr/libexec/ld.so"); -+ } -+ } -+ -+ if (Output.isPipe()) { -+ CmdArgs.push_back("-o"); -+ CmdArgs.push_back("-"); -+ } else if (Output.isFilename()) { -+ CmdArgs.push_back("-o"); -+ CmdArgs.push_back(Output.getFilename()); -+ } else { -+ assert(Output.isNothing() && "Invalid output."); -+ } -+ -+ if (!Args.hasArg(options::OPT_nostdlib) && -+ !Args.hasArg(options::OPT_nostartfiles)) { -+ if (!Args.hasArg(options::OPT_shared)) { -+ CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crt0.o").c_str())); -+ CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtbegin.o").c_str())); -+ } else { -+ CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtbeginS.o").c_str())); -+ } -+ } -+ -+ Args.AddAllArgs(CmdArgs, options::OPT_L); -+ Args.AddAllArgs(CmdArgs, options::OPT_T_Group); -+ Args.AddAllArgs(CmdArgs, options::OPT_e); -+ -+ for (InputInfoList::const_iterator -+ it = Inputs.begin(), ie = Inputs.end(); it != ie; ++it) { -+ const InputInfo &II = *it; -+ -+ // Don't try to pass LLVM inputs to a generic gcc. -+ if (II.getType() == types::TY_LLVMBC) -+ D.Diag(clang::diag::err_drv_no_linker_llvm_support) -+ << getToolChain().getTripleString().c_str(); -+ -+ if (II.isPipe()) -+ CmdArgs.push_back("-"); -+ else if (II.isFilename()) -+ CmdArgs.push_back(II.getFilename()); -+ else -+ II.getInputArg().renderAsInput(Args, CmdArgs); -+ } -+ -+ if (!Args.hasArg(options::OPT_nostdlib) && -+ !Args.hasArg(options::OPT_nodefaultlibs)) { -+#if 0 -+ // FIXME: For some reason GCC passes -lgcc and -lgcc_s before adding -+ // the default system libraries. Just mimic this for now. -+ CmdArgs.push_back("-lgcc"); -+ if (Args.hasArg(options::OPT_static)) { -+ CmdArgs.push_back("-lgcc_eh"); -+ } else { -+ CmdArgs.push_back("--as-needed"); -+ CmdArgs.push_back("-lgcc_s"); -+ CmdArgs.push_back("--no-as-needed"); -+ } -+#endif -+ -+ if (Args.hasArg(options::OPT_pthread)) -+ CmdArgs.push_back("-pthread"); -+ CmdArgs.push_back("-lc"); -+ -+#if 0 -+ CmdArgs.push_back("-lgcc"); -+ if (Args.hasArg(options::OPT_static)) { -+ CmdArgs.push_back("-lgcc_eh"); -+ } else { -+ CmdArgs.push_back("--as-needed"); -+ CmdArgs.push_back("-lgcc_s"); -+ CmdArgs.push_back("--no-as-needed"); -+ } -+#endif -+ } -+ -+ if (!Args.hasArg(options::OPT_nostdlib) && -+ !Args.hasArg(options::OPT_nostartfiles)) { -+ if (!Args.hasArg(options::OPT_shared)) -+ CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtend.o").c_str())); -+ else -+ CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtendS.o").c_str())); -+ } -+ -+ const char *Exec = -+ Args.MakeArgString(getToolChain().GetProgramPath(C, "ld").c_str()); -+ Dest.addCommand(new Command(Exec, CmdArgs)); -+} - - void freebsd::Assemble::ConstructJob(Compilation &C, const JobAction &JA, - Job &Dest, const InputInfo &Output, diff --git a/devel/llvm/patches/patch-tools_clang_lib_Driver_Tools_h b/devel/llvm/patches/patch-tools_clang_lib_Driver_Tools_h deleted file mode 100644 index 813518c6f46..00000000000 --- a/devel/llvm/patches/patch-tools_clang_lib_Driver_Tools_h +++ /dev/null @@ -1,44 +0,0 @@ -$OpenBSD: patch-tools_clang_lib_Driver_Tools_h,v 1.1 2009/06/25 15:25:13 sthen Exp $ ---- tools/clang/lib/Driver/Tools.h.orig Tue Jun 23 13:21:18 2009 -+++ tools/clang/lib/Driver/Tools.h Tue Jun 23 13:22:51 2009 -@@ -241,6 +241,40 @@ namespace darwin { - }; - } - -+ /// openbsd -- Directly call GNU Binutils assembler and linker -+namespace openbsd { -+ class VISIBILITY_HIDDEN Assemble : public Tool { -+ public: -+ Assemble(const ToolChain &TC) : Tool("openbsd::Assemble", TC) {} -+ -+ virtual bool acceptsPipedInput() const { return true; } -+ virtual bool canPipeOutput() const { return true; } -+ virtual bool hasIntegratedCPP() const { return false; } -+ -+ virtual void ConstructJob(Compilation &C, const JobAction &JA, -+ Job &Dest, -+ const InputInfo &Output, -+ const InputInfoList &Inputs, -+ const ArgList &TCArgs, -+ const char *LinkingOutput) const; -+ }; -+ class VISIBILITY_HIDDEN Link : public Tool { -+ public: -+ Link(const ToolChain &TC) : Tool("openbsd::Link", TC) {} -+ -+ virtual bool acceptsPipedInput() const { return true; } -+ virtual bool canPipeOutput() const { return true; } -+ virtual bool hasIntegratedCPP() const { return false; } -+ -+ virtual void ConstructJob(Compilation &C, const JobAction &JA, -+ Job &Dest, -+ const InputInfo &Output, -+ const InputInfoList &Inputs, -+ const ArgList &TCArgs, -+ const char *LinkingOutput) const; -+ }; -+} -+ - /// freebsd -- Directly call GNU Binutils assembler and linker - namespace freebsd { - class VISIBILITY_HIDDEN Assemble : public Tool { diff --git a/devel/llvm/patches/patch-tools_clang_lib_Lex_Lexer_cpp b/devel/llvm/patches/patch-tools_clang_lib_Lex_Lexer_cpp index 7fca8394022..bbe737da838 100644 --- a/devel/llvm/patches/patch-tools_clang_lib_Lex_Lexer_cpp +++ b/devel/llvm/patches/patch-tools_clang_lib_Lex_Lexer_cpp @@ -1,7 +1,7 @@ -$OpenBSD: patch-tools_clang_lib_Lex_Lexer_cpp,v 1.3 2009/06/21 23:13:48 sthen Exp $ ---- tools/clang/lib/Lex/Lexer.cpp.orig Thu Jun 4 03:48:03 2009 -+++ tools/clang/lib/Lex/Lexer.cpp Thu Jun 4 03:50:41 2009 -@@ -1013,6 +1013,7 @@ static bool isEndOfBlockCommentWithEscapedNewLine(cons +$OpenBSD: patch-tools_clang_lib_Lex_Lexer_cpp,v 1.4 2009/08/09 11:26:03 sthen Exp $ +--- tools/clang/lib/Lex/Lexer.cpp.orig Sat Aug 8 00:35:03 2009 ++++ tools/clang/lib/Lex/Lexer.cpp Sun Aug 9 10:23:50 2009 +@@ -1088,6 +1088,7 @@ static bool isEndOfBlockCommentWithEscapedNewLine(cons return true; } diff --git a/devel/llvm/patches/patch-tools_clang_utils_scan-build b/devel/llvm/patches/patch-tools_clang_utils_scan-build index 5262a861bb7..2878b1657a5 100644 --- a/devel/llvm/patches/patch-tools_clang_utils_scan-build +++ b/devel/llvm/patches/patch-tools_clang_utils_scan-build @@ -1,7 +1,7 @@ -$OpenBSD: patch-tools_clang_utils_scan-build,v 1.3 2009/06/21 23:13:48 sthen Exp $ ---- tools/clang/utils/scan-build.orig Fri May 15 22:14:16 2009 -+++ tools/clang/utils/scan-build Sun Jun 21 22:55:38 2009 -@@ -429,7 +429,7 @@ sub CopyFiles { +$OpenBSD: patch-tools_clang_utils_scan-build,v 1.4 2009/08/09 11:26:03 sthen Exp $ +--- tools/clang/utils/scan-build.orig Sat Aug 8 00:34:45 2009 ++++ tools/clang/utils/scan-build Sun Aug 9 10:23:50 2009 +@@ -423,7 +423,7 @@ sub CopyFiles { my $Dir = shift; @@ -10,7 +10,7 @@ $OpenBSD: patch-tools_clang_utils_scan-build,v 1.3 2009/06/21 23:13:48 sthen Exp DieDiag("Cannot find 'sorttable.js'.\n") if (! -r $JS); -@@ -439,7 +439,7 @@ sub CopyFiles { +@@ -433,7 +433,7 @@ sub CopyFiles { DieDiag("Could not copy 'sorttable.js' to '$Dir'.\n") if (! -r "$Dir/sorttable.js"); diff --git a/devel/llvm/pkg/PLIST b/devel/llvm/pkg/PLIST index af01ec96fdc..d5dadb6253f 100644 --- a/devel/llvm/pkg/PLIST +++ b/devel/llvm/pkg/PLIST @@ -1,10 +1,13 @@ -@comment $OpenBSD: PLIST,v 1.7 2009/06/25 15:25:13 sthen Exp $ +@comment $OpenBSD: PLIST,v 1.8 2009/08/09 11:26:03 sthen Exp $ +@bin bin/FileCheck +@bin bin/FileUpdate @bin bin/bugpoint bin/ccc-analyzer @bin bin/clang -bin/clang-cc +@bin bin/clang-wpa bin/gccas bin/gccld +@bin bin/index-test @bin bin/llc @bin bin/lli @bin bin/llvm-ar @@ -44,6 +47,7 @@ include/llvm/ADT/APInt.h include/llvm/ADT/APSInt.h include/llvm/ADT/BitVector.h include/llvm/ADT/DenseMap.h +include/llvm/ADT/DenseMapInfo.h include/llvm/ADT/DenseSet.h include/llvm/ADT/DepthFirstIterator.h include/llvm/ADT/EquivalenceClasses.h @@ -73,11 +77,11 @@ include/llvm/ADT/SparseBitVector.h include/llvm/ADT/Statistic.h include/llvm/ADT/StringExtras.h include/llvm/ADT/StringMap.h +include/llvm/ADT/StringRef.h include/llvm/ADT/StringSet.h -include/llvm/ADT/Tree.h include/llvm/ADT/Trie.h include/llvm/ADT/Triple.h -@comment include/llvm/ADT/Triple.h.orig +include/llvm/ADT/Twine.h include/llvm/ADT/UniqueVector.h include/llvm/ADT/VectorExtras.h include/llvm/ADT/ilist.h @@ -104,11 +108,13 @@ include/llvm/Analysis/IntervalPartition.h include/llvm/Analysis/LibCallAliasAnalysis.h include/llvm/Analysis/LibCallSemantics.h include/llvm/Analysis/LiveValues.h +include/llvm/Analysis/LoopDependenceAnalysis.h include/llvm/Analysis/LoopInfo.h include/llvm/Analysis/LoopPass.h include/llvm/Analysis/LoopVR.h include/llvm/Analysis/MemoryDependenceAnalysis.h include/llvm/Analysis/Passes.h +include/llvm/Analysis/PointerTracking.h include/llvm/Analysis/PostDominators.h include/llvm/Analysis/ProfileInfo.h include/llvm/Analysis/ProfileInfoLoader.h @@ -149,6 +155,7 @@ include/llvm/CodeGen/BinaryObject.h include/llvm/CodeGen/BreakCriticalMachineEdge.h include/llvm/CodeGen/CallingConvLower.h include/llvm/CodeGen/DAGISelHeader.h +include/llvm/CodeGen/Dump.h include/llvm/CodeGen/DwarfWriter.h include/llvm/CodeGen/ELFRelocation.h include/llvm/CodeGen/FastISel.h @@ -175,6 +182,7 @@ include/llvm/CodeGen/MachineConstantPool.h include/llvm/CodeGen/MachineDominators.h include/llvm/CodeGen/MachineFrameInfo.h include/llvm/CodeGen/MachineFunction.h +include/llvm/CodeGen/MachineFunctionAnalysis.h include/llvm/CodeGen/MachineFunctionPass.h include/llvm/CodeGen/MachineInstr.h include/llvm/CodeGen/MachineInstrBuilder.h @@ -187,6 +195,7 @@ include/llvm/CodeGen/MachineOperand.h include/llvm/CodeGen/MachinePassRegistry.h include/llvm/CodeGen/MachineRegisterInfo.h include/llvm/CodeGen/MachineRelocation.h +include/llvm/CodeGen/ObjectCodeEmitter.h include/llvm/CodeGen/Passes.h include/llvm/CodeGen/PseudoSourceValue.h include/llvm/CodeGen/RegAllocRegistry.h @@ -203,13 +212,17 @@ include/llvm/CodeGen/ValueTypes.h include/llvm/CodeGen/ValueTypes.td include/llvm/CompilerDriver/ include/llvm/CompilerDriver/Action.h +include/llvm/CompilerDriver/BuiltinOptions.h include/llvm/CompilerDriver/Common.td include/llvm/CompilerDriver/CompilationGraph.h include/llvm/CompilerDriver/Error.h +include/llvm/CompilerDriver/ForceLinkage.h +include/llvm/CompilerDriver/ForceLinkageMacros.h include/llvm/CompilerDriver/Main.inc include/llvm/CompilerDriver/Plugin.h include/llvm/CompilerDriver/Tool.h include/llvm/Config/ +include/llvm/Config/AsmParsers.def include/llvm/Config/AsmPrinters.def include/llvm/Config/Targets.def include/llvm/Config/alloca.h @@ -230,6 +243,7 @@ include/llvm/ExecutionEngine/ExecutionEngine.h include/llvm/ExecutionEngine/GenericValue.h include/llvm/ExecutionEngine/Interpreter.h include/llvm/ExecutionEngine/JIT.h +include/llvm/ExecutionEngine/JITEventListener.h include/llvm/ExecutionEngine/JITMemoryManager.h include/llvm/Function.h include/llvm/GlobalAlias.h @@ -246,19 +260,30 @@ include/llvm/Intrinsics.h include/llvm/Intrinsics.td include/llvm/IntrinsicsARM.td include/llvm/IntrinsicsAlpha.td +include/llvm/IntrinsicsBlackfin.td include/llvm/IntrinsicsCellSPU.td include/llvm/IntrinsicsPowerPC.td include/llvm/IntrinsicsX86.td include/llvm/IntrinsicsXCore.td +include/llvm/LLVMContext.h include/llvm/LinkAllPasses.h include/llvm/LinkAllVMCore.h include/llvm/Linker.h include/llvm/MC/ +include/llvm/MC/MCAsmLexer.h +include/llvm/MC/MCAsmParser.h +include/llvm/MC/MCContext.h include/llvm/MC/MCInst.h -include/llvm/MDNode.h +include/llvm/MC/MCSection.h +include/llvm/MC/MCStreamer.h +include/llvm/MC/MCSymbol.h +include/llvm/MC/MCValue.h +include/llvm/MC/SectionKind.h +include/llvm/Metadata.h include/llvm/Module.h include/llvm/ModuleProvider.h include/llvm/OperandTraits.h +include/llvm/Operator.h include/llvm/Pass.h include/llvm/PassAnalysisSupport.h include/llvm/PassManager.h @@ -268,7 +293,6 @@ include/llvm/Support/ include/llvm/Support/AIXDataTypesFix.h include/llvm/Support/AlignOf.h include/llvm/Support/Allocator.h -include/llvm/Support/Annotation.h include/llvm/Support/CFG.h include/llvm/Support/CallSite.h include/llvm/Support/Casting.h @@ -285,8 +309,10 @@ include/llvm/Support/DebugLoc.h include/llvm/Support/Dwarf.h include/llvm/Support/DynamicLinker.h include/llvm/Support/ELF.h +include/llvm/Support/ErrorHandling.h include/llvm/Support/FileUtilities.h include/llvm/Support/Format.h +include/llvm/Support/FormattedStream.h include/llvm/Support/GetElementPtrTypeIterator.h include/llvm/Support/GraphWriter.h include/llvm/Support/IRBuilder.h @@ -297,6 +323,7 @@ include/llvm/Support/ManagedStatic.h include/llvm/Support/Mangler.h include/llvm/Support/MathExtras.h include/llvm/Support/MemoryBuffer.h +include/llvm/Support/MemoryObject.h include/llvm/Support/MutexGuard.h include/llvm/Support/NoFolder.h include/llvm/Support/OutputBuffer.h @@ -329,6 +356,7 @@ include/llvm/System/Alarm.h include/llvm/System/Atomic.h include/llvm/System/Disassembler.h include/llvm/System/DynamicLibrary.h +include/llvm/System/Errno.h include/llvm/System/Host.h include/llvm/System/IncludeFile.h include/llvm/System/LICENSE.TXT @@ -340,14 +368,16 @@ include/llvm/System/Program.h include/llvm/System/RWMutex.h include/llvm/System/Signals.h include/llvm/System/Solaris.h +include/llvm/System/ThreadLocal.h include/llvm/System/Threading.h include/llvm/System/TimeValue.h include/llvm/Target/ +include/llvm/Target/COFFTargetAsmInfo.h include/llvm/Target/DarwinTargetAsmInfo.h -include/llvm/Target/ELFTargetAsmInfo.h include/llvm/Target/SubtargetFeature.h include/llvm/Target/Target.td include/llvm/Target/TargetAsmInfo.h +include/llvm/Target/TargetAsmParser.h include/llvm/Target/TargetCallingConv.td include/llvm/Target/TargetData.h include/llvm/Target/TargetELFWriterInfo.h @@ -358,11 +388,12 @@ include/llvm/Target/TargetInstrItineraries.h include/llvm/Target/TargetIntrinsicInfo.h include/llvm/Target/TargetJITInfo.h include/llvm/Target/TargetLowering.h +include/llvm/Target/TargetLoweringObjectFile.h include/llvm/Target/TargetMachOWriterInfo.h include/llvm/Target/TargetMachine.h -include/llvm/Target/TargetMachineRegistry.h include/llvm/Target/TargetOptions.h include/llvm/Target/TargetRegisterInfo.h +include/llvm/Target/TargetRegistry.h include/llvm/Target/TargetSchedule.td include/llvm/Target/TargetSelect.h include/llvm/Target/TargetSelectionDAG.td @@ -383,6 +414,7 @@ include/llvm/Transforms/Utils/FunctionUtils.h include/llvm/Transforms/Utils/InlineCost.h include/llvm/Transforms/Utils/Local.h include/llvm/Transforms/Utils/PromoteMemToReg.h +include/llvm/Transforms/Utils/SSI.h include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h include/llvm/Transforms/Utils/UnrollLoop.h include/llvm/Transforms/Utils/ValueMapper.h @@ -412,46 +444,65 @@ lib/clang/1.0/include/xmmintrin.h lib/libCompilerDriver.a lib/libLLVMARMAsmPrinter.a lib/libLLVMARMCodeGen.a +lib/libLLVMARMInfo.a lib/libLLVMAlphaAsmPrinter.a lib/libLLVMAlphaCodeGen.a +lib/libLLVMAlphaInfo.a lib/libLLVMAnalysis.a lib/libLLVMArchive.a lib/libLLVMAsmParser.a lib/libLLVMAsmPrinter.a lib/libLLVMBitReader.a lib/libLLVMBitWriter.a +lib/libLLVMBlackfinAsmPrinter.a +lib/libLLVMBlackfinCodeGen.a +lib/libLLVMBlackfinInfo.a lib/libLLVMCBackend.a +lib/libLLVMCBackendInfo.a lib/libLLVMCellSPUAsmPrinter.a lib/libLLVMCellSPUCodeGen.a +lib/libLLVMCellSPUInfo.a lib/libLLVMCodeGen.a lib/libLLVMCore.a lib/libLLVMCppBackend.a +lib/libLLVMCppBackendInfo.a lib/libLLVMDebugger.a lib/libLLVMExecutionEngine.a -lib/libLLVMIA64AsmPrinter.a -lib/libLLVMIA64CodeGen.a lib/libLLVMInstrumentation.a lib/libLLVMInterpreter.a lib/libLLVMJIT.a lib/libLLVMLinker.a +lib/libLLVMMC.a lib/libLLVMMSIL.a +lib/libLLVMMSILInfo.a lib/libLLVMMSP430.a +lib/libLLVMMSP430Info.a lib/libLLVMMipsAsmPrinter.a lib/libLLVMMipsCodeGen.a +lib/libLLVMMipsInfo.a lib/libLLVMPIC16.a +lib/libLLVMPIC16Info.a lib/libLLVMPowerPCAsmPrinter.a lib/libLLVMPowerPCCodeGen.a +lib/libLLVMPowerPCInfo.a lib/libLLVMScalarOpts.a lib/libLLVMSelectionDAG.a lib/libLLVMSparcAsmPrinter.a lib/libLLVMSparcCodeGen.a +lib/libLLVMSparcInfo.a lib/libLLVMSupport.a lib/libLLVMSystem.a +lib/libLLVMSystemZAsmPrinter.a +lib/libLLVMSystemZCodeGen.a +lib/libLLVMSystemZInfo.a lib/libLLVMTarget.a lib/libLLVMTransformUtils.a +lib/libLLVMX86AsmParser.a lib/libLLVMX86AsmPrinter.a lib/libLLVMX86CodeGen.a +lib/libLLVMX86Info.a lib/libLLVMXCore.a +lib/libLLVMXCoreInfo.a lib/libLLVMipa.a lib/libLLVMipo.a lib/libLTO.a @@ -462,6 +513,7 @@ lib/libclangBasic.a lib/libclangCodeGen.a lib/libclangDriver.a lib/libclangFrontend.a +lib/libclangIndex.a lib/libclangLex.a lib/libclangParse.a lib/libclangRewrite.a @@ -552,6 +604,7 @@ share/doc/llvm/html/PTHInternals.html share/doc/llvm/html/Passes.html share/doc/llvm/html/ProgrammersManual.html share/doc/llvm/html/Projects.html +share/doc/llvm/html/ReleaseNotes-${MODPY_VERSION}.html share/doc/llvm/html/ReleaseNotes.html share/doc/llvm/html/SourceLevelDebugging.html share/doc/llvm/html/SystemLibrary.html @@ -572,6 +625,7 @@ share/doc/llvm/html/img/lines.gif share/doc/llvm/html/img/objdeps.gif share/doc/llvm/html/img/venusflytrap.jpg share/doc/llvm/html/index.html +share/doc/llvm/html/libIndex.html share/doc/llvm/html/llvm.css share/doc/llvm/html/tutorial/ share/doc/llvm/html/tutorial/JITTutorial1.html