
#9521: ghc doesn't pass flags to ld via -optl -------------------------------------+------------------------------------- Reporter: | Owner: MikolajKonarski | Status: closed Type: bug | Milestone: Priority: normal | Version: 7.8.3 Component: Compiler | Keywords: Resolution: invalid | Architecture: Unknown/Multiple Operating System: Linux | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by MikolajKonarski): * status: new => closed * resolution: => invalid Comment: I panicked, there is probably no bug. The offending call to /usr/bin/ld is done directly by cabal, not by ghc, and so I needed to pass --ld-option as well: {{{ cabal install haskell-lexer-1.0 -j1 --ghc-option="-optc-m32" --ghc- option="-opta-m32" --ghc-option="-optl-m32" --ld-option="-melf_i386" }}} This works and so compiling i386 binaries on amd64 Linux finally works for me. BTW, for completeness, I also had to do {{{ sudo apt-get install libgmp-dev:i386 }}} which unfortunately breaks compilation of amd64 binaries, or hack around as follows {{{ sudo ln -s /usr/lib/i386-linux-gnu/libgmp.so.10.0.2 /usr/lib/i386-linux- gnu/libgmp.so }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9521#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler