On 2010-Nov-20 19:09:00 -0800, John H Palmieri <jhpalmier...@gmail.com> wrote: >Is that the compiler flag "-m64" has no effect on other systems? Some >spkg-install files just check whether SAGE64 is set, not the platform, >and then they add -m64 to the flags. So if that does anything on >linux, then SAGE64 can be used on linux.
'-m64' is recognized by gcc and the SunPRO compilers. It's not recognized by the HP Tru64 C compiler (which is natively 64-bit). I can't comment on any other compilers. 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. -- Peter Jeremy
pgpNoVrLZRXce.pgp
Description: PGP signature