I'm having a go at getting a working toolchain setup for building tcz extensions under picore11. But I find myself stuck in a dependency loop. I tried a couple of things (see below) to no avail.
Help appreciated, as are pointers to other sources of info I may have missed.
The 'problem': there's a limited set tcz's under picore11, and I'm missing a couple to to be able to load compiletc. For example mpfr is missing. Compiling mpfr on picore11 is not possible, as gcc needs libmpfr.
Approach #1: borrow and install mpfr.tcz from the 9.x repository on a 11.x box. Result:
tc@box:~$ cat dummy.c ; gcc dummy.c
int main(){}
/usr/local/bin/ld: /usr/local/libexec/gcc/armv7l-unknown-linux-gnueabihf/9.2.0/liblto_plugin.so: error loading plugin: /lib/libpthread.so.0: symbol __twalk_r version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference
collect2: error: ld returned 1 exit status
I do not understand that error message (as in: I lack the knowledge to interpret what that means). My guess is: I can't use the 9.x mpfr on 11.x as it was built for/against a different set of libraries / with different settings.
Approach #2: use the mpfr.build script to compile and create tcz's. I've done that on a 9.x box with the 4.0.2 sources. This creates a libmpfr.so.6 but gcc on 11.x wants libmpfr.so.4. Trying to trick this with a symbolic link doesn't work.
So a couple of questions from me at this point:
1. How do I get to a functional build toolchain on picore11?
2. Should I do approach #2, with an older version of mpfr? (Surely that just recreates the 9.x extension?)
3. How does one in general approach this situation (build stuff for a 'newer' target on an existing host/build). How do I prevent dependencies in newly built packages (e.g. picore11 tcz's) on the used build system (e.g. picore9).
4. Do I need to go down the route of 'cross compiling' even though the hardware is the same? Seems overkill?
5. Is an approach like linux from scratch needed? I.e.: build a 'clean' and 'independent' toolchain, based on the 11.x sources. Seems like overkill?
If there is guidance elsewhere on this subject, I'm very open to reading suggestions!