User:Veremit/Hacking catalyst stages

From Gentoo Wiki
Jump to: navigation, search

GCC

We need Chewi's script:

FILE /usr/bin/armvXXX-unknown-linux-gnueabihf-wrapper
#!/bin/sh
X=${0/unknown/hardfloat}
X=${X/gnueabihf/gnueabi}
exec "${X}" "${@}"

Save, chmod +x armvXXX-unknown-linux-gnueabihf-wrapper.

Then, link each armvXXX-hardfloat-linux-gnueabi-??? to the wrapper as armvXXX-unknown-linux-gnueabihf-???

root #for tool in armv7a-hardfloat-linux-gnueabi-??? ; do ln -s armvXXX-unknown-linux-gnueabihf-wrapper ${tool/armvXXX-hardfloat-linux-gnueabi-/armvXXX-unknown-linux-gnueabihf-} ; done

And armvXXX-hardfloat-linux-gnueabi-?? too (as above)

Once that's sorted, we can compile again - w00t!

Distcc

Check out what's in /usr/lib/distcc/bin. It should look a bit like:

lrwxrwxrwx 1 root root 15 May 16 20:17 armv7a-hardfloat-linux-gnueabi-c++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 May 16 20:17 armv7a-hardfloat-linux-gnueabi-g++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 May 16 20:17 armv7a-hardfloat-linux-gnueabi-gcc -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 May 16 20:16 armv7a-unknown-linux-gnueabihf-c++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 May 16 20:16 armv7a-unknown-linux-gnueabihf-g++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root 15 May 16 20:16 armv7a-unknown-linux-gnueabihf-gcc -> /usr/bin/distcc
-rwxr-xr-x 1 root root 85 May 16 20:39 armv7a-unknown-linux-gnueabihf-wrapper
lrwxrwxrwx 1 root root 38 May 16 20:39 c++ -> armv7a-unknown-linux-gnueabihf-wrapper
lrwxrwxrwx 1 root root 38 May 16 20:39 cc -> armv7a-unknown-linux-gnueabihf-wrapper
lrwxrwxrwx 1 root root 38 May 16 20:39 g++ -> armv7a-unknown-linux-gnueabihf-wrapper
lrwxrwxrwx 1 root root 38 May 16 20:39 gcc -> armv7a-unknown-linux-gnueabihf-wrapper

where the wrapper looks like:

FILE armvXXX-unknown-linux-gnueabihf-wrapper
#!/bin/bash
exec /usr/lib/distcc/bin/armv7a-unknown-linux-gnueabihf-g${0:$[-2]} "$@"

You might need to (tweak to application):

root # ln -s /usr/bin/distcc armv7a-unknown-linux-gnueabihf-c++
root # ln -s /usr/bin/distcc armv7a-unknown-linux-gnueabihf-g++
root # ln -s /usr/bin/distcc armv7a-unknown-linux-gnueabihf-gcc
root # ln -s /usr/bin/distcc armv7a-hardfloat-linux-gnueabi-gcc
root # ln -s /usr/bin/distcc armv7a-hardfloat-linux-gnueabi-g++
root # ln -s /usr/bin/distcc armv7a-hardfloat-linux-gnueabi-c++