Kai Ruottu wrote:
Unclearly told... The right words would have been: "can TRY TO use it
to compile all kind of things
like a Linux kernel and here the 'libgcc' library". It has taken
years since I last compiled a Linux
kernel but I assume it not requiring a 'libgcc' for the target
system. Producing 'libgcc' however needs
the standard C headers for the target Linux system.... The
'include/asm*' and 'include/linux', the
"kernel headers", should be enough when producing a Linux kernel, it
is assumed (by me) to not
require anything from 'libgcc' like "soft-float" routines for a CPU
without a FPU...
Again, when one must guess, googling helps, with search words "libgcc
required in kernel compile"
the first hit was :
http://lkml.indiana.edu/hypermail/linux/kernel/0711.1/0937.html
Generally I myself wouldn't use my time to these "should it or should it
not work" etc. issues but
simply provide something which surely should work, in your case that
"complete GCC" with
some (temporary) glibc, be it then only for a generic Linux/PPC and no
optimal support for
the SPE CPUs.
So:
Adding the '--with-sysroot=$sysroot', where $sysroot is your own choice
for the suitable
place for the target C library ('glibc'), into your binutils and GCC
configures. And then
unpacking the main 'glibc-*.ppc.rpm' and the 'glibc-devel-*.ppc.rpm' or
some '.deb'
equivalents into it :
$sysroot/lib
$sysroot/usr/include
$sysroot/usr/lib
would be a good start in the "build a complete GCC" project. Later when
needing the
optimal 'powerpc-linux-gnuspe' glibc, building it from glibc sources and
installing it into
the same $sysroot would come in question. It would then be ready to be
copied into
the root filesystem on the target platform, the runtimes from it....
Another route when one doesn't want to learn how to build binutils, GCC
and glibc
separately, one at a time, is to try those "scripts for dummies", the
"crosstool*" ones.
AFAIK they will always start from absolute scratch and don't teach
anything about
how one builds these components one at a time, when needing to fix or
update one
of the components....