From: Alex Young Date: 2007-06-23T00:26:13+09:00 Subject: Re: Looking for minimalist ruby. M. Edward (Ed) Borasky wrote: > Alex Young wrote: >> soliton wrote: >>> Does any body know if there is ruby binary not greater than 1MB? It >>> would be >>> better if smaller, because it would be implemented in space constraint >>> application like embedded linux system. TIA >>> >> $ cd ruby-1.8.6/ >> $ ./configure >> ... >> $ make >> ... >> $ ls -lh ruby >> -rwxr-xr-x 1 alex alex 1.6M 2007-06-22 07:43 ruby >> $ strip ruby >> $ ls -lh ruby >> -rwxr-xr-x 1 alex alex 657K 2007-06-22 07:41 ruby >> >> Mind you, that's without any extensions. >> > > There's another trick you can try -- before the ./configure, type > > export CFLAGS="-Os -fomit-frame-pointer" > > This will optimize for space rather than speed and eliminate frame pointers. > 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. -- Alex