On Mon, Jun 14, 2010 at 9:11 AM, Dr. David Kirkby <david.kir...@onetel.net> wrote: > On 06/14/10 04:28 PM, William Stein wrote: >> >> On Mon, Jun 14, 2010 at 3:49 AM, Dr. David Kirkby > >>> Hence I'd propose that any attempt to set CC, CXX, FC, or F77 caused the >>> build to exit with a warning. Then allow an environment variable like >>> >>> SAGE_ALLOW_SETTING_OF_COMPILERS >>> >>> (better name?) >>> >>> that will allow someone to do this, if they really want to. > > The same is true really of CP, CHMOD and several other variables. They work >>> >>> in some parts of Sage, and not in others. >>> >>> Dave >> >> Another possibility might be that if the Sage build system starts and >> the environment variable >> CC is defined, then a command "gcc" that runs whatever is specified in >> CC is created and >> put first in the path. Then: >> >> (1) any build scripts that still annoying look for gcc will instead >> find this fake gcc wrapper and use it, hence calling CC. >> >> (2) We can also make it so this fake gcc wrapper logs whenever it >> is called, and hence easily nail down which packages are offendors. >> >> The same can be done with all the other variables you mentioned. >> >> -- William > > I don't like the fake gcc idea myself. Currently when the fake gcc is run, > it obscures what flags are being passed to the compiler - the same with the > sage_fortran. > > We already have one fake gcc, so then we need another one which logs data.
I'm unaware of this current fake gcc. Where is it? Who added it? What does it do? Thanks for letting me know about it. It's clear you won't implement a fake gcc/g++, etc. that would make it much easier to track down the problems with components calling GCC when they don't, so I won't try to convince you that this is the best thing to do. -- William > IMHO, a simple warning is better. That leaves any messing around with logs > in the hands of the developer who is trying to sort out the problems with > the variables. He might prefer to abort at that point, rather than log data > data. If you tried to link object files created from C++ code from the Sun > and GNU compilers, it would certainly end in disaster, to aborting is > probably safest. > > BTW, do we really need a sage_fortran any more? I believe at one point the > reason was there was the possibility of the compiler being g95 or gfortran, > but I believe that is dropped now, and only gfortran will be used. So why > not call gfortran directly? > > 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 > -- William Stein Professor of Mathematics University of Washington http://wstein.org -- 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