configure: pull ahead gcc-sysroot processing
the sysroot flags need to be established even before setting up the spec, because as soon as that happens, toolchain.prf will try to determine the default paths and cache them. this also fixes sysroot use in toolchain flag support tests, which run (somewhat) independently from the toolchain setup. Task-number: QTBUG-63483 Change-Id: I7be1540e766dac58fb16f63176aa8d2879b51ae0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
parent
7d05144dde
commit
3303715099
@ -211,7 +211,7 @@
|
|||||||
|
|
||||||
"testTypeDependencies": {
|
"testTypeDependencies": {
|
||||||
"linkerSupportsFlag": [ "use_gold_linker" ],
|
"linkerSupportsFlag": [ "use_gold_linker" ],
|
||||||
"verifySpec": [ "shared", "use_gold_linker", "compiler-flags", "gcc-sysroot", "qmakeargs", "commit" ],
|
"verifySpec": [ "shared", "use_gold_linker", "compiler-flags", "qmakeargs", "commit" ],
|
||||||
"compile": [ "verifyspec" ],
|
"compile": [ "verifyspec" ],
|
||||||
"detectPkgConfig": [ "cross_compile", "machineTuple" ],
|
"detectPkgConfig": [ "cross_compile", "machineTuple" ],
|
||||||
"library": [ "pkg-config" ],
|
"library": [ "pkg-config" ],
|
||||||
@ -518,6 +518,7 @@
|
|||||||
|
|
||||||
"features": {
|
"features": {
|
||||||
"prepare": {
|
"prepare": {
|
||||||
|
"condition": "features.gcc-sysroot || true",
|
||||||
"output": [ "prepareSpec", "prepareOptions", "preparePaths", "reloadSpec" ]
|
"output": [ "prepareSpec", "prepareOptions", "preparePaths", "reloadSpec" ]
|
||||||
},
|
},
|
||||||
"machineTuple": {
|
"machineTuple": {
|
||||||
|
@ -1069,6 +1069,10 @@ defineTest(qtConfOutput_gccSysroot) {
|
|||||||
"\"QMAKE_LFLAGS += --sysroot=$$config.input.sysroot\""
|
"\"QMAKE_LFLAGS += --sysroot=$$config.input.sysroot\""
|
||||||
export(EXTRA_QMAKE_ARGS)
|
export(EXTRA_QMAKE_ARGS)
|
||||||
|
|
||||||
|
# This one is for qtConfToolchainSupportsFlag().
|
||||||
|
QMAKE_CXXFLAGS += --sysroot=$$config.input.sysroot
|
||||||
|
export(QMAKE_CXXFLAGS)
|
||||||
|
|
||||||
output = \
|
output = \
|
||||||
"!host_build {" \
|
"!host_build {" \
|
||||||
" QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" \
|
" QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" \
|
||||||
|
@ -344,7 +344,7 @@ defineReplace(qtConfToolchainSupportsFlag) {
|
|||||||
conftest = "int main() { return 0; }"
|
conftest = "int main() { return 0; }"
|
||||||
write_file("$$test_out_dir/conftest.cpp", conftest)|error()
|
write_file("$$test_out_dir/conftest.cpp", conftest)|error()
|
||||||
|
|
||||||
qtRunLoggedCommand("$$test_cmd_base $$QMAKE_CXX $${1} -o conftest-out conftest.cpp"): \
|
qtRunLoggedCommand("$$test_cmd_base $$QMAKE_CXX $$QMAKE_CXXFLAGS $${1} -o conftest-out conftest.cpp"): \
|
||||||
return(true)
|
return(true)
|
||||||
return(false)
|
return(false)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user