Prashant Srinivasan wrote:
> http://cr.opensolaris.org/~chriszhu/ruby-webrev/ is the webrev for the
> inclusion of Ruby 1.8 into Solaris(PSARC/2007/600).
> 
>  Code reviews are solicited from this team, and review/feedback is
> requested by 11/5/2007.

Only a 5min race through the patch (patch code is quoted with '> '):

1.
http://cr.opensolaris.org/~chriszhu/ruby-webrev/usr/src/cmd/ruby18/Makefile.sfw.html
> RUBY_CFLAGS="-fast -xipo -xtarget=generic"

Please do _not_ use "-fast". "-fast" is a macro which expands to many
options, including those who change the representation of the
floating-point datatypes (which is usually bad (unless you're sure the
code doesn't rely on some certain floating-point features)) and change
framepointer stuff on x86 (AFAIK the DTrace people won't like that...).

AFAIK the options you want are "-xO4 -xipo=2" - going beyond -xO4 may
not be worth the trouble.
Additionally I suggest:
- use the options "-xspace" to save code space
- use "-xstrconst" to make string-literals read-only and merge identical
literals into one - this saves additional memory at runtime (this is the
default for "gcc")
- use "-xc99=%all -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1" - this will
enable C99/XPG6 features in the compiler (including little details like
that |popen()| and |system()< will use /usr/xpg4/bin/sh as their shell
which is mucz closer to what the opensource projects expect as minimum
system shell)

Combined these flags would be:
-- snip --
RUBY_CFLAGS="-xc99=%all -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1 -xO4
-xipo=2 -xspace -xstrconst"
-- snip --

>  clean:
>          -rm -rf $(RUBY)
>          -rm -rf $(READLINE)
>          -rm -rf $(RUBYGEMS)

This would be rewritten as:
-- snip --
clean:
        -rm -rf $(RUBY) \
             $(READLINE) \
             $(RUBYGEMS) \
-- snip --
(saves two calls to /usr/bin/rm :-) )


2. (Dumb ?!) question:
Why does usr/src/pkgdefs/SUNWruby18u/postinstall create links ? Wouldn't
it be better to put the links in a package instead ?

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

Reply via email to