error in lib dependencies generated by llvm-config for 3.0

I just started rebasing my target from llvm 2.9 to 3.0. Just added a few basic files for the target. However, I got the following error:

llvm[2]: Linking Debug+Asserts executable llc
/local/scratch/uabpath/uabpath-3.0/build/tools/llc/Debug+Asserts/llc.o: In function `llvm::InitializeAllTargetMCs()':
/local/scratch/uabpath/uabpath-3.0/build/include/llvm/Config/Targets.def:26: undefined reference to `LLVMInitializePhoenixTargetMC'

Because -lLLVMPhoenixDesc is not included in the link command. The following patch fix the error:

diff --git a/tools/llvm-config/ b/tools/llvm-config/
index 840a10e..325149b 100644
--- a/tools/llvm-config/
+++ b/tools/llvm-config/
@@ -321,7 +321,7 @@ sub build_name_map {
          } elsif (defined $NAME_MAP{$target.'codegen'}) {
- $NAME_MAP{$target} = [$target.'info',
+ $NAME_MAP{$target} = [$target.'desc',
          } else {
              $NAME_MAP{$target} = [$target.'info',

However, I don't understand how this code is supposed to work. Any idea if this is a proper fix or not?

Patrik Hägglund