我试过了:
$ cabal install --only-dependencies -w /usr/local/bin/ghc-7.10.0.20141222 --enable-tests --enable-benchmarks --ghc-option=-fllvm --ghc-option=-static
$ cabal configure -w /usr/local/bin/ghc-7.10.0.20141222 --enable-tests --enable-benchmarks --ghc-option=-fllvm --ghc-option=-static
$ cabal build
Building unagi-chan-0.3.0.0...
Preprocessing library unagi-chan-0.3.0.0...
when making flags consistent: Warning:
Using native code generator rather than LLVM, as LLVM is incompatible with -fPIC and -dynamic on this platform
我在cabal build -v
的输出中看不到任何引用“PIC”的内容。
答案 0 :(得分:2)
我想我需要--disable-shared
:
cabal configure -w /usr/local/bin/ghc-7.10.0.20141222 --enable-tests --enable-benchmarks --ghc-option=-fllvm --ghc-option=-static --disable-shared