If anyone said including our own compiler with Sage is taking the
"batteries included" approach too far, I would NOT disagree with them,

But there do appear to be issues which may be difficult / impossible
to resolve with Sage upgrades using gcc that uses Sage's GMP, MPFR and
MPC (See Leif's comments on this issue).

We could avoid that by shipping our own gcc. I calculate it would add
only 1.6 MB to the bulk of Sage if we used the latest (4.5.1) gcc and
could *reduce* the size of Sage if we used an earlier version.

Given gcc 4.5.1 is 63 MB in size, you might wonder why I calculate
shipping gcc would add <= 1.6 MB.

First we would not need the Java or Objective C front ends, so there's
no need to include the full gcc release.  So we would add a package
which includes only:

 * gcc core (27 MB)
 * C++ front end (6.2 MB)
 * Fortran front end (1.4 MB)

Then we REMOVE the Fortran binaries, which are only needed on OS X.
These take up 33 MB.

sage: 27+6.2+1.4-33
1.60000000000000
sage:


Pros:
* No worries about gcc finding the wrong libraries during upgrades, as
it would use those in $SAGE_LOCAL/lib
* We would know what version of gcc people would using, so would not
have to contend with gcc-specific bugs.
* Building on Solaris would be a lot easier, as nobody would need to
install a recent gcc.
* We could remove the code in bits of Sage that checks if g95 or gcc
is used, since we know gcc would be used.
* We could remove the code in ATLAS (and perhaps elsewhere) which
tests if g95 or gfortran are used.
* We could forget about setting SAGE_FORTRAN and SAGE_FORTRAN_LIB
variables as they would be unneeded.
* If instead of using the latest gcc, we used an earlier version, we
would undoubtedly make the compiler package smaller than the Fortran
binaries we remove.


Cons:
 * It would make Sage 1.6 MB larger
 * It would slow builds on any system where the Sage gcc was used in
preference to a system one.


It would be sensible to add a bit of code that allows one to use the
system compilers.

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