Well this turned out to be a nightmare. Just when I put a tick on xgcc stuff as done. Not so much. I built these....where each (except generic) is built against the kernel/gcc/glibc of the base OS for that target. The compiled app will run on that target without LD_LIBRARY_PATH shenanigans.
The nightmare being "sysroot". Turned out none of the above honoured it. Pass "--sysroot=blah" and it would be ignored right through until the linker. All the stuff out there on google is wrong, if it can even be found amongst the noise.
I guessed I had to pass "--with-sysroot" to my build to activate it. Correct. Proving it took days, mostly having given up on google. Even gcc docs are wrong. You view cross-compilers (gcc -v) emitting "--with-sysroot=/" but I can't get one to build that way. Maybe those are chroot'd.
Due to the random nature of binutils/kernel/gcc/glibc it's not viable to patch the sources. Atm I patch the linker scripts before the final gcc phase. I'd like to know what generates those (eg: libc.so). It writes full paths. I have to patch relative to sysroot. Maybe there's a knob I can twiddle?
Tangent:
Proprietary code used to underlie my scripts. No longer the case. Consequently I'm moving forward on a github presence. I already know I hate *.md files.![Wink ;-)]()
Code:
/usr/local/RPI/arm-linux-gnueabihf/buster/usr/local/RPI/arm-linux-gnueabihf/generic/usr/local/RPI/arm-linux-gnueabihf/bookworm/usr/local/RPI/arm-linux-gnueabihf/jessie/usr/local/RPI/arm-linux-gnueabihf/bullseye/usr/local/RPI/aarch64-linux-gnu/buster/usr/local/RPI/aarch64-linux-gnu/generic/usr/local/RPI/aarch64-linux-gnu/bookworm/usr/local/RPI/aarch64-linux-gnu/bullseyeThe nightmare being "sysroot". Turned out none of the above honoured it. Pass "--sysroot=blah" and it would be ignored right through until the linker. All the stuff out there on google is wrong, if it can even be found amongst the noise.
I guessed I had to pass "--with-sysroot" to my build to activate it. Correct. Proving it took days, mostly having given up on google. Even gcc docs are wrong. You view cross-compilers (gcc -v) emitting "--with-sysroot=/" but I can't get one to build that way. Maybe those are chroot'd.
Due to the random nature of binutils/kernel/gcc/glibc it's not viable to patch the sources. Atm I patch the linker scripts before the final gcc phase. I'd like to know what generates those (eg: libc.so). It writes full paths. I have to patch relative to sysroot. Maybe there's a knob I can twiddle?
Tangent:
Proprietary code used to underlie my scripts. No longer the case. Consequently I'm moving forward on a github presence. I already know I hate *.md files.
Statistics: Posted by swampdog — Sun Oct 06, 2024 6:14 am