-O doesn't work with gcc-3.2?

Thomas Hallgren hallgren@cse.ogi.edu
Mon, 25 Nov 2002 14:02:38 -0800


Hi,

Thomas Hallgren wrote:

> Anatoli Tubman (by way of Anatoli Tubma) wrote:
>
>> ghc fails with this message:
>>
>> Prologue junk?: .globl __stginit_Main
>> __stginit_Main:
>>        pushl   %ebp
>>        movl    %esp, %ebp
>>
>> It works without -O. I'm on stock Mandrake 9.0 system.
>
> It appears that the version of GCC 3.2 supplied with Mandrake 9.0 
> ignores the -fomit-frame-pointer flag, and this confuses GHC's 
> mangler. The version of GCC supplied with RedHat 8.0 (gcc version 3.2 
> 20020903) does not seem to have this problem...

Upgrading from the Mandrake 9.0 default gcc-3.2-1mdk to gcc-3.2-4mdk 
from Mandrake cooker appears to solve the problem.

http://speakeasy.rpmfind.net//linux/RPM/cooker/cooker/i586/Mandrake/RPMS/gcc-3.2-4mdk.i586.html

Thomas H