Solar wrote:
This whole Canadian Cross stuff gives me headaches. :-\ ;D
It took me 3 weeks to get a compiling version, can't say it's easy
I got the thing with dynamic linking right now (I think), but the static linking still confuses me.
The instruction set doesn't matter for static vs. dynamic linking, or does it? I mean, the executable itself (statically linked or not) is fully dependent on the instruction set, and can only be run on a CPU with that instruction set.
No, that's not the principal difference. The most obvious difference _is_ in place, if somebody decided to speed up his/her computer by compiling glibc or stdlib or whatever with -march=pentium4, then linking to those files will produce a p4-only executable no matter what options you specify otherwise. That's what the problem is with static linking on a fake canadian cross. Doing so on a true canadian cross will link with the recompiled glibc so that's no problem.
My entire point with the fake cross is that it's a lot easier to do (no sh*tload of compiling) but that it's heavily limited, and this is one of the points where it fails to be completely as flexible.
How could an executable be moved to a different machine just because it's linked dynamically? ???
Because it then links to the other computers libraries, which are made for that computer. If you do not link it dynamically, you limit it to the subset of computers that can run both the libc and the executable itself. If either is "optimized" for ppro or higher, I couldn't run it. Since I can control one, but not the other, don't include the other to make it copyable to all computers that fit your destination.
Hum... you could do with some trickery. Look up GCC configure options like --with-as=... and see if they might help. (I'm still fuzzy about this.)
That's not the problem. Still, I think that if you move the libraries elsewhere and tell LD to look in those dirs *FIRST* it'd work too. If it found the default dirs first however, you'd be screwed.