updated build script for gcc without enable optspace