llvm: sync patches with Arch, it works now with gcc 4.[56].x.

This commit is contained in:
Juan RP 2011-11-06 09:54:22 +01:00
parent 3cc393402f
commit e5312d9cfb
10 changed files with 111 additions and 4 deletions

View file

@ -28,6 +28,8 @@ long_desc="
This package includes development files for the LLVM clang."
revision=1
Add_dependency run clang
do_install()

View file

@ -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()
{

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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<OverflowingBinaryOperator, Instruction::Add> {};
+ : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Add> {
+ ~AddOperator(); // DO NOT IMPLEMENT
+};
class SubOperator
- : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Sub> {};
+ : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Sub> {
+ ~SubOperator(); // DO NOT IMPLEMENT
+};
class MulOperator
- : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Mul> {};
+ : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Mul> {
+ ~MulOperator(); // DO NOT IMPLEMENT
+};
class ShlOperator
- : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Shl> {};
+ : public ConcreteOperator<OverflowingBinaryOperator, Instruction::Shl> {
+ ~ShlOperator(); // DO NOT IMPLEMENT
+};
class SDivOperator
- : public ConcreteOperator<PossiblyExactOperator, Instruction::SDiv> {};
+ : public ConcreteOperator<PossiblyExactOperator, Instruction::SDiv> {
+ ~SDivOperator(); // DO NOT IMPLEMENT
+};
class UDivOperator
- : public ConcreteOperator<PossiblyExactOperator, Instruction::UDiv> {};
+ : public ConcreteOperator<PossiblyExactOperator, Instruction::UDiv> {
+ ~UDivOperator(); // DO NOT IMPLEMENT
+};
class AShrOperator
- : public ConcreteOperator<PossiblyExactOperator, Instruction::AShr> {};
+ : public ConcreteOperator<PossiblyExactOperator, Instruction::AShr> {
+ ~AShrOperator(); // DO NOT IMPLEMENT
+};
class LShrOperator
- : public ConcreteOperator<PossiblyExactOperator, Instruction::LShr> {};
+ : public ConcreteOperator<PossiblyExactOperator, Instruction::LShr> {
+ ~LShrOperator(); // DO NOT IMPLEMENT
+};
class GEPOperator
: public ConcreteOperator<Operator, Instruction::GetElementPtr> {
+ ~GEPOperator(); // DO NOT IMPLEMENT
+
enum {
IsInBounds = (1 << 0)
};

View file

@ -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");

View file

@ -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: *;
};

View file

@ -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"};

View file

@ -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 <xtraeme@gmail.com>"
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
}