tools-compilers at opensolaris.org is a good place to ask questions like this.

Of course, checking the C manual is highly recommended.
You can google for "sun studio docs" and follow the links.



--chris



-------- Original Message --------
From: Rodney <rodn...@bigpond.net.au>
Subject: [sw-porters-discuss] GRETL GCCisms and LAPACK linking
Date: Wed, 16 Sep 2009 04:55:07 -0700 (PDT)
To: sw-porters-discuss at opensolaris.org

I'm taking a look at porting GRETL (gretl.sourceforge.net), the Gnu Regression, 
Econometrics and Time-series Library to OSOL. There are two main issues I've 
encountered so far - the need to link to
lapack, and some Makefile GCCisms.

The file /lib/Makefile.in contains the following section.
%.lo: %.c
        $(COMPILE) -o $@ $<
        $(CC) $(CFLAGS) -MM -MT $*.lo $< > .deps/$*.d

The -MM and -MT options are GCCisms. The gcc manual explains:

-MM
    Like ?-M? but do not mention header files that are found in system header
    directories, nor header files that are included, directly or indirectly, 
from such
    a header.

-MT target
           Change the target of the rule emitted by dependency generation. By 
default
           CPP takes the name of the main input file, deletes any directory 
components
           and any file suffix such as ?.c?, and appends the platform?s usual 
object suffix.
           The result is the target.
           An ?-MT? option will set the target to be exactly the string you 
specify. If you
           want multiple targets, you can specify them as a single argument to 
?-MT?, or
           use multiple ?-MT? options.
           For example, ?-MT ?$(objpfx)foo.o?? might give
                 $(objpfx)foo.o: foo.c

Can anyone suggest how to translate these two GCCisms to sun studio compiler 
options?
(Furthermore are there any resources available that compare GCC and sun studio 
options?).
This would enable compiling GRETL with the sun studio compiler and it's 
provided LAPACK.

On Opensolaris LAPACK is available with sun studio's performance library and 
can be linked into a sun studio compilation with the -xlic_lib=sunperf (for c 
and fortran) or -library=sunperf (for c++)
options. Does anyone know how to link these sun studio libraries into a gcc 
compilation?
This would enable compiling GRETL with the gcc compiler instead of Sun Studio 
and not needing to worry about the above -MM and -MT GCCisms.

A better solution long term would be some sort of separate IPS packaging of the 
linear algebra libraries that come with sun studio. Downloading sun studio is a 
huge runtime requirement for any program
that needs to link with LAPACK and friends.

Appreciate any pointers.

Rod
-- 
This message posted from opensolaris.org
_______________________________________________
sw-porters-discuss mailing list
sw-porters-discuss at opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/sw-porters-discuss

Reply via email to