can CTNG build an x86 (32bits) cross-toolchain on an amd64(64bits) workstation ?

Frederic Roussel fr.frasc@gmail.com
Sat May 15 22:08:00 GMT 2010


Hi,

So I've been doing some experiments that I want to report to you guys.

<disclaimer>
I don't know a whole lot about canadian compilers, so probability that
I will say something stupid is fairly high.
But I'm willing to learn from my mistakes :-)
</disclaimer>

So my .config file has the following values set:
CT_CANADIAN=y
CT_TOOLCHAIN_TYPE="canadian"
CT_HOST="i686-linux-gnu"
CT_HOST_PREFIX=""
CT_HOST_SUFFIX=""

When running ct-ng build, it exits with an error:
[DEBUG]    'x86_64-build_pc-linux-gnu-strip' -> '/usr/bin/strip'
[DEBUG]  ==> Executing: 'chmod 700
/usr/src/CTNG/crosstool-ng/x-tools/arm-sbgcc45-linux-gnueabi/buildtools/x86_64-build_pc-linux-gnu-strip'
[DEBUG]    Missing: 'x86_64-linux-gnu-windres' or
'x86_64-linux-gnu-windres' or 'windres' : not required.
[ERROR]  Missing: 'i686-linux-gnu-ar' or 'i686-linux-gnu-ar' or 'ar' :
either needed!
make: *** [build] Error 1

What I'm understanding is that in the script scripts/crosstool-NG.sh,
in the 'for' loop around ${install_build_tools_for}, it tries to
locate various tools. Of course, it can't find the 32bits versions of
the tools as they have not be compiled, nor installed by other means.

I have the nagging feeling that I am grossly missing something out ...

Any thoughts would be hugely welcome,

thanks all,

--Frederic

On Tue, May 11, 2010 at 8:41 AM, Yann E. MORIN
<yann.morin.1998@anciens.enib.fr> wrote:
> Frederic, All,
>
> On Monday 10 May 2010 21:24:04 Frederic Roussel wrote:
>> I'm back looking at crosstool-ng, and I've noticed all the progress
>> that has been made in a few months of time.
>> Congratulations and many thanks to all, especially to Yann, for
>> releasing a great piece of software!
>
> Cheers! :-)
>
>> I have a question regarding how to use ct-ng on an amd64 machine.
>> I would like to generate a cross-toolchain that will be run on
>> 32bits-x86 machines.
>> That sounds to me like a mild case of canadian cross compiler.
>
> That *is* a canadian cross.
>
>> I am just wondering if there is a way to do that with the current
>> version, or the head of the hg tree.
>
> Yes, as Khem said, set:
>
>  Paths and misc options  --->
>    [*] Try features marked as EXPERIMENTAL
>  Toolchain options  --->
>    Type (Canadian     (EXPERIMENTAL))  --->
>
>> Short of finalizing the canadian support, would you think of a way to
>> generate 32bits x86 on an 64bits amd64 ? something like the use of
>> "-m32" flag
>
> Nope. Just build it as a canadian cross, which it definitely is.
>
> Note however that if you have 'legacy 32-bit support' enabled in your
> kernel, and the 32-bit support libraries installed, then ./configure
> (from gcc and binutils) may believe they are able to run host binaries,
> and that may produce unexpected results.
>
> If it fails (and even if it works!), I'd be interested in earing^Wreading
> the results. If you have time to invetigate failure, I'd be glad for it.
>
> Also, a 32-bit chroot might not do the trick, as the running kernel would
> still be a 64-bit kernel, and thus uname may report x86_64 instead of some
> i?86.
>
> Regards,
> Yann E. MORIN.
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
>
>
>

--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list