On 29 Okt., 06:37, Peter Jeremy <peterjer...@acm.org> wrote: > On 2010-Oct-28 02:31:19 -0700, Volker Braun <vbraun.n...@gmail.com> wrote: > > >Making every 3rd party author adhere to the standard usage of CC/CXX > >is a bit like herding cats. It would be the cleanest fix to patch all > >the different build systems, sure. But wouldn't it be easier if Sage > >would set up its own gcc wrapper in $SAGE_LOCAL/bin? The first step of > >the Sage build process would then be to determine which architecture > >and compiler one wants to use set up the wrapper accordingly. Then you > >needn't have every spkg kludge around OSX 64bit brokenness, make sure > >that it calls the right linker on Solaris, ... > > For the FreeBSD port, I just create symlinks for g++, gcc, gfortran > and make in $SAGE_LOCAL/bin - I felt this was the easiest way out of > the hard-wired name morass.
Simple, but hopefully won't be necessary in the (near?) future... ;-) The use of CFLAGS, CPPFLAGS and CXXFLAGS etc. (FC, F77, FFLAGS, LDFLAGS) is another issue... > (The 'make' symlink is needed because > 'make' on *BSD is pmake, not GNU make - which is installed as gmake). I much more hate this one; tons of scripts ignore a user might want to set MAKE to something else than "make" (or "make -jN"); partially MAKEFLAGS are *cleared* to "fully disable" parallel makes, which doesn't work for e.g. MAKE="make -j" (like setting MAKE="make" doesn't without modifying MAKEFLAGS). I'd really like to use "-n", "-i", "-k" etc., too, but the above scheme totally ignores one might want that. (I see no reason for having to set "SAGE_PARALLEL_SPKG_BUILD=yes" either; if one doesn't, MAKE will be [re]set to "make".) Like for other things duplicated in many spkg-install scripts, it would perhaps be best to provide functions to dis- and enable parallel makes in e.g. sage-env, or another file to be sourced. (Also, Sage's configure could do more, like e.g. defining EGREP, setting GREP to a POSIX-conformant one, etc.) For the "hard-coded CC in Makefile" issue, one could at least *try* to use "${MAKE} -e" (which gives environment settings precedence over definitions (with "=") in the Makefile, without having to modify / patch it), though this might cause other weird side-effects unless one also carefully unsets variables whose values assigned in the Makefile should not get overridden. Running ${MAKE} CC="${CC}" ... is perhaps a safer way to achieve the same. > That just leaves problems with people assuming /bin/sh is bash (last > I checked, there were still a few of these). Please open (a) ticket(s) for these; we've meanwhile removed many I think... -Leif -- 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