aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2018-07-27 14:49:27 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2018-07-31 07:28:40 +0000
commit24796796bdec74ce71f6db931280ebd4c3e908e9 (patch)
tree3fdc745cad2c00b0d85f7a5830bd2e478655bcc1
parent1f327e8321a594d886ad226630bac9313c31d049 (diff)
GCC: Fix ldconfig Probe
There can be additional content on a line of ldconfig output after the colon. Task-number: QBS-1372 Change-Id: Icb24f02951d323f00f8c3bd25f61021f3bf72839 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--share/qbs/modules/cpp/LinuxGCC.qbs8
1 files changed, 6 insertions, 2 deletions
diff --git a/share/qbs/modules/cpp/LinuxGCC.qbs b/share/qbs/modules/cpp/LinuxGCC.qbs
index 371e519dc..6af648c40 100644
--- a/share/qbs/modules/cpp/LinuxGCC.qbs
+++ b/share/qbs/modules/cpp/LinuxGCC.qbs
@@ -54,8 +54,12 @@ UnixGCC {
var line;
do {
line = ldconfig.readLine();
- if (line.charAt(0) === '/')
- paths.push(line.slice(0, line.length - 1));
+ if (line.charAt(0) === '/') {
+ var colonIndex = line.indexOf(':');
+ if (colonIndex == -1)
+ continue;
+ paths.push(line.slice(0, colonIndex));
+ }
} while (line && line.length > 0)
found = true;
systemRunPaths = paths;