現在、Cygwin を使用して Windows で llvm 3.3 をビルドしようとしています。
コンパイルは順調に進んでいますが、リンク中にビルドが次のエラーでクラッシュします。
llvm[2]: ======= Finished Linking Release+Asserts Executable llvm-mc (without symbols)
make[2]: Leaving directory `/cygdrive/c/Users/Jupotter/Code/llvm-3.3.src/build/tools/llvm-mc'
llvm[2]: Compiling ExecutionDriver.cpp for Release+Asserts build
/cygdrive/c/Users/Jupotter/Code/llvm-3.3.src/build/Release+Asserts/lib/libLLVMMCJIT.a(SectionMemoryManager.o):SectionMemoryManager.cpp:(.text+0x3b): référence indéfinie vers « __register_frame »
/cygdrive/c/Users/Jupotter/Code/llvm-3.3.src/build/Release+Asserts/lib/libLLVMMCJIT.a(SectionMemoryManager.o):SectionMemoryManager.cpp:(.text+0x3b): relocalisation tronquée pour concorder avec la taille: R_X86_64_PC32 vers le symbole indéfini __register_frame
/usr/lib/gcc/x86_64-pc-cygwin/4.8.1/../../../../x86_64-pc-cygwin/bin/ld: /cygdrive/c/Users/Jupotter/Code/llvm-3.3.src/build/Release+Asserts/lib/libLLVMMCJIT.a(SectionMemoryManager.o): mauvaise adresse de relocalisation 0x0 dans la section «.pdata»
英語で:
undefined reference to "__register_frame
relocation truncated to concord with size: R_X*^_^$_PC32 to undefined symbol __register_frame
wrong relocation address in 0x0 in section ".pdata"
次のコマンドで llvm をビルドします。
$ mkdir build
$ cd build
$ ../configure LDFLAGS=-Wl,--stack,16777216 --disable-jit --enable-targets=host-only
$ make -j4
LDFLAGS
オプションは、win64 プラットフォームのllvm入門ガイドから取得されます。問題があるのはlibLLVMCJITのように見えるので、jitを無効にしてみました。
このビルドが失敗する原因は何ですか?