summaryrefslogtreecommitdiffstats
path: root/qmake/generators/unix
diff options
context:
space:
mode:
authorOBATA Akio <obache@wizdas.com>2020-08-02 16:42:31 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-08-09 21:18:35 +0900
commit3b9daf47f5d90aea358a14639c2913e7b5a77245 (patch)
tree290833f20a890c926e9bd650845aa4a72ef42f6d /qmake/generators/unix
parent578712826b2a161f3f354d7cfe0a066d0014f5dd (diff)
downloadtqt3-3b9daf47f5d90aea358a14639c2913e7b5a77245.tar.gz
tqt3-3b9daf47f5d90aea358a14639c2913e7b5a77245.zip
Prevent to set build directories as RPATH
It result in unwanted RPATH reference from installed binaries. Signed-off-by: OBATA Akio <obache@wizdas.com> (cherry picked from commit a9d2c0bdd16dd850fcfe58c040c89c8a6a2268a3)
Diffstat (limited to 'qmake/generators/unix')
-rw-r--r--qmake/generators/unix/unixmake.cpp8
-rw-r--r--qmake/generators/unix/unixmake2.cpp14
2 files changed, 3 insertions, 19 deletions
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index d21beba55..3c0cd97ce 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -352,11 +352,9 @@ UnixMakefileGenerator::init()
comp_flags += " -version-info " + TQString::number(10*maj + min) +
":" + TQString::number(pat) + ":0";
if(libtoolify[i] != "QMAKE_AR_CMD") {
- TQString rpath = Option::output_dir;
- if(!project->isEmpty("DESTDIR")) {
- rpath = project->first("DESTDIR");
- if(TQDir::isRelativePath(rpath))
- rpath.prepend(Option::output_dir + Option::dir_sep);
+ TQString rpath = project->first("target.path");
+ if(rpath.right(1) != Option::dir_sep) {
+ rpath += Option::dir_sep;
}
comp_flags += " -rpath " + Option::fixPathToTargetOS(rpath, FALSE);
}
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index 772fe8f72..06b1b3c05 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -1386,20 +1386,6 @@ void UnixMakefileGenerator::init2()
if(!project->isActiveConfig("compile_libtool"))
project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_SONAME"];
}
- TQString destdir = project->first("DESTDIR");
- if ( !destdir.isEmpty() && !project->variables()["QMAKE_RPATH"].isEmpty() ) {
- TQString rpath_destdir = destdir;
- if(TQDir::isRelativePath(rpath_destdir)) {
- TQFileInfo fi(Option::fixPathToLocalOS(rpath_destdir));
- if(fi.convertToAbs()) //strange, shouldn't really happen
- rpath_destdir = Option::fixPathToTargetOS(rpath_destdir, FALSE);
- else
- rpath_destdir = fi.filePath();
- } else {
- rpath_destdir = Option::fixPathToTargetOS(rpath_destdir, FALSE);
- }
- project->variables()["QMAKE_LFLAGS"] += project->first("QMAKE_RPATH") + rpath_destdir;
- }
}
TQStringList &quc = project->variables()["QMAKE_EXTRA_UNIX_COMPILERS"];
for(TQStringList::Iterator it = quc.begin(); it != quc.end(); ++it) {