From e5312d9cfb3352c3b082cee4e7eeba33586751ea Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 6 Nov 2011 09:54:22 +0100 Subject: [PATCH] llvm: sync patches with Arch, it works now with gcc 4.[56].x. --- srcpkgs/llvm/clang-devel.template | 2 + srcpkgs/llvm/clang.template | 3 + srcpkgs/llvm/libclang.template | 2 + srcpkgs/llvm/libllvm.template | 2 + srcpkgs/llvm/llvm-devel.template | 2 + .../patches/bug-9869-operator-h-c++0x.patch | 60 +++++++++++++++++++ .../llvm/patches/cindexer-clang-path.patch | 10 ++++ .../clang-plugin-loader-registry.patch | 13 ++++ .../clang-toolchains-gcc-versions.patch | 12 ++++ srcpkgs/llvm/template | 9 +-- 10 files changed, 111 insertions(+), 4 deletions(-) create mode 100644 srcpkgs/llvm/patches/bug-9869-operator-h-c++0x.patch create mode 100644 srcpkgs/llvm/patches/cindexer-clang-path.patch create mode 100644 srcpkgs/llvm/patches/clang-plugin-loader-registry.patch create mode 100644 srcpkgs/llvm/patches/clang-toolchains-gcc-versions.patch diff --git a/srcpkgs/llvm/clang-devel.template b/srcpkgs/llvm/clang-devel.template index 8ef99fabb1..c08ede58c7 100644 --- a/srcpkgs/llvm/clang-devel.template +++ b/srcpkgs/llvm/clang-devel.template @@ -28,6 +28,8 @@ long_desc=" This package includes development files for the LLVM clang." +revision=1 + Add_dependency run clang do_install() diff --git a/srcpkgs/llvm/clang.template b/srcpkgs/llvm/clang.template index 934fc66770..998eeee190 100644 --- a/srcpkgs/llvm/clang.template +++ b/srcpkgs/llvm/clang.template @@ -26,12 +26,15 @@ long_desc=" * A single unified parser for C, Objective C, C++, and Objective C++ * Conformance with C/C++/ObjC and their variants" +revision=1 + Add_dependency run libgcc Add_dependency run glibc Add_dependency run libffi Add_dependency run libstdc++ Add_dependency run libllvm Add_dependency run llvm +Add_dependency run gcc ">=4.5" do_install() { diff --git a/srcpkgs/llvm/libclang.template b/srcpkgs/llvm/libclang.template index ad045e926f..41e3f0f5cc 100644 --- a/srcpkgs/llvm/libclang.template +++ b/srcpkgs/llvm/libclang.template @@ -28,6 +28,8 @@ long_desc=" This package includes the shared library used by the Clang frontend." +revision=1 + Add_dependency run libgcc Add_dependency run glibc Add_dependency run libffi diff --git a/srcpkgs/llvm/libllvm.template b/srcpkgs/llvm/libllvm.template index e0cb0ff8e1..1c240fe4b1 100644 --- a/srcpkgs/llvm/libllvm.template +++ b/srcpkgs/llvm/libllvm.template @@ -6,6 +6,8 @@ long_desc=" This package includes the shared libraries used by the LLVM projects." +revision=1 + Add_dependency run libgcc Add_dependency run glibc Add_dependency run libffi diff --git a/srcpkgs/llvm/llvm-devel.template b/srcpkgs/llvm/llvm-devel.template index d56232ab3d..014c59f0a6 100644 --- a/srcpkgs/llvm/llvm-devel.template +++ b/srcpkgs/llvm/llvm-devel.template @@ -6,6 +6,8 @@ long_desc=" This package includes development files for the LLVM clang." +revision=1 + Add_dependency run libffi-devel Add_dependency run libllvm Add_dependency run llvm diff --git a/srcpkgs/llvm/patches/bug-9869-operator-h-c++0x.patch b/srcpkgs/llvm/patches/bug-9869-operator-h-c++0x.patch new file mode 100644 index 0000000000..8b897fbdcc --- /dev/null +++ b/srcpkgs/llvm/patches/bug-9869-operator-h-c++0x.patch @@ -0,0 +1,60 @@ +# Fix upstream bug #9869: +# Operator.h incompatibility with GCC 4.6 in C++0x mode + +--- include/llvm/Operator.h 2011/02/07 16:40:21 125006 ++++ include/llvm/Operator.h 2011/05/08 01:59:22 131062 +@@ -186,28 +186,46 @@ + }; + + class AddOperator +- : public ConcreteOperator {}; ++ : public ConcreteOperator { ++ ~AddOperator(); // DO NOT IMPLEMENT ++}; + class SubOperator +- : public ConcreteOperator {}; ++ : public ConcreteOperator { ++ ~SubOperator(); // DO NOT IMPLEMENT ++}; + class MulOperator +- : public ConcreteOperator {}; ++ : public ConcreteOperator { ++ ~MulOperator(); // DO NOT IMPLEMENT ++}; + class ShlOperator +- : public ConcreteOperator {}; ++ : public ConcreteOperator { ++ ~ShlOperator(); // DO NOT IMPLEMENT ++}; + + + class SDivOperator +- : public ConcreteOperator {}; ++ : public ConcreteOperator { ++ ~SDivOperator(); // DO NOT IMPLEMENT ++}; + class UDivOperator +- : public ConcreteOperator {}; ++ : public ConcreteOperator { ++ ~UDivOperator(); // DO NOT IMPLEMENT ++}; + class AShrOperator +- : public ConcreteOperator {}; ++ : public ConcreteOperator { ++ ~AShrOperator(); // DO NOT IMPLEMENT ++}; + class LShrOperator +- : public ConcreteOperator {}; ++ : public ConcreteOperator { ++ ~LShrOperator(); // DO NOT IMPLEMENT ++}; + + + + class GEPOperator + : public ConcreteOperator { ++ ~GEPOperator(); // DO NOT IMPLEMENT ++ + enum { + IsInBounds = (1 << 0) + }; diff --git a/srcpkgs/llvm/patches/cindexer-clang-path.patch b/srcpkgs/llvm/patches/cindexer-clang-path.patch new file mode 100644 index 0000000000..954a67c217 --- /dev/null +++ b/srcpkgs/llvm/patches/cindexer-clang-path.patch @@ -0,0 +1,10 @@ +--- tools/clang/tools/libclang/CIndexer.cpp.orig 2011-04-07 13:08:24.000000000 +0300 ++++ tools/clang/tools/libclang/CIndexer.cpp 2011-04-07 13:11:52.224884642 +0300 +@@ -80,6 +80,7 @@ std::string CIndexer::getClangResourcesP + + // We now have the CIndex directory, locate clang relative to it. + LibClangPath.eraseComponent(); ++ LibClangPath.eraseComponent(); + #endif + + LibClangPath.appendComponent("clang"); diff --git a/srcpkgs/llvm/patches/clang-plugin-loader-registry.patch b/srcpkgs/llvm/patches/clang-plugin-loader-registry.patch new file mode 100644 index 0000000000..5afa2804ca --- /dev/null +++ b/srcpkgs/llvm/patches/clang-plugin-loader-registry.patch @@ -0,0 +1,13 @@ +# Get the correct list of symbols to export +# See http://lists.cs.uiuc.edu/pipermail/cfe-dev/2010-April/008559.html + +--- autoconf/ExportMap.map 2010-02-25 00:33:41.000000000 +0200 ++++ autoconf/ExportMap.map 2010-05-10 14:14:22.000000000 +0300 +@@ -2,6 +2,7 @@ + global: main; + __progname; + environ; ++ _ZN4llvm8RegistryIN5clang14FrontendActionENS_14RegistryTraitsIS2_EEE4HeadE; + + local: *; + }; diff --git a/srcpkgs/llvm/patches/clang-toolchains-gcc-versions.patch b/srcpkgs/llvm/patches/clang-toolchains-gcc-versions.patch new file mode 100644 index 0000000000..145f3400c0 --- /dev/null +++ b/srcpkgs/llvm/patches/clang-toolchains-gcc-versions.patch @@ -0,0 +1,12 @@ +# Make all gcc 4.[56] from xbps work. +--- tools/clang/lib/Driver/ToolChains.cpp 2011-03-21 23:29:27.000000000 +0200 ++++ tools/clang/lib/Driver/ToolChains.cpp 2011-04-08 00:03:34.000000000 +0300 +@@ -1449,7 +1449,7 @@ Linux::Linux(const HostInfo &Host, const + GccTriple = "i586-suse-linux"; + } + +- const char* GccVersions[] = {"4.5.2", "4.5.1", "4.5", "4.4.5", "4.4.4", ++ const char* GccVersions[] = {"4.6.2", "4.6", "4.5", + "4.4.3", "4.4", "4.3.4", "4.3.3", "4.3.2", + "4.3", "4.2.4", "4.2.3", "4.2.2", "4.2.1", + "4.2"}; diff --git a/srcpkgs/llvm/template b/srcpkgs/llvm/template index 1fef9142fc..6d69a4580f 100644 --- a/srcpkgs/llvm/template +++ b/srcpkgs/llvm/template @@ -1,6 +1,7 @@ # Template file for 'llvm' pkgname=llvm version=2.9 +revision=1 distfiles=" http://www.llvm.org/releases/${version}/llvm-${version}.tgz http://www.llvm.org/releases/${version}/clang-${version}.tgz" @@ -10,6 +11,8 @@ configure_args="--disable-expensive-checks --disable-debug-runtime --enable-shared --enable-libffi --enable-llvmc-dynamic" short_desc="Low Level Virtual Machine" maintainer="Juan RP " +homepage="http://www.llvm.org" +license="BSD" checksum=" 661236cfa17428b48cfa9cbb9909f7569c64b8ecd219fd91dbc00e3b557b3779 70c41f3f782a71cbaa7bc8d6ea29fce4263ad3e8558dfecc6dc11cdef17909df" @@ -61,16 +64,14 @@ Add_dependency build perl Add_dependency build python Add_dependency build libffi-devel -pre_configure() -{ +post_extract() { # Move clang files into the llvm source. if [ -d ${XBPS_BUILDDIR}/clang-${version} ]; then mv ${XBPS_BUILDDIR}/clang-${version} ${wrksrc}/tools/clang fi } -pre_install() -{ +pre_install() { # for pod2html export PATH=$PATH:/usr/lib/perl5/core_perl/bin }