gcc: Parameterise gcc package

Use a python script to try and deal with Linux/OSX differences and also
problems with LD_LIBRARY_PATH.