そろそろllvm-2.4が出るらしいけど、2.3をビルドしてみる。
The LLVM Compiler Infrastructure Projectのスケジュールを見ると、今月末あたりに2.4がリリースみたいだけど、まぁそれはそれとしてLLVMの2.3をCell用にコンパイルしてみる。環境は以下の通り。
- PS3(40GB)
- gentoo linux 20071212
- g++ 4.1.2
LLVMをビルド。
ソースコードをダウンロード。
wget http://www.llvm.org/releases/2.3/llvm-2.3.tar.gz wget http://www.llvm.org/releases/2.3/llvm-gcc-4.2-2.3.source.tar.gz
LLVMをビルド。spu-gccは結局tarballから作る。 - 並列メモ?の教訓を生かして、powerpcにしてみる。
tar xzf llvm-2.3.tar.gz mkdir llvm-obj cd llvm-obj ../llvm-2.3/configure --prefix=$HOME/opt --build=powerpc-unknown-linux-gnu make -j2 make install
LLVM-GCCはうまくいかない。
tar xzf llvm-gcc-4.2-2.3.source.tar.gz mkdir llvm-gcc-obj cd llvm-gcc-obj ../llvm-gcc4.2-2.3.source/configure --prefix=$HOME/opt --program-prefix=llvm- --host=powerpc-unknown-linux-gnu --enable-languages=c,c++ make
前回同様うまくいかない。
../../llvm-gcc4.2-2.3.source/gcc/config/rs6000/rs6000.c: In function 'rs6000_override_options':
../../llvm-gcc4.2-2.3.source/gcc/config/rs6000/rs6000.c:1538: error: 'MASK_MACHO_DYNAMIC_NO_PIC' undeclared (first use in this function)
../../llvm-gcc4.2-2.3.source/gcc/config/rs6000/rs6000.c:1538: error: (Each undeclared identifier is reported only once
../../llvm-gcc4.2-2.3.source/gcc/config/rs6000/rs6000.c:1538: error: for each function it appears in.)
../../llvm-gcc4.2-2.3.source/gcc/config/rs6000/rs6000.c: In function 'rs6000_emit_prologue':
../../llvm-gcc4.2-2.3.source/gcc/config/rs6000/rs6000.c:16841: warning: implicit declaration of function 'VECTOR_SAVE_INLINE'
../../llvm-gcc4.2-2.3.source/gcc/config/rs6000/rs6000.c:16842: error: 'lr_already_set_up_for_pic' undeclared (first use in this function)
../../llvm-gcc4.2-2.3.source/gcc/config/rs6000/rs6000.c: In function 'rs6000_output_mi_thunk':
../../llvm-gcc4.2-2.3.source/gcc/config/rs6000/rs6000.c:18290: warning: implicit declaration of function 'add_compiler_branch_island'
../../llvm-gcc4.2-2.3.source/gcc/config/rs6000/rs6000.c:18290: warning: assignment makes pointer from integer without a cast
../../llvm-gcc4.2-2.3.source/gcc/config/rs6000/rs6000.c:19983:8: warning: extra tokens at end of #endif directive
In file included from ../../llvm-gcc4.2-2.3.source/gcc/config/rs6000/rs6000.c:22278:
./gt-rs6000.h: At top level:
./gt-rs6000.h:138: error: 'branch_island_list' undeclared here (not in a function)