The revamped tool is called crosstool-ng and is available from here:
http://ymorin.is-a-geek.org/projects/crosstool
Last night, after about 11 hours non-stop on it, I tasted success at last!!!
The culprit seems to be the version of gcc I have used up until now -
gcc 4.5.2. This version seems to be not so well supported by this tool
judging by the number of patches it had (yes, I know :-) !) and as soon
as I switched to gcc 4.4.5 and made a few other tweaks the build was
completed.
I was able to optimise the process as much as I could and found out that
gcc 4.4.5 is having difficulty talking to ppl 0.11+ - there was a
hard-coded check for the ppl version in gcc configure/configure.ac
(something like "PPL_MINOR_VERSION != $ppl_version") which at first
appeared to be completely wrong (and something I patched immediately to
"PPL_MINOR_VERSION < $ppl_version" to accept versions 0.11 and above),
but then the build failed as I was getting "undefined reference" errors
like these:
/home/mz/gcc-test/build/powerpc-unknown-linux-gnu/build/static/lib/libppl_c.a(ppl_c_implementation_common.o):
In function `Parma_Polyhedra_Library::Interfaces::C::reset_timeout()':
ppl_c_implementation_common.cc:(.text+0x771): undefined reference to
`Parma_Watchdog_Library::Watchdog::in_critical_section'
ppl_c_implementation_common.cc:(.text+0x777): undefined reference to
`Parma_Watchdog_Library::Watchdog::remove_watchdog_event(Parma_Watchdog_Library::EList_Iterator<Parma_Watchdog_Library::Pending_Element<Parma_Watchdog_Library::Time>
>)'
[...]
So, I had to use ppl version 0.10.2, otherwise gcc 4.4.5 won't be
compiled. From what I had time to test I found that the optimum
'combination' of packages for cross-compilation (at least in my case
anyway) is gmp 5.0.1, mpfr 3.0.1, mpc 0.9, cloog 0.15.10, ppl 0.10.2,
binutils 2.20.1, glibc 2.13 + ports.
Special mention needs to be done for the MPFR package - there is a
patch, which is applied to gcc 4.5.x (but that patch is not done for
previous gcc releases - like 4.4.5 for example) which enables it to use
MPFR version 3.0 and above. If that patch is not applied I am stuck with
MPFR 2.4.2, so I had to apply this to the earlier version of gcc I was
using. I do not know who maintains gcc, but it is nice to have it
submitted and "propagated" for earlier gcc versions to allow the above
package to be used.
I tried to create executables using the new toolchain (simple programs,
just to test the functionality - nothing complex) - it works, but when I
apply "file" on these executables, it gives me some information I cannot
quite understand. For example:
[mz@test1 install]$ file nano
nano: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1
(SYSV), dynamically linked (uses shared libs), stripped
[mz@test1 install]$ file fractal_simple
fractal_simple: ELF 32-bit MSB executable, PowerPC or cisco 4500,
version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux
2.6.35, with unknown capability 0x41000000 = 0x13676e75, with unknown
capability 0x10000 = 0xb0401, stripped
In the above, "nano" is the famous screen editor, stock-compiled for my
system (PPC - G2/603e CPU) and "file" detects it, though for my program
(fractal_simple) although it lists the same system it has two "unknown
capability" fields which I am not certain what that means. Any ideas
what these are?
Finally, is there a way to remove the 'dependency' on the kernel version
("GNU/Linux 2.6.35" in the above example)? Many thanks in advance!