[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem when a 32-bit library is linked instead of a 64-bit library
From: |
Paul Eggert |
Subject: |
Re: Problem when a 32-bit library is linked instead of a 64-bit library |
Date: |
Mon, 12 Jul 2010 09:36:55 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10) Gecko/20100527 Thunderbird/3.0.5 |
On 07/12/10 04:31, Dr. David Kirkby wrote:
> I know the following method works in some cases
>
> export CLFAGS=-m64
> export LDFLAGS=-m64
> ./configure
>
> other times (e.g. Python, Singular), one needs to define CC to be "gcc
> -m64".
Normally "configure" just uses the first compiler in your path,
preferring gcc to cc if it works. If you want to use a compiler
in a non-default configuration (say, 64-bit), you need
to tell "configure" about it with something like this:
configure CC='gcc -m64 -L/usr/local/lib64 -R/usr/local/lib64'
using whatever options are needed on your platform to ensure that
64-bit libraries are linked from the correct location, both at
compile-time and at run-time. This sort of approach is more
reliable than the CFLAGS / LDFLAGS stuff, since it handles
more-oddball problems better, for example, when a file is
preprocessed rather than compiled to a .o file and so
CFLAGS is not used.