15.3.2014 7:49, Sam Hansen kirjoitti:
I am attempting to compile gcc, configured as a cross compiler. I
explicitly do not have libgmp, libmpfr, or libmpc installed on my
system. The documentation at http://gcc.gnu.org/wiki/InstallingGCC
indicates that I may compile these libraries as part of the gcc
compilation process overall.
Yes, they will be automatically built and the GCC executables (xgcc,
cc1,...) will
be linked against these libraries. They will be done for the HOST
system, not
for the TARGET (here 'avr') system.
...
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[1]: *** [configure-target-libgcc] Error 1
make[1]: Leaving directory `/home/sam/objdir'
make: *** [all] Error 2
Meanwhile 'libgcc' is a library made for the TARGET system. And made
with the
just built GCC executables. So you couldn't get this far if there was
any problem
with the gmp, mpfr and mpc libraries!
The error is logged in objdir/avr/libgcc/config.log.
So you should look at this file!
I understand
this indicates that the prerequisite libraries weren't set up
correctly prior to the compilation?
Yes, the not-told prerequisite is the "target C library" being
installed! In a native
build this prerequisite is obviously set up otherwise one couldn't
compile anything,
the target headers are required in compiling, and couldn't link
anything, the target
library binaries are required... Generally when something will be
compiled one must
have headers to use and when linking one must have library binaries to
use! When
configuring 'libgcc' it is possible that some link tests are used in
order to see what
functions the base target C library has or how these functions do
behave... So for a
cross compiler the target C library being preinstalled is just as
natural prerequisite
as it is for a native compiler! The exception is when one uses
'newlib', then only the
target headers are needed during the build. And not even them if
'--without-headers'
is used...
I think that for AVR there is some "custom" C library, used in the
'avrgcc' release. Or
one can use the free 'newlib' as that target C library, building it at
the same time with
'gcc', 'gmp', 'mpfr' and 'mpc' for the HOST and 'libgcc', 'libstdc++'
etc for the TARGET.
In the latter case using '--with-newlib' in the GCC configure.
The 'fixincludes' phase in the GCC build also requires the target C
headers to be available
for 'fixing' them. Every GCC builder surely sees this phase happening
and should then
think what on earth it does. Some docs for it can be seen in the net like :
http://ewontfix.com/12/