On Oct 6, 2009, at 12:07 AM, Dr. David Kirkby wrote:

>
> William Stein wrote:
>
>> I think a bit over a year ago there was no SAGE64 flag.  Then Michael
>> Abshoff decided "Hey, I'll port Sage to 64-bit OS X!".    He then
>> introduced a SAGE64 flag and used it specifically for the 64-bit OS X
>> port.    He then systematically went through *every* package and made
>> sure that *on OS X* it fully supported the SAGE64 flag.  And,  
>> indeed, it
>> every package does.     The roadmap would be that sometime one would
>> come back to doing a 64-bit Solaris port.  At that point, one  
>> would push
>> the SAGE64-bit flag further to work for that bi-arch environment.
>>
>> So, tag, you're "it".
>>
>>  -- William
>
> That seems a very strange decision to ensure SAGE64 would only have an
> effect on OS X, when
>
> * Without the variable SAGE64 being set, there would be no change  
> in the
> hehaviour of the code. Therefore there was no risk of it corrupting
> another build by mistake.
>
> * A 64-bit port to Solaris was planned, with all the likely compilers
> for Solaris (Sun's and GNU's) both using the same -m64 flag as OS X.
>
> Anyway, that is history, so there is nothing we can do about it.
>
> Rather than go though and take out all the
>
> if [ `uname` = "Darwin" -a $SAGE64="yes"]
>   CFLAGS="$FLAGS -m64"
>   CXXFLAGS="$CXXFLAGS -m64"
> fi
>
> I think the following will be better solution. I'd be interested what
> you think.
>
> 1) I will come up with a better sage-env, that will allow variables
> SAGE64_CFLAG, SAGE64_CXXFLAG  and SAGE64_FCFLAG to be set by the user,
> with the following behavior
>
> * If set by a environment variable, then those variables will be
> whatever the enviroment variable is.
> * They will be '-m64' with GNU compiler
> * They will be '-m64' with the Sun compiler
> * Take a quick guess at what they might be for the other known  
> compilers.
>
> Then if the code was changed to something like
>
> if [ $SAGE64 = "yes" ] ; then
>    CFLAGS="$CFLAGS $SAGE64_CFLAG"
>    CXXFLAGS="$CXXFLAGS $SAGE64_CXXFLAG"
>    FCFLAGS="$FCFLAGS $SAGE64_FCFLAG"
> fi
>
> it should be relatively easy to port Sage to any platform, as -m64  
> is no
> longer hard-coded into every spkg-install. (Of course, that is not to
> say there might need to be a bit of platform specific stuff in there,
> but it should be rare. Certainly on Solaris, just adding -m64 seems to
> do the trick.
>
> It means the person writing the spkg-install has to write a few extra
> bytes, but would make a port to another platform a *lot* easier, as
> there would be no need to go through 100 spkg-installs, but just  
> ensure
> the correct flags are set once in sage-env, or exported as variables.
>
> At some point in the future, I'd like to try a port to HP-UX and
> possibly AIX. (I have machines capable of running those operating
> systems). I'm trying to think what would make life easier for such
> ports! Certainly -m64 is *not* used on either IBM's compiler on AIX or
> HP's on HP-UX.
>
> Does that seem a logical method?

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.

- Robert


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