diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2019-04-17 14:16:36 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2019-04-23 09:09:37 +0000 |
commit | f36a306563b4e77e4c64884382da22f3412708a0 (patch) | |
tree | 4f9794942225fc26f1422724a4326f17063cfa55 /mkspecs | |
parent | c2917243a96d19c9cd49c827e63d40b7c0110d7d (diff) |
configure: Support the = prefix for -I and -L
For gcc's -I and -L arguments a = prefix is replaced by the sysroot.
Since we're resolving include paths and library paths, we have to
support this feature.
For example, the linux-rasp-pi3-g++ makes use of this and is broken
without this patch.
Change-Id: Ie39e63322bd35e2a93aa8e55d52260164b8c6a6b
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/features/qt_configure.prf | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index 62ad972796..aa4348235e 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -515,6 +515,17 @@ defineTest(qtConfSetupLibraries) { } } +defineReplace(qtGccSysrootifiedPath) { + return($$replace(1, ^=, $$[QT_SYSROOT])) +} + +defineReplace(qtGccSysrootifiedPaths) { + sysrootified = + for (path, 1): \ + sysrootified += $$qtGccSysrootifiedPath($$path) + return($$sysrootified) +} + # libs-var, libs, in-paths, out-paths-var defineTest(qtConfResolveLibs) { ret = true @@ -531,6 +542,7 @@ defineTest(qtConfResolveLibs) { out += $$l } else: contains(l, "^-L.*") { lp = $$replace(l, "^-L", ) + gcc: lp = $$qtGccSysrootifiedPath($$lp) !exists($$lp/.) { qtLog("Library path $$val_escape(lp) is invalid.") ret = false @@ -604,6 +616,7 @@ defineTest(qtConfResolveAllLibs) { # libs-var, in-paths, libs defineTest(qtConfResolvePathLibs) { ret = true + gcc: 2 = $$qtGccSysrootifiedPaths($$2) for (libdir, 2) { !exists($$libdir/.) { qtLog("Library path $$val_escape(libdir) is invalid.") @@ -654,6 +667,7 @@ defineReplace(qtConfGetTestIncludes) { # includes-var, in-paths, test-object-var defineTest(qtConfResolvePathIncs) { ret = true + gcc: 2 = $$qtGccSysrootifiedPaths($$2) for (incdir, 2) { !exists($$incdir/.) { qtLog("Include path $$val_escape(incdir) is invalid.") |