Add Werror disabling to common and move cxx flags for cxx only.