#10303: clean up sage-check-64 and use of SAGE64
--------------------------------------------+-------------------------------
Reporter: jhpalmieri | Owner: GeorgSWeber
Type: defect | Status: positive_review
Priority: minor | Milestone: sage-4.6.1
Component: build | Keywords: 64
Author: John Palmieri | Upstream: N/A
Reviewer: David Kirkby, Leif Leonhardy | Merged:
Work_issues: |
--------------------------------------------+-------------------------------
Comment(by leif):
Replying to [comment:35 drkirkby]:
> The variable name {{{SAGE64}}} implies absolutely '''nothing''' about
the operating system,
Hence it should be named `SAGE_FORCE_64_BIT_BUILD`.
Note that it used to, and you're right in the sense that its
''documentation'' has now (actually recently) changed, but that doesn't
really reflect the current situation in Sage. (It will hopefully in the
future, but currently it's a "should" rather than "is", for developers
rather than users.)
[[BR]]
> so I don't see any reason it should behave any differently on different
operating systems.
Its only (intended) use is to force 64-bit builds (on '''operating
systems''' ''that default to 32-bit'', and therefore doesn't make sense on
others, while it should ''in principle'' do no harm there either, or more
precisely it shouldn't have ''any'' effect there).
> As John said, nobody on sage-devel objected to this either.
I haven't followed that thread, but in general that doesn't mean much to
me. How many people did read the thread? Two people besides you two
posted; William just noted that `SAGE64` was introduced solely for MacOS
X, with '''no impact''' on anything else. (Of course that wasn't a very
good decision, since lots of code had to be changed for Solaris in
essentially the same manner again.)
May I cite Peter's statement?
''Generically adding '-m64' when SAGE64 is set is definitely wrong
because
not all compilers will support that flag. In addition, gcc treats x86
and x86_64 as different variants of the one architecture - so gcc on a
32-bit platform can compile x86_64 code. On 32-bit x86 Linux and *BSD,
using '-m64' will cause gcc to build x86_64 code - which the kernel
won't
be able to execute - so this is highly undesirable.''
''Ideally, all skpg files should inherit {C,CPP,CXX,FC,LD}FLAGS from the
environment (adding spkg-specific options if required). This would
allow SAGE64 to be processed in one spot fairly early on in the build
-- adding '-m64' or equivalent to {C,FCC,FC,LD}FLAGS, which is then
inherited by all succeeding spkg builds. This would remove a lot of
special-casing from the build.''
If all spkgs really contained just what John posted,
{{{
#!sh
f [ -z $CFLAG64 ] ; then
CFLAG64=-m64
fi
if [ "x$SAGE64" = xyes ]; then
echo "64 bit build of cddlib"
CFLAGS="$CFLAGS $CFLAG64"; export CFLAGS
fi
}}}
(which definitely '''isn't''' the case, so also the thread didn't really
address the issue), the situation would be different, and as Peter noted,
we could easily move that code snippet into e.g. `sage-env`, as well as
others by the way.
Other aspects we discussed here weren't discussed there at all.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10303#comment:37>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.