[ ghc-Bugs-642810 ] Still fails to build with GCC 3.2 on Mandrake
noreply at sourceforge.net
noreply at sourceforge.net
Tue Dec 3 12:12:31 EST 2002
Bugs item #642810, was opened at 2002-11-23 10: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, at 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: Joe English (jenglish)
Date: 2002-12-03 09:12
Message:
Logged In: YES
user_id=68433
Simon wrote:
> Re-opened; we really need a workaround for this one.
I've attached the patch I used to build a Mandrake RPM; this
just adds -mno-omit-leaf-frame-pointer at the relevant spot
in DriverFlags.hs.
Unfortunately, applying this patch as it stands *breaks* the
compiler if an older gcc is used, since
-mno-omit-leaf-frame-pointer was introduced in GCC 3.X.
----------------------------------------------------------------------
Comment By: Simon Marlow (simonmar)
Date: 2002-12-03 03: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-27 16: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 13: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 10: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 08: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 02: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
More information about the Glasgow-haskell-bugs
mailing list