<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body dir="ltr" bgcolor="#ffffff" text="#000000">
<p style="margin-bottom: 0cm; margin-top: 0pt;">Dan Shimshoni wrote:<br>
</p>
<blockquote
cite="mid:2d2a24500907140127p6f640d94u36fdc060e801d015@mail.gmail.com"
type="cite">
<pre wrap="">
For that I need to build a 32 bit gcc compiler on the x86_64 machine
(cross compiler).
There are various tools for buildings such a cross compiler. One is
Dan Kegel tool: <a class="moz-txt-link-freetext" href="http://kegel.com/crosstool/">http://kegel.com/crosstool/</a>
Another tool is Cross-Compiled Linux From Scratch:
<a class="moz-txt-link-freetext" href="http://cross-lfs.org/view/1.1.0/x86_64/introduction/chapter.html">http://cross-lfs.org/view/1.1.0/x86_64/introduction/chapter.html</a>
I want to add that "make ARCH=i686" (on the 64 bit machine) gave me errors
(and also trying to passing various gcc 32 bit arch flags ).
It seems to me that both these tools are more complicated then needed.
</pre>
</blockquote>
That's because you don't appreciate the complexity of the task :-)<br>
<br>
But you are right, there is a better way to build cross compilers -
crosstool-ng (<a class="moz-txt-link-freetext" href="http://ymorin.is-a-geek.org/dokuwiki/projects/crosstool">http://ymorin.is-a-geek.org/dokuwiki/projects/crosstool</a>)<br>
<br>
Using it building a cross compiler is simple as:<br>
<br>
<pre class="code">hg clone <a class="moz-txt-link-freetext" href="http://ymorin.is-a-geek.org/hg/">http://ymorin.is-a-geek.org/hg/</a><span
class="search_hit">crosstool-ng
</span>./configure
make
make install
cd /your/development/directory
ct-ng help
ct-ng menuconfig
ct-ng build
</pre>
Gilad<br>
<br>
<br>
<br>
<pre class="moz-signature" cols="72">--
Gilad Ben-Yossef
Chief Coffee Drinker & CTO
Codefidence Ltd.
Web: <a class="moz-txt-link-freetext" href="http://codefidence.com">http://codefidence.com</a>
Cell: +972-52-8260388
Tel: +972-8-9316883 ext. 201
Fax: +972-8-9316884
Email: <a class="moz-txt-link-abbreviated" href="mailto:gilad@codefidence.com">gilad@codefidence.com</a>
Check out our Open Source technology and training blog - <a class="moz-txt-link-freetext" href="http://tuxology.net">http://tuxology.net</a>
        "Now the world has gone to bed
         Darkness won't engulf my head
         I can see by infra-red
         How I hate the night."
</pre>
</body>
</html>