- To: "Jonathan Wakely" <jwakely.gcc@xxxxxxxxx>
- Subject: RE: help needed for builing gcc tool-chain
- From: "Prashant Batra (prbatra)" <prbatra@xxxxxxxxx>
- Date: Sun, 12 Feb 2012 00:47:02 +0530
- Cc: <gcc-help@xxxxxxxxxxx>
- Comment: DKIM? See http://www.dkim.org
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1329592666; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-class:Subject:Date:Message-ID:In-Reply-To:References: From:To:Cc:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=8minWL6 gc9zuylANwhi71JVOqlc=; b=r4r+DXP2hdR0eDv9oqbsyGpC407E9xBlr/vNcdc c5Yb7w2GPcEILikMQvNrZLkJhIEtfcOr7Ghj/lEYspYqR3IoXL8G1fqPLuscig2j cULzMaSBqpOi4ThIAkNGHMgsqp7DTtwH+ItJxE1FI8DilRUrzImsrnvphJlDQu2S w2rs=
- In-reply-to: <CAH6eHdSt=2MLWy7QS4ty6yyKKurz8q+UqaEiW48FAEYLNTWw2g@mail.gmail.com>
Thanks, Jonathan,
I am able to install gcc 4.1.2 with following configuration:
../gcc-4.1.2/configure --prefix=/auto/nobackup-bgl-mitg-dev56/prbatra/fresh/build/ --enable-languages=c,c++,objc
Now, the tool-chain is present in "prefix" directory.
In second try, to make the tool-chain relocatable, I used --with-sysroot=<prefix-dir> while configuring.
It fails saying /usr/include directory is not present in the <prefix-dir>.
Have I missed something again?
-----Original Message-----
From: Jonathan Wakely [mailto:jwakely.gcc@xxxxxxxxx]
Sent: Saturday, February 11, 2012 11:21 PM
To: Prashant Batra (prbatra)
Cc: gcc-help@xxxxxxxxxxx
Subject: Re: help needed for builing gcc tool-chain
On 11 February 2012 17:03, Prashant Batra (prbatra) wrote:
> Hi All,
>
> I am trying to build a 32 bit gcc/g++ tool-chain on a x86_64 bit Intel machine with, Red Hat Linux Enterprise -5 (2.6.18 kernel).
>
> Gcc version of my machine is -
> gcc -v
> Using built-in specs.
> Target: x86_64-redhat-linux
> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux
> Thread model: posix
> gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)
>
> I tried with the procedure mentioned on gnu wiki, also mentioned in LFS. But none of the attempts was successful.
>
> I have some basic questions here :
>
> Changing the prefix to some custom location other than /usr/src
I think the default is /usr/local/, not /usr/src
> should make all the tools installed in the custom location?
Yes
> I want to run the tool chain on this machine only, so my host and build systems are same, and I can omit them while configuring all my tools (binutils, gcc, glibc).
> Is this correct?
Yes.
> The target of all these tools while configuring should be i486-gnu-linux or I can omit this so that the gcc/g++ gets compiled for x86_64 and when I need a 32 bit executable,
> I can use -m32 switch while compiling?
You can compile with -m32 to produce 32-bit output and you could add
-march=i486 to ensure it will not use any instructions not available
on an i486 processor. But if you want a compiler that always
produces 32-bit output then yes, you could configure with
--target=i486-gnu-linux instead.
> Will 32 bit static and shared libraries be available in this case?
Yes.
> I want static libraries for both gcc and stdc++, is there any special flag that I should give/or not give to build these static libraries?
No, they're built by default.
> Can someone please point me in right directions, as I am doing this for the first time? Any links to the steps will be really helpful.
I already gave you http://gcc.gnu.org/wiki/InstallingGCC - if that
doesn't work you need to say how you configured and what errors you
get, it should work fine. It will help if you stop creating a new
thread for every mail and reply to mail in an existing thread, so we
can see the thread history more easily.
[Linux C Programming]
[Linux Kernel]
[eCos]
[Fedora Development]
[Fedora Announce]
[Autoconf]
[The DWARVES Debugging Tools]
[Yosemite Campsites]
[Yosemite News]
[Linux GCC]