add macos support for linux kernel compile.