Hello,
Hopefully I have missed something obvious but I was trying to move a cross toolchain that was made with crosstool-ng onto a new path on a different host. I thought that the built toolchain was relocatable but it seems not.
The toolchain was built into "/home/build/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi" but on the new machine I wanted to put it at "/opt/arm-bcm2708hardfp-linux-gnueabi". This all seemed fine on the surface until I started a build with distcc that failed.
Investigation led me to this:
$this->bbcode_second_pass_code('', '# cat /tmp/distcc_e4a99818.stderr
cc1: error: /home/build/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/arm-bcm2708hardfp-linux-gnueabi/sysroot/home/build/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/arm-bcm2708hardfp-linux-gnueabi/sysroot/include: Permission denied
cc1: error: /home/build/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/arm-bcm2708hardfp-linux-gnueabi/sysroot/usr/include: Permission denied')
So I think that somewhere the original path is hard-coded into the generated toolchain. I did a quick check to confirm this:
$this->bbcode_second_pass_code('', 'strings libexec/gcc/arm-bcm2708hardfp-linux-gnueabi/4.7.1/cc1 | grep "/home/build/tools"
')
To build my toolchain, I followed the instructions at http://archlinuxarm.org/developers/distcc-cross-compiling/ and I had no problems. I used the .config from Raspberry-Pi (https://raw.github.com/raspberrypi/tool ... -ng.config).
To test, I rebuilt my toolchain into /opt so that the location would be the same when moved to the new machine. With this toolchain, this works fine.
My question is whether I am doing something incorrect to end up with these hard coded paths in my toolchain, or if this is actually correct and how it works. If anyone has any similar experiences I'd be interested to learn from them.
