Building Tools From Source

Ralf Corsepius ralf.corsepius at rtems.org
Thu Sep 20 17:25:10 UTC 2012


On 09/20/2012 05:54 PM, Gedare Bloom wrote:
> configure gcc using --with-gmp --with-mpfr --with-mpc, and softlink
> gmp/ mpfr/ and mpc/ inside the gcc source tree pointing to the sources
> for gmp, mpfr, and mpc (kind of like you should do with newlib).

Not quite - You're mixing up several things:

* --with-... are supposed to point to installed binaries of these 
libraries in case of having installed them to non-standard (== outside 
of GCC's built-in search paths) directories

* The symlinks are a way to build these libraries from source while 
building GCC. This means static linking and therefore is not necessarily 
a good idea.


> On Thu, Sep 20, 2012 at 9:48 AM, Binkowski, Cassio <cassioiks at gmail.com> wrote:
>> Hi all
>>
>> I'm trying to build tools from source to get it running in MacOS and I'm
>> following the steps listed in the following link:
>>
>> http://wiki.rtems.org/wiki/index.php/Building_Tools
>>
>> Although it is not mentioned that we're supposed to configure GMP, MPC, and
>> MPFR, I'm running the standard configure for these tools.
>>
>> When I'm trying to build GCC with the configure options, found in the above
>> mentioned Wiki link, the following happens:
>>
>> it finds gmp.h
>> it finds mpc.h
>> it finds mpfr.h
>> Determine whether libraries are in the correct version ----> no

>> Checking the config.log file I could see that the libraries were not built
>> for the same architecture GCC is trying to link, which is x86_64 by the way.

== Defective installation.

>> Has anyone ever done this before and have an insight on what I could do to
>> get it working?

There are many ways to do so.

The easieset way is to install these libraries, for the correct 
architecture to the right directories, in a standard GCC search directory.



>> Perhaps the issue is when I'm trying to configure GMP, MPC and MPFR, and
>> it's all just a matter of getting the configure options right. What do you
>> guys think?

Configuring these is the standard GNU building scheme

./configure --prefix=<whatever> --libdir=<whatever> CFLAGS=<whatever>
make
make install

The secret behind all this is knowing the right directories and the 
correct CFLAGS. As I am not using this evil empire's products, I can't 
help you, here.


Ralf





More information about the users mailing list