refactor build for gcc support
use the pad