[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Initial support for Sun Studio for Linux compilers



I just added some changes to hints/linux.sh to help support the alpha 
version of the Sun Studio compilers for Linux.  Most of the flags are based
on the current Solaris settings with a few minor changes.  First, rather
than relying in "-O2", I am setting the optimize flags to "-xO2", which 
would seem to be better for optimizing Perl.  Actually, I couldn't find
a reference to a straight "-O2".  There is a possibility that "-fast"
could be used instead, but that's pure speculation right now.

My main problem is that its still a bit hackish.  I'll let the added 
README.linux explain...

Also, some special instructions for building Perl with Sun Studio on Linux.
Following the normal C<Configure>, you have to run make as follows:

    LDLOADLIBS=-lc make

C<LDLOADLIBS> is an environment variable used by the linker to link modules
C</ext> modules to glibc.  Currently, that environment variable is not getting
populated by a combination of C<Config> entries and C<ExtUtil::MakeMaker>.
While there may be a bug somewhere in Perl's configuration or
C<ExtUtil::MakeMaker> causing the problem, the most likely cause is an
incomplete understanding of Sun Studio by this author.  Further investigation
is needed to get this working better.

Does anyone with more configuration and/or Sun Studio experience see anything
that I'm messing up?  I'm attaching my myconfig for the curious.  (Yes, I
need to fix the CC identificaton, but I wanted to get something working
first)

On a better note though, the performance of Sun Studio is encouraging.  My
basic configuration with a statically linked Perl produced an execuatable 
3% smaller than a similar gcc configuration.  Runtimes for "make test"
were slightly faster, but I haven't run them head-to-head enough to make
a statistically correct assertion yet.  Soon, though... :)

Steve Peters
steve@fisharerojo.org
Summary of my perl5 (revision 5 version 9 subversion 3 patch 26136) configuration:
  Platform:
    osname=linux, osvers=2.6.12-9-386, archname=i686-linux
    uname='linux kirk 2.6.12-9-386 #1 mon oct 10 13:14:36 bst 2005 i686 gnulinux '
    config_args='-des -Dusedevel -Dcc=/opt/sun/sunstudio10u1/bin/cc'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='/opt/sun/sunstudio10u1/bin/cc', ccflags ='-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-xO2',
    cppflags='-I/usr/local/include'
    ccversion='', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='/opt/sun/sunstudio10u1/bin/cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -ldl -lm -lcrypt -lutil -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/libc-2.3.5.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.3.5'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-KPIC', lddlflags='-G -Bdynamic -L/usr/local/lib'


[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]