[Top][All Lists]

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

Re: How to build GNU toolchain for AMD64?

From: Lionel B
Subject: Re: How to build GNU toolchain for AMD64?
Date: Mon, 23 Jun 2008 08:57:34 +0000 (UTC)
User-agent: Pan/0.132 (Waxed in Black)

On Sun, 22 Jun 2008 05:56:51 -0700, khapi wrote:

> I'm using a Linux distro that doesn't have a 64-bit version, and after
> trying two that do (Ubuntu and Fedora) and seeing how incompatible they
> are with my hardware, I've decided to take a minimalist approach and
> build the toolchain and kernel myself. However, I've run into snags, and
> the information on the Web seems fragmented and dispersed.
> Binutils seem to build without problems:
> mkdir /opt64
> tar zxfv binutils-2.18.tar.gz
> cd binutils-2.18
> ./configure --prefix=/opt64 --target=x86_64-pc-linux-gnu make
> make install
> However gcc builds only the first stage and at the end of that, it
> complains that it cannot create the binary, seemingly because it doesn't
> know the name for it (gcc).
> export CFLAGS='-Dinhibit_libc'
> export PATH=/opt64/bin:$PATH
> tar jxfv gcc-4.3.1.tar.bz2
> cd gcc-4.3.1
> ./configure --prefix=/opt64 --target=x86_64-pc-linux-gnu --enable-
> languages=c --disable-shared --disable-multilib --enable- threads=single
> --build=x86_64-pc-linux-gnu make

FWIW, you should not attempt to build GCC from within the source 
directory: this is highly likely to fail. See:

Quote: "First, we highly recommend that GCC be built into a separate 
directory than the sources which does not reside within the source tree. 
This is how we generally build GCC; building where srcdir == objdir 
should still work, but doesn't get extensive testing; building where 
objdir is a subdirectory of srcdir is unsupported."

Building GCC manually can be pretty non-trivial. A really good RTFM is 

Lionel B

reply via email to

[Prev in Thread] Current Thread [Next in Thread]