The CMP environment variable is used for both host and cross-build compiler selection. Suggest looking at HOST_CMP for the host compiler and CROSS_CMP for the cross-build target compiler, falling back to CMP if the more specific one isn't set, to allow mixed builds such as clang + gcc.