The commit 110f5e2056f80d0b87f2a4388bc35727070ba6d5 was meant to fix
this build error, but it only add x86disassembler. The macro
InitializeAllDisassemblers() (from llvm/Target/TargetSelect.h)
initializes *all* disassemblers build with llvm (in my case: X86 and
Arm; this is precompiled package from ubuntu 11.04), but we only link
with X86 one.

The attached patch fixes it by initializing only X86 disassembler. I
understand that this is the only backend we support now, right?
From 0997970aa9927d37e884212046e3ea0e7eea915b Mon Sep 17 00:00:00 2001
From: Gustaw Smolarczyk <wielkie...@gmail.com>
Date: Mon, 14 Mar 2011 18:52:45 +0100
Subject: [PATCH] gallivm: Fix build when X86 is not the only llvm's backend

Signed-off-by: Gustaw Smolarczyk <wielkie...@gmail.com>
---
 src/gallium/auxiliary/gallivm/lp_bld_debug.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
index bb2c82f..f87907a 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
@@ -186,7 +186,7 @@ lp_disassemble(const void* func)
    InitializeAllAsmPrinters();
 #endif
 
-   InitializeAllDisassemblers();
+   LLVMInitializeX86Disassembler();
 
    OwningPtr<const MCAsmInfo> AsmInfo(T->createAsmInfo(Triple));
 
-- 
1.7.4.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to