From: "M. Edward (Ed) Borasky" Date: 2007-06-23T13:11:57+09:00 Subject: Re: Looking for minimalist ruby. Andrew Thompson wrote: > Alex Young wrote: >> I get this: >> >> 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] >> >> make: *** [.rbconfig.time] Aborted >> >> when I use those options. > > I think ruby *really* doesn't like to be built with optimizations. I > believe the garbage collector in particular has problems with it. > > Andrew > > This combination just compiled successfully on my Gentoo box: znmeb@DreamGate ~/ruby-test/ruby-1.8.6-p36 $ set|grep CFLAGS CFLAGS='-Os -march=athlon-tbird -fomit-frame-pointer' znmeb@DreamGate ~/ruby-test/ruby-1.8.6-p36 $ gcc --version gcc (GCC) 4.1.2 (Gentoo 4.1.2) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Ruby 1.8.6-p36, gcc 4.1.2 and CFLAGS='-Os -march=athlon-tbird -fomit-frame-pointer' I doubt if the Athlon TBird piece is why mine worked and yours didn't.