Alex Young wrote:
> Nobuyoshi Nakada wrote:
>> Hi,
>>
>> At Sat, 23 Jun 2007 00:26:13 +0900,
>> Alex Young wrote in [ruby-talk:256583]:
>>> gcc -Os -fomit-frame-pointer  -DRUBY_EXPORT   -rdynamic
>>> -Wl,-export-dynamic -L.   main.o  libruby-static.a -ldl -lcrypt -lm  
>>> -o miniruby
>>> ./lib/fileutils.rb:1206: [BUG] Segmentation fault
>>> ruby 1.8.6 (2007-03-13) [i686-linux]
>>
>> --disable-frame-address configuration option is necessary to
>> use -fomit-frame-pointer.
>>
> It's not just that...
> 
> $ export CFLAGS="-Os -fomit-frame-pointer --disable-frame-address"
> $ ./configure
> checking build system type... i686-pc-linux-gnu
> checking host system type... i686-pc-linux-gnu
> checking target system type... i686-pc-linux-gnu
> checking for gcc... gcc
> checking for C compiler default output file name...
> configure: error: C compiler cannot create executables
> See `config.log' for more details.
> 
> config.log led me to try this:
> 
> $ gcc -Os -fomit-frame-pointer --disable-frame-address test.c
> cc1: error: unrecognised command line option "-fdisable-frame-address"
> 
> Is it just my build of GCC (4.0.3)?
> 
1. As far as I know, you don't need "-fdisable-frame-address". Mine is
working fine without it.
2. gcc 4.0.3 "should" work, but most versions of gcc 4.0 had some things
b0rk3d and 4.1 is in much better shape. I'm awaiting word from Gentoo
Central on when and how to upgrade to gcc 4.2 -- since almost everything
in Gentoo is compiled from source, a compiler change is a very big deal
in some cases.