Compiling a cabal project with LLVM on GHC 7.10 RC1

2015-01-07 Thread Brandon Simmons
I've tried:

  $ 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 foo-0.3.0.0...
  Preprocessing library foo-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

I don't see anything referencing PIC in the output of cabal build
-v. I can build a hello world program, just fine with `ghc --make`:

  $ /usr/local/bin/ghc-7.10.0.20141222 --make -O2 -fllvm   Main.hs
  [1 of 1] Compiling Main ( Main.hs, Main.o )
  Linking Main ...

Thanks,
Brandon
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Compiling a cabal project with LLVM on GHC 7.10 RC1

2015-01-07 Thread Edward Z. Yang
...is there -dynamic in the -v output?  Don't you also want
--disable-shared?

Excerpts from Brandon Simmons's message of 2015-01-07 12:21:48 -0800:
 I've tried:
 
   $ 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 foo-0.3.0.0...
   Preprocessing library foo-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
 
 I don't see anything referencing PIC in the output of cabal build
 -v. I can build a hello world program, just fine with `ghc --make`:
 
   $ /usr/local/bin/ghc-7.10.0.20141222 --make -O2 -fllvm   Main.hs
   [1 of 1] Compiling Main ( Main.hs, Main.o )
   Linking Main ...
 
 Thanks,
 Brandon
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users