[Hackage] #564: Cabal doesn't use LD options when testing linking

Hackage trac at galois.com
Fri Jun 26 08:27:11 EDT 2009


#564: Cabal doesn't use LD options when testing linking
----------------------------+-----------------------------------------------
  Reporter:  igloo          |        Owner:           
      Type:  defect         |       Status:  new      
  Priority:  high           |    Milestone:  Cabal-1.8
 Component:  Cabal library  |      Version:  1.6.0.1  
  Severity:  normal         |   Resolution:           
  Keywords:                 |   Difficulty:  unknown  
Ghcversion:                 |     Platform:           
----------------------------+-----------------------------------------------
Comment (by duncan):

 Note, this does not actually pass any LD options to Cabal:

 {{{
 $ "inplace/bin/ghc-cabal" configure
 --with-ghc="/home/kili/src/ghc/ghc-head/inplace/bin/dummy-ghc"
 --with-ghc-pkg="/home/kili/src/ghc/ghc-head/inplace/bin/ghc-pkg"
 --with-gcc="gcc" --configure-option=--with-cc="gcc"
 --with-hscolour="/usr/local/bin/HsColour"
 --configure-option=CFLAGS="-O -I/usr/local/include  "
 --configure-option=LDFLAGS="-L/usr/local/lib  "
 --gcc-options="-O -I/usr/local/include  "
 --ld-options="-L/usr/local/lib " -v3 --
  dist-install libraries/integer-gmp
 }}}

 It passes clfags and ldflags direct to the `./configure` script. It
 specifies extra flags to use when calling gcc ie `"-O -I/usr/local/include
 "` but since Cabal does not call ld directly for the lib tests, passing
 extra options to ld has no effect.

 It'd be better to use:
 {{{
 --extra-lib-dirs=/usr/local/lib
 --extra-include-dirs=/usr/local/include
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/564#comment:4>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects


More information about the cabal-devel mailing list