add patch support when compile