logo       

[ ghc-Bugs-642810 ] Still fails to build with GCC 3.2 on Mandrake: msg#00001

lang.haskell.glasgow.bugs

Subject: [ ghc-Bugs-642810 ] Still fails to build with GCC 3.2 on Mandrake

Bugs item #642810, was opened at 2002-11-23 18:51
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=642810&group_id=8032

Category: Driver
Group: 5.04.1
>Status: Open
Resolution: None
Priority: 5
Submitted By: Joe English (jenglish)
Assigned to: Nobody/Anonymous (nobody)
Summary: Still fails to build with GCC 3.2 on Mandrake

Initial Comment:

Following the instructions listed in other bug reports,
I bootstrapped GHC 5.04.1 on a machine with an older
GCC, then installed that on the target machine
(Mandrake 9.0, GCC 3.2).

But the mangler is still busted: compiling anything
with -O gives errors like:

| Prologue junk?: .globl __stginit_PrimPacked
| .type __stginit_PrimPacked,@function
| __stginit_PrimPacked:
| pushl %ebp
| movl %esp, %ebp


Compiling with '-O -fasm' works, but GHC 5.04.1 still
can't recompile itself since parts of it require '-O
-fvia-C'.

I also tried downloading the current version of
ghc-asm.lprl from the CVS repository and using that;
still get the same errors.


----------------------------------------------------------------------

>Comment By: Simon Marlow (simonmar)
Date: 2002-12-03 11:35

Message:
Logged In: YES
user_id=48280

Re-opened; we really need a workaround for this one.

----------------------------------------------------------------------

Comment By: Joe English (jenglish)
Date: 2002-11-28 00:00

Message:
Logged In: YES
user_id=68433

Yep, adding -mno-omit-leaf-frame-pointer did the trick.
Problem solved!


----------------------------------------------------------------------

Comment By: Joe English (jenglish)
Date: 2002-11-26 21:18

Message:
Logged In: YES
user_id=68433

I think I've found the problem: the mangler relies on
-fomit-frame-pointer, but gcc-3.2mdk turns
-momit-leaf-frame-pointer on by default. The latter flag
(apparently) overrides the former, so non-leaf functions end
up with unexpected junk in the prologue.

I'll try -mno-omit-leaf-frame-pointer and see if that
works. (I don't have access to my Mandrake box at the
moment; but I can get ghc to *break* in the same way on a
Red Hat 8.0 system with `ghc -c -O -optc
-momit-leaf-frame-pointer`, so that's a promising sign :-)


----------------------------------------------------------------------

Comment By: Joe English (jenglish)
Date: 2002-11-26 18:24

Message:
Logged In: YES
user_id=68433

Nope, that's not it either. Using ghc -O -v -pgmc "gcc-3.2
-march=i386 -mcpu=i386" gives the same result.

Back to the drawing board...

----------------------------------------------------------------------

Comment By: Joe English (jenglish)
Date: 2002-11-26 16:00

Message:
Logged In: YES
user_id=68433

Aha: Mandrake's GCC is configured to compile for i586,
while Redhat's is configured for i386.

I'll bet this is the source of the problem. Will
investigate further...


----------------------------------------------------------------------

Comment By: Simon Marlow (simonmar)
Date: 2002-11-26 10:48

Message:
Logged In: YES
user_id=48280

Mandrake shipped a broken GCC, it seems.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=642810&group_id=8032


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise