Support for CHOST and build optimizations