
On Thu, Apr 18, 2013 at 06:48:12AM -0400, Dubiousjim wrote:
On Wed, Apr 17, 2013 at 11:18:52PM +0100, Ian Lynagh wrote:
On Fri, Apr 05, 2013 at 11:12:38PM -0400, Dubiousjim wrote:
target$ inplace/bin/ghc-stage2 -o hello-cross hello.hs [1 of 1] Compiling Main ( hello.hs, hello.o ) Linking hello-cross ... target$ ./hello-cross Can't modify application's text section; use the GCC option -fPIE for position-independent executables.
You can pass -fPIE to gcc by using the -optc-fPIE flag.
Thanks Ian. There's much I don't fully understand about ghc, but I read somewhere that the -optc-* options would only be applied when building via intermediate C files, which isn't happening in the compilation process specified above. Is this incorrect, or have I misunderstood something?
Ah, sorry, I assumed that you were doing an unreg build. If I were you I'd probably start off by trying to do an unreg cross-compile with HEAD. However, the unreg build is currently broken in HEAD (http://hackage.haskell.org/trac/ghc/ticket/7792), but I'm hoping to have a fix soon. Thanks Ian