64 bit & irix
jrvalverde at cnb.uam.es
jrvalverde at cnb.uam.es
Fri Feb 9 12:41:37 UTC 2001
So, I finally had time to take a look at the configure script.
It already contains a check for 64 bit irix compilation, and,
when correctly used, generates the correct compilation scripts
and makefiles. The problem is that it checks whether 64-bit is
enabled _by default_, not whether it is available or has been
user-selected.
What ./configure does is create a trivial C file, compile it
and check whether it is -o32, -n32 or -64, and then decide
which compiler to use.
Now, there is a simpler trick than the one I proposed: it all
reduces to making the compiler/linker use the appropriate
defaults _before_ running configure. For this:
- remove gcc from your path
- create a compiler.defaults file containing
-DEFAULT:abi=64:isa=mips4:proc=r10k
- define COMPILER_DEFAULTS_PATH
setenv COMPILER_DEFAULTS_PATH `pwd`
- run configure
And that's it.
Defining cc to be 'cc -64' and ld to be 'ld -64' and running
configure dosn't work. In that case, the linker used is still
the -n32 linker, and build fails with linking errors. You
need to go the obscure trick way.
One reason is configure hard codes the 'default' compilation
method (which being default, it shouldn't need to) for the
linker. Hence although if one aliases 'cc/gcc' to 64bit,
it will still hardcode ld to be the default 'ld -32'. Should
it just use "cc/gcc" and "ld" only, this wouldn't happen as
defaults would be carried all along, this way the explicit
flag overrides the aliases. So unless you get the explicit
flags right by using the above trick, it won't work.
BTW, this mess seems to happen (from what I gather looking at
./configure) only on IRIX. Makes sense, since that's probably
the only system too that tries to maintain three incompatible
binary systems defaulting compilation to 32 bits in 64 bit
machines (sigh).
On a side note: it won't work for gcc: the -64 test in configure
is only used if the compiler is 'cc'. No check for --mabi=64
seems to be present. For gcc I suspect one will need to run
./configure and then substitute all instances of 'gcc' by
'gcc --mabi=64' and of 'ld -n32' by 'ld -64'. Haven't tested
though. Or configure as above with system cc and later alias
cc to gcc --mabi=64.
BTW, David, might you update the trick you added to the admin
guide? Thanks.
j
More information about the emboss-dev
mailing list