William Stein wrote:
> On Tue, Sep 29, 2009 at 5:11 PM, Robert Bradshaw
> <rober...@math.washington.edu> wrote:
>>
>> On Sep 29, 2009, at 3:36 PM, Dr. David Kirkby wrote:

>>> As such, I've set all flags, including those for Fortran, even when
>>> not
>>> needed. The extra few bytes of code does no significant harm. If the
>>> package does not use Fortran, then it will ignore the Fortran flags.
>>>
>>> The problem with creating a spkg-install with a subset of things
>>> set, is
>>> that the subset needs carefully testing for each package. My version
>>> might waste a couple of KB bytes, but it is safe.
>>>
>>> So I have tended to write spkg-install's in such a way that they
>>> should
>>> work with any package.
>>>
>>> Minh asked me the other day to write this up, though I chose not to
>>> just
>>> now, as I am not convinced my latest version is as good as possible.
>> Sounds like something that could be globally useful, rather than
>> having separate logic inside each spkg.
> 
> +1

OK, I'll add this logic to sage-env.

I know the variables AR, CP, NM etc are supposed to be user configurable 
in Sage, but I somewhat doubt many packages respect the rarer ones, 
given they don't even respect CC and CXX.



>>> One of the troublesome packages I noticed when testing with Sun Studio
>>> is tachyon, which uses -O6.
>>>
>>> http://sagetrac.org/sage_trac/ticket/7069
>>>
>>> It's not the -O6 which is causing the Solaris problem, though I do
>>> think
>>>   -O6 is unwise. The fact that the tachyon.spkg ignores CC and uses
>>> gcc
>>> anyway, makes me believe the code is not well thought out. Therefore I
>>> suspect there has not been extensive testing to prove -O6 is safe.
> 
> There is no -O6 option to GCC.  There are three nonzero numbered
> optimization levels:  -O1, -O2, and -O3.   Do "man gcc".   The
> optimization options are:
> 
>                      -O  -O0  -O1  -O2  -O3  -Os


That does not stop tachyon using -O6 - see

http://sagetrac.org/sage_trac/ticket/7069

gcc does not indicate any error. It's anyones guess what it does when 
passed -O6.



> The difference between -O2 and -O3 is: " -O3 turns on all
> optimizations specified by -O2 and also turns on the
> -finline-functions, -funswitch-loops and -fgcse-after-reload options."
>  I think these are not *supposed* to generate invalid assembly code --
> if they do, isn't that considered a bug in GCC?  Of course there are
> bugs in GCC, and using aggressive optimization is much more likely to
> uncover them.
> 
> -O3 has drawbacks such as potentially larger binaries, cache misses, etc.
> 
>  -- William

OK. I'll set it at -O3. I think on Solaris with Sun's compiler, it would 
be sensible to use just -O, as that will set it to whatever is the 
default optimisation, which is currently -O3, but Sun could change that 
in the future.

-O                            Use default optimization level (-xO3)

so -O, -x03 and -O3 are all the same, but they might not be in another 
compiler. Sun say -O3 can break some code, so its not a 100% guarantee, 
but it would appear such could would be quite rare.




--~--~---------~--~----~------------~-------~--~----~
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