aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--devel/llvm/Makefile2
-rw-r--r--devel/llvm/files/patch-lib_Target_X86_X86JITInfo.cpp26
2 files changed, 27 insertions, 1 deletions
diff --git a/devel/llvm/Makefile b/devel/llvm/Makefile
index 1f5ca40fe1e3..f4fb2e423ae2 100644
--- a/devel/llvm/Makefile
+++ b/devel/llvm/Makefile
@@ -7,7 +7,7 @@
PORTNAME= llvm
PORTVERSION= 3.2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= devel lang
MASTER_SITES= http://llvm.org/releases/${PORTVERSION}/
DISTNAME= ${PORTNAME}-${PORTVERSION}.src
diff --git a/devel/llvm/files/patch-lib_Target_X86_X86JITInfo.cpp b/devel/llvm/files/patch-lib_Target_X86_X86JITInfo.cpp
new file mode 100644
index 000000000000..b1d4cb90d8cd
--- /dev/null
+++ b/devel/llvm/files/patch-lib_Target_X86_X86JITInfo.cpp
@@ -0,0 +1,26 @@
+$NetBSD: patch-lib_Target_X86_X86JITInfo.cpp,v 1.1 2013/04/02 12:00:05 joerg Exp $
+$FreeBSD$
+
+It is not yet decided whether extern "C" applies to static functions, so
+be explicit for now.
+
+--- lib/Target/X86/X86JITInfo.cpp.orig 2013-04-01 12:16:22.000000000 +0000
++++ lib/Target/X86/X86JITInfo.cpp
+@@ -342,6 +342,17 @@ extern "C" {
+ /// must locate the start of the stub or call site and pass it into the JIT
+ /// compiler function.
+ extern "C" {
++
++#if !(defined (X86_64_JIT) && defined(_MSC_VER))
++ // the following function is called only from this translation unit,
++ // unless we are under 64bit Windows with MSC, where there is
++ // no support for inline assembly
++static
++#endif
++void LLVM_ATTRIBUTE_USED
++X86CompilationCallback2(intptr_t *StackPtr, intptr_t RetAddr)
++__asm__("X86CompilationCallback2");
++
+ #if !(defined (X86_64_JIT) && defined(_MSC_VER))
+ // the following function is called only from this translation unit,
+ // unless we are under 64bit Windows with MSC, where there is