In order to build a cross-compiler (your GCC2) you must first build a
cross-binutils.
Where do I get these as I did check the gcc web site, but could not find
them anywhere (apologies for this daft request!)
Following from the "Building a cross compiler" section it tells me
that by issuing "make" it "Builds target tools for use by the compiler
such as binutils (bfd, binutils, gas, gprof, ld, and opcodes) if they
have been individually linked or moved into the top level GCC source
tree before configuring." - what does that mean exactly I am unclear?
This refers to a procedure which I do not recommend, as it will lead you
into even deeper complexities. It is a way that experienced GCC
developers speed up the build. You can copy the source directories
bfd/gas/ld/binutils from the binutils into your gcc directory, and then
build both the binutils and gcc at once, rather than doing separate
builds.
Ah! This is exactly what I did with mpc and gmp packages - copied them
into the main gcc source directory (gcc-test/gcc-4.5.2) as this is what
was suggested in the building requirements section. Is that wrong?
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?
I also presume that my 'bubble' error I described in one of my previous
posts has something to do with the fact that I copied gmp and mpc
sources to the main gcc source directory prior to starting the build or
is that not the case (I am guessing here as I do not know what is
causing it really)?
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?
MZ