Re: how to enable -m64 on x86-linux for building ATLAS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2008/4/5, Brian Dessent <brian@xxxxxxxxxxx>:
> Dennis Wassel wrote:
>
>  > I've been trying to compile the ATLAS library on an 32-bit Linux
>  > system with my self-compiled gcc 4.3.0, but this fails.
>  > It boils down to the ATLAS config utility noticing that I have a
>  > 64-bit processor and trying to compile some low-level stuff with -m64,
>  > which doesn't work because I have not compiled in 64-bit support. [I
>  > could force 32-bit mode, but I feel that 64-bit mode surely improves
>  > performance, which is what ATLAS is for in the first place]
>
>
> You could build a cross compiler, but what would be the point?  You're
>  running a 32 bit operating system which means you can't run 64 bit
>  binaries, even if you have a processor capable of doing so.  The
>  resulting output would be totally useless.  As Andrew said it only works
>  in the other direction.
>
>  It is also possible to build a native gcc that supports -m64 on a 32 bit
>  host.  To do so requires first installing the 64 bit libc headers and
>  libraries in the appropriate places (normally done through your distro's
>  package manager) as well as an x86_64 binutils in the same prefix and
>  then using --enable-targets=all when configuring.  If you're not root
>  this will likely be impossible since you can't write to /usr/lib64 or
>  whatever, so you'll have to go with the cross-compiler method.  But
>  again, simply switching to a 64 bit operating system is what is actually
>  required here since then gcc will generate 64 bit binaries by default,
>  and you'll actually be able to run the resulting binary.
>
>
>  Brian
>

I've had a feeling that a cross-compiler is what I need -- you confirm
that, thanks a lot!
What strikes me about this is the fact that ATLAS' configure (all by
itself, no options given) thinks that using -m64 on a 32-bit system
might be a good idea (not to actually link something executable,
probably just some low-level assembler-ish stuff, no clue), since I'm
using a 64-bit compiler - am I up to something here, or do you think
it's just One Of Those Things?

Dennis

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux