#5033: GHC 7.0.2 does not build on OS X 10.5.
-------------------------+--------------------------------------------------
Reporter: nominolo | Owner:
Type: bug | Status: new
Priority: normal | Component: Build System
Version: 7.0.2 | Keywords:
Testcase: | Blockedby:
Os: MacOS X | Blocking:
Architecture: x86 | Failure: Building GHC failed
-------------------------+--------------------------------------------------
Comment(by nominolo):
Okay, it seems like the GMP C library is not compilled with PIC defined.
Here is part of the hand-coded assembly for `add`:
{{{
subl %eax,%edx C ... enter the loop
shrl $2,%eax C restore previous value
ifdef(`PIC',`
C Calculate start address in loop for PIC. Due to limitations in
C old gas, LF(M4_function_n,oop)-L(0a)-3 cannot be put into the
leal
call L(0a)
L(0a): leal (%eax,%eax,8),%eax
addl (%esp),%eax
addl $L(oop)-L(0a)-3,%eax
addl $4,%esp
',`
C Calculate start address in loop for non-PIC.
leal L(oop)-3(%eax,%eax,8),%eax
')
C These lines initialize carry from the 5th parameter. Should be
C possible to simplify.
pushl %ebp FRAME_pushl()
movl PARAM_CARRY,%ebp
}}}
If we now look at the output from `otool -tv add_n.o` we see that it
apparently uses the code for non-PIC:
{{{
00000026 subl %eax,%edx
00000028 shrl $0x02,%eax
0000002b leal 0x0000007d(%eax,%eax,8),%eax
00000032 pushl %ebp
00000033 movl 0x20(%esp),%ebp
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5033#comment:2>
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