Skip to content

Commit

Permalink
configure: Support the = prefix for -I and -L
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jobor committed Apr 23, 2019
1 parent c291724 commit f36a306
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions mkspecs/features/qt_configure.prf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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.")
Expand Down Expand Up @@ -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.")
Expand Down

0 comments on commit f36a306

Please sign in to comment.