Simon King wrote:
> Hi!
> 
> On Oct 6, 9:22 am, Robert Bradshaw <rober...@math.washington.edu>
> wrote:
>> Even easier, it seems, would be to to add -m46 (or equivalent) to  
>> CFLAGS directly in sage-env, rather than having the if [ $SAGE64 ...]  
>> test in every spkg-install.
> 
> This sounds reasonable to me. If I am not mistaken, it has the
> additional advantage of not breaking anything: Even if an spkg-install
> adds -m64 to CFLAGS, it would not hurt if sage-env would put "-m64" in
> CFLAGS, or would it be a problem for a compiler to get "-m64" twice in
> one line?
> 
> Simon

I'm not so sure this is a good idea.

Certainly adding -m64 twice is not an issue. There are several bits in 
Sage which do that. Neither the Sun or GNU compilers moan about that - I 
can't speak for other compilers.

An issue would arise however if someone wants to append the option 
-foobar to CFLAGS, since it is needed for a particular package. So they 
put in spkg-install:


CFLAGS="$CFLAGS -foobar"
export CFLAGS

Now every package built after that one would have CFLAGS as

-m64 -foobar

whether or not it wants the -foobar, since it has been exported.

Hence it's probably safer to have each spkg-install start with

CFLAGS=$SAGE64_CFLAG

and add others as needed.

This would not be an issue if someone write

./configure CFLAGS="$CFLAGS -foobar"

as the environment variable CFLAGS would not be corrupted. But I think 
in some cases it may be necessary to export CFLAGS, in which case 
relying on anything being there might be unwise.

Dave






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