On Mon, Jan 18, 2010 at 4:15 PM, Dr. David Kirkby
<david.kir...@onetel.net> wrote:
> William Stein wrote
>>>
>>> How does this sound then.
>>>
>>> Set SAGE_COMMON_FLAGS
>>>
>>> to be a reasonable set of CFLAGS for most packages, so most .spkg's can
>>> simply use
>>>
>>> CFLAGS=$SAGE_COMMON_FLAGS
>>>
>>> which will have -g, -Wall, and if necessary -m64, when using gcc. For
>>> other
>>> compilers, the options will be different, but always a reasonable set for
>>> a
>>> compiler.
>>>
>>> Then the environment variable CFLAGS is unmodified in any way, unless a
>>> package choses to use them.
>>>
>>> It's not quite as nice, in that most .spkg's include
>>>
>>> CFLAGS=$SAGE_COMMON_FLAGS
>>> (likewise for C++ and Fortran).
>>>
>>> but at least it will get rid of all this SAGE64 stuff, and also work for
>>> any
>>> compiler, which the current setup will not, as compiler flags are
>>> hard-coded.
>>
>> I think that is a great idea!
>>
>> William
>>
>
> OK, I'll change to that.
>
> I should have made it clearer, that it will need to be:
>
> CFLAGS=$SAGE_COMMON_CFLAGS
> CXXFLAGS=$SAGE_COMMON_CXXFLAGS
> FCFLAGS=$SAGE_COMMON_FCFLAGS
>
> since the options may be different for different for the C/C++/Fortran
> compilers. I know the Sun C++ compiler will need an option which the C or
> Fortran compilers would not use.
>

This should be a single function that is called by spkg-install and
put in some script, e.g.,
users put this in spkg-install:

    sage_set_cflags()

and the above gets set.

Any time you ever consider putting more than one line of code in a
bunch of spkg-install files, don't.

William
-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to