Roland, Thanks for your review and sorry for the delay(I was on vacation for several days and it took me a while to figure out how to compile 64bit Erlang).
New webrev: http://cr.opensolaris.org/~rayx/erlang/webrev/ Latest Change: http://cr.opensolaris.org/~rayx/erlang/latest_change/ (Those files with 0 line change are actually new files I created this time) Please note that Erlang source code can only be compiled with gcc, it cannot be compiled with Sun Studio. See more details below... On 04/28/08, Roland Mainz wrote: > > General issue: SPARC always suppirt 64bit - why aren't you delivering a > 64bit binary on SPARC ? The new code generate 64bit binaries now. For that purpose, I made the following changes: - modified cmd/Makefile.targ to add some new targets for files and directories needed for building 64bits binaries - modified cmd/erlang/Makefile.sfw to add 64bit targets and compile options - renamed the previous postinstall-sfw to install-doc, now it contains documents related operations only - modified SUNWerlang/prototype_i386 and SUNWerlang/prototype_sparc to include 64bit files > > > +VER = $(COMPONENT_NAME:sh)_src_$(COMPONENT_VERSION:sh) > > +TARBALL = $(VER).tar.gz > >+PATCHES:sh = echo Patches/*.patch > > 1. Please think about adding "-xc99=%all -D_XOPEN_SOURCE=600 > -D__EXTENSIONS__=1" to CFLAGS. The advantage is that libc&co. Behave > closer to the standard (and similar like glibc) which may be > usefull (one precedent is the ksh93-integration work where these flags > had a huge (positive) impact on performance and footprint) ... and as a > small side-effect things like |system()|, |popen()| etc. use > /usr/xpg4/bin/sh instead of /sbin/sh as system shell which matches the > expectations of the GNU people for a "normal" system shell. > 2. Please add "-xstrconst" to CFLAGS to put all string literals into > read-only memory (which can be shared between processes) > > If you have any problems with these flags send me a PM, I can make > patches for you... > I suppose all the above options are only valid to cc in Sun Studio, right? Since Erlang can only be compiled with gcc, I used "-m64 -O3" as CFLAGS. > > --- /dev/null Fri Apr 25 07:19:01 2008 > > +++ new/usr/src/cmd/erlang/postinstall-sfw Fri Apr 25 07:19:01 2008 > [snip] > > AFAIK it may be nice to use /usr/bin/ksh93 or /usr/bni/bash (if it > supports the "errexit" flag) for this script and then do a $ set -o > errexit # at the beginning that the script - the "errexit" flag causes > the shell to immediately abort the script when it hits a command which > returns a failure instead of continuing operation (and maybe running > amok (and ordering 15 new A380F planes via your Ebay-account etc. =:-) > )) > > Please add "set -o errexit" at the top of the script to make sure it > exists when a command returns a non-zero exit code (=failure). I added "set -e" in my script. However, I am not sure if I should change sh or not. I think application should follow the convention in the framework, and currently SH on SFW gate is set to sh. > Note: The following issues are mainly based on > http://www.opensolaris.org/os/project/shell/shellstyle/ ... I didn't know this page before(thanks for the pointer). However, since I am not sure if I should change sh(as explaied before), most of the changes you suggested below(source and typset cmds) cannot be implemented in sh. For your sugestoin on using double quotes whenever possible, I modified some code, but not all. The reason is that I found using so many double quotes in code hurts code readability (or is it just because I am not used to this way yet?). I wonder if you have a real example of this coding style so I can refer? Thanks, Raymond
