"building binutils for target" question

Michael Zintakis michael.zintakis@googlemail.com
Fri Mar 25 15:35:00 GMT 2011


Yann,


Many thanks for the prompt reply on this. I also take the opportunity to 
thank you for the absolute fantastic tool you have created - it is just 
brilliant and although I wouldn't say I built my toolchain without any 
hitches, it, however, saved me a *lot* of long fruitless hours of hard 
labour!!! Once again, a truly superb piece of work, thank you!


>> At the end of the process binutils for the target architecture 
>> (build=x86_64, host=target=powerpc) were also successfully "installed", 
>> though I cannot find any of them, apart from the shared objects which 
>> are all in sysroot! Executables like "ar", "ld" etc which should have 
>> been compiled and installed to run on the target system (powerpc) cannot 
>> be found anywhere (only those for the host arch are present). Am I 
>> missing a trick here or do I have to compile and install another set of 
>> binutils from source for my target image?
>>     
>
> The binutils for target will only build some of the binutils libraries.
> They are needed to build stuff like oprofile, and have to match the
> version of binutils used for in the toolchain. That's why there is the
> option.
>   
In other words the "binutils for the target" are for sole use by the 
toolchain and nothing more, right? If so, that's fair enough, I just 
wanted to be clear on this.

Do you envisage any problems if I try to build and install a copy of 
binutils for the target in my image root (build=x86_64, 
host=target=powerpc) using the cross compiler built by the toolchain? 
Would that be a problem do you think?

> To build the complete binutils to run on the target (eg. ar, ld...)
> means to build a cross-native toolchain, which is not currently
> supported by crostool-NG ( although I'm working on it, but there's
> only 24h in a day! ).
>   
No, no! I am happy with the "cross" build as it is. I am also happy to 
do one additional step and build binutils for the target - I am going to 
use the cross compiler from the toolchain to build *all* of the software 
for the target system anyway (including the kernel, another gcc etc) so 
one additional step won't make a huge difference.

>> As part of building the final image I also need to install GCC (which 
>> would only be run on the target arch, i.e. build=x86_64, 
>> host=target=powerpc) hence why I need all binutils executables (like ar, 
>> ld etc) also installed in that target.
>>     
>
> As said above, not currently supported. Sorry... :-/
>   
No problem!

One additional query - ct-ng starts with installing the kernel headers 
and by what I looked at they are in sysroot.

For my target machine I also need to install the same kernel (although 
for different architecture which is the same arch as my files in 
toolchain's sysroot), so do I have to explicitly execute "make 
install_headers" for the target image sysroot or is there any trick I 
could use to "copy" the headers already installed in the toolchain's 
sysroot? Would that be enough?


MZ

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



More information about the crossgcc mailing list