#4163: Make cross-compilation work
---------------------------------+------------------------------------------
    Reporter:  simonmar          |        Owner:                      
        Type:  task              |       Status:  new                 
    Priority:  high              |    Milestone:  7.0.2               
   Component:  Build System      |      Version:  6.12.3              
    Keywords:                    |     Testcase:                      
   Blockedby:                    |   Difficulty:  Difficult (2-5 days)
          Os:  Unknown/Multiple  |     Blocking:                      
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown        
---------------------------------+------------------------------------------
Changes (by altaic):

 * cc: william.knop.nos...@… (added)


Comment:

 I just tried compiling HEAD with host = build = target = x86_64-apple-
 darwin on my OSX (10.6.5) machine (64-bit processor; kernel is booted as
 64-bit as well), and it fails with:

 {{{
 "/usr/bin/gcc" -o utils/unlit/dist/build/tmp/unlit  -m64 -fno-stack-
 protector              utils/unlit/dist/build/unlit.o
 ld: warning: in utils/unlit/dist/build/unlit.o, file was built for i386
 which is not the architecture being linked (x86_64)
 Undefined symbols:
   "_main", referenced from:
       start in crt1.10.6.o
 ld: symbol(s) not found
 collect2: ld returned 1 exit status
 make[1]: *** [utils/unlit/dist/build/tmp/unlit] Error 1
 make: *** [all] Error 2
 }}}

 I'll hazard a guess that this is because the configure scripts for
 libraries/integer_gmp and libraries/unix are autodetecting host, build,
 and target as i386. Shouldn't libraries inherit host, build, and target
 from the "overall" configure script a la [wiki:CrossCompilation]?

 For reference, a standard i386 build (no configure options) does pretty
 well, until it inexplicably fails in stage 2 with "make[1]: ***
 [libraries/vector/dist-install/build/Data/Vector/Fusion/Stream/Monadic.o]
 Bus error", but that's for another ticket. :)

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4163#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to