summaryrefslogtreecommitdiff
path: root/lang/clang
diff options
context:
space:
mode:
authoradam <adam>2011-05-07 16:54:56 +0000
committeradam <adam>2011-05-07 16:54:56 +0000
commitbf87b701591f022cd42193507bedf5d7dccbfda4 (patch)
treedc680c8096d0a746ab67a47be5bc0b8f4507c289 /lang/clang
parent40ea22be445e41e0f08cca598c2da11334247865 (diff)
downloadpkgsrc-bf87b701591f022cd42193507bedf5d7dccbfda4.tar.gz
Fix LLVM bug 8765 (longjmp issue on NetBSD); patches courtesy of joerg.
Diffstat (limited to 'lang/clang')
-rw-r--r--lang/clang/Makefile3
-rw-r--r--lang/clang/distinfo4
-rw-r--r--lang/clang/patches/patch-tools_clang_lib_AST_DumpXML.cpp15
-rw-r--r--lang/clang/patches/patch-tools_clang_lib_CodeGen_CodeGenModule.cpp35
4 files changed, 55 insertions, 2 deletions
diff --git a/lang/clang/Makefile b/lang/clang/Makefile
index d4c8bdcb07d..6ef69505c6a 100644
--- a/lang/clang/Makefile
+++ b/lang/clang/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.9 2011/04/07 09:26:33 adam Exp $
+# $NetBSD: Makefile,v 1.10 2011/05/07 16:54:56 adam Exp $
DISTNAME= clang-2.9
+PKGREVISION= 1
CATEGORIES= lang
MASTER_SITES= http://llvm.org/releases/${PKGVERSION_NOREV}/
DISTFILES= llvm-${PKGVERSION_NOREV}.tgz clang-${PKGVERSION_NOREV}.tgz
diff --git a/lang/clang/distinfo b/lang/clang/distinfo
index ead25f691ed..feed143eb91 100644
--- a/lang/clang/distinfo
+++ b/lang/clang/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2011/04/07 09:26:33 adam Exp $
+$NetBSD: distinfo,v 1.8 2011/05/07 16:54:56 adam Exp $
SHA1 (clang-2.9.tgz) = 5fd3b5cec050ec12858c1602b23cf096282ad4a4
RMD160 (clang-2.9.tgz) = 4ab79cbd0e2ad25a2272e6ee2fbbf546818dbd73
@@ -9,3 +9,5 @@ Size (llvm-2.9.tgz) = 9574781 bytes
SHA1 (patch-ab) = 140ac84d513cf20c9eb30a9e8e2f6b87bdd074fe
SHA1 (patch-ac) = 252f6a1f2cb79fed19668310c72d1079b47eca3c
SHA1 (patch-ad) = 4cd7223d1660a4e8d81b33b6c99efbb680664164
+SHA1 (patch-tools_clang_lib_AST_DumpXML.cpp) = d41863bf349f59f7e784fad0c7a5dfc28398e22c
+SHA1 (patch-tools_clang_lib_CodeGen_CodeGenModule.cpp) = 3075e531c550a663de5c3a2a61bc64a9bc664728
diff --git a/lang/clang/patches/patch-tools_clang_lib_AST_DumpXML.cpp b/lang/clang/patches/patch-tools_clang_lib_AST_DumpXML.cpp
new file mode 100644
index 00000000000..42a39cb91c6
--- /dev/null
+++ b/lang/clang/patches/patch-tools_clang_lib_AST_DumpXML.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-tools_clang_lib_AST_DumpXML.cpp,v 1.1 2011/05/07 16:54:56 adam Exp $
+
+Fix LLVM bug 8765: longjmp issue on NetBSD.
+
+--- tools/clang/lib/AST/DumpXML.cpp.orig 2011-04-22 06:32:06.000000000 +0000
++++ tools/clang/lib/AST/DumpXML.cpp
+@@ -487,6 +487,8 @@ struct XMLDumper : public XMLDeclVisitor
+ set("storage",
+ VarDecl::getStorageClassSpecifierString(D->getStorageClass()));
+ setFlag("inline", D->isInlineSpecified());
++ if (const AsmLabelAttr *ALA = D->getAttr<AsmLabelAttr>())
++ set("asmlabel", ALA->getLabel());
+ // TODO: instantiation, etc.
+ }
+ void visitFunctionDeclChildren(FunctionDecl *D) {
diff --git a/lang/clang/patches/patch-tools_clang_lib_CodeGen_CodeGenModule.cpp b/lang/clang/patches/patch-tools_clang_lib_CodeGen_CodeGenModule.cpp
new file mode 100644
index 00000000000..9c4796de90b
--- /dev/null
+++ b/lang/clang/patches/patch-tools_clang_lib_CodeGen_CodeGenModule.cpp
@@ -0,0 +1,35 @@
+$NetBSD: patch-tools_clang_lib_CodeGen_CodeGenModule.cpp,v 1.1 2011/05/07 16:54:56 adam Exp $
+
+Fix LLVM bug 8765: longjmp issue on NetBSD.
+
+--- tools/clang/lib/CodeGen/CodeGenModule.cpp.orig 2011-05-05 06:23:06.000000000 +0000
++++ tools/clang/lib/CodeGen/CodeGenModule.cpp
+@@ -1561,14 +1561,24 @@
+ "isn't a lib fn");
+
+ // Get the name, skip over the __builtin_ prefix (if necessary).
+- const char *Name = Context.BuiltinInfo.GetName(BuiltinID);
+- if (Context.BuiltinInfo.isLibFunction(BuiltinID))
+- Name += 10;
++ llvm::StringRef Name;
++ GlobalDecl D(FD);
+
++ // If the builtin has been declared explicitly with an assembler label,
++ // use the mangled name. This differs from the plain label on platforms
++ // that prefix labels.
++ if (FD->hasAttr<AsmLabelAttr>())
++ Name = getMangledName(D);
++ else if (Context.BuiltinInfo.isLibFunction(BuiltinID))
++ Name = Context.BuiltinInfo.GetName(BuiltinID) + 10;
++ else
++ Name = Context.BuiltinInfo.GetName(BuiltinID);
++
++
+ const llvm::FunctionType *Ty =
+ cast<llvm::FunctionType>(getTypes().ConvertType(FD->getType()));
+
+- return GetOrCreateLLVMFunction(Name, Ty, GlobalDecl(FD), /*ForVTable=*/false);
++ return GetOrCreateLLVMFunction(Name, Ty, D, /*ForVTable=*/false);
+ }
+
+ llvm::Function *CodeGenModule::getIntrinsic(unsigned IID,const llvm::Type **Tys,