Updated to not cleanup work directory if build fails and created a function to configure gcc