Enable cross_compile when sysroot is used

The crossCompile test checked only if platform and xplatform are different
(which is the usual case), but in yocto builds cross compilation is done
by setting both platform and xplatform to the same target mkspec and using
host tools from -external-hostbindir.

Change-Id: Ib4ae3975a52196d9c0ad52b5b5e9ccd7c1bfe883
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
Samuli Piippo 2016-11-03 08:22:34 +02:00
parent 146a2eef5f
commit 969bb10eed

View File

@ -57,6 +57,7 @@ defineTest(qtConfCommandline_sanitize) {
# callbacks
defineReplace(qtConfFunc_crossCompile) {
!isEmpty(config.input.sysroot): return(true)
spec = $$[QMAKE_SPEC]
!equals(spec, $$[QMAKE_XSPEC]): return(true)
return(false)