building native cross compiler

Michael Zintakis michael.zintakis@googlemail.com
Mon Mar 14 01:30:00 GMT 2011


>> Where do I get these as I did check the gcc web site, but could not
>> find them anywhere (apologies for this daft request!)
>>     
>
> http://sourceware.org/binutils/
>   
Thanks! Downloaded along with mpfr, ppl-0.11.2 (configure said that my 
existing version is "buggy" :-) ) and cloog-ppl-0.15.9.

If I dump mpfr, ppl and cloog-ppl in the main gcc source directory (and 
name those directories like that - "mpfr", "ppl" and "cloog-ppl") would 
that be enough for the GCC build or do I have to compile/install them 
separately?

>>>   However, this only works if the shared directories such as
>>> include and libiberty are exactly matched, which means in practice that
>>> you need to be working with development sources rather than releases, or
>>> you need to understand the code in sufficient detail to address the
>>> conflicts which occur.
>>>   
>>>       
>> OK, if I get binutils and gcc sources I presume if I run diff on both
>> directories for all 3 packages and they match then I am OK and I could
>> then dump all sources in the main gcc source directory and issue make,
>> is that right?
>>     
>
> In principle, yes.
>   
The copy of binutils is for version 2.21, my gcc version is 4.5.2, so I 
will check their corresponding include/ and libiberty directories with 
the ones of the gcc version I have. Quick look tells me that (at least) 
the include directory in binutils is very different (it has a lot of 
subdirectories) from the one in gcc-4.5.2/include.

If I copy binutils sources to the main gcc source directory what would 
be the sign that they are incompatible - the same error as I was getting 
before (line 83 etc)?

>>>> The strange thing is that my host machine GCC already has i686 and
>>>> x86_64 binutils installed (though as a "ready-made" package - I
>>>> haven't compiled this from source so can't vouch for the correctness
>>>> of these packages) and when I attempted to build GCC2 with
>>>> "--target=i686-redhat-linux" it also failed! I know the host GCC on
>>>> that machine works as I also do compilation for boh x86_64 and i686
>>>> arches successfully. Maybe I am missing something else.
>>>>     
>>>>         
>>> Read the FAQ entry I mentioned.
>>>   
>>>       
>> I did and it refers to the three libraries I have (although as sources
>> in the GCC source directory) or have I missed something?
>>     
>
> What do you see in the config.log file?
>   
The same one I was getting with the ppc target - line 83 etc etc.

MZ



More information about the Gcc-help mailing list