add rpath for clang as default

This commit is contained in:
its-pointless 2019-03-14 14:46:10 +11:00 committed by Leonid Pliushch
parent cf04e00d59
commit a4a2aa589a
1 changed files with 10 additions and 7 deletions

View File

@ -1,15 +1,18 @@
--- ./linux.cpp.orig 2019-02-18 04:44:14.793138642 +0000
+++ ./tools/clang/lib/Driver/ToolChains/Linux.cpp 2019-02-18 04:52:44.527535617 +0000
@@ -311,6 +311,8 @@
--- ./tools/clang/lib/Driver/ToolChains/Linux.cpp.orig 2018-07-30 19:44:13.000000000 +0000
+++ ./tools/clang/lib/Driver/ToolChains/Linux.cpp 2019-03-14 03:42:40.783434246 +0000
@@ -291,7 +291,10 @@
// possible permutations of these directories, and seeing which ones it added
// to the link paths.
path_list &Paths = getFilePaths();
+ if(IsAndroid)
-
+ if(IsAndroid) {
+ addPathIfExists(D, SysRoot + "@TERMUX_PREFIX@/lib", Paths);
+ ExtraOpts.push_back("-rpath=@TERMUX_PREFIX@/lib");
+ }
const std::string OSLibDir = getOSLibDir(Triple, Args);
const std::string MultiarchTriple = getMultiarchTriple(D, Triple, SysRoot);
@@ -652,8 +654,27 @@
@@ -628,8 +631,27 @@
return;
if (!DriverArgs.hasArg(options::OPT_nostdlibinc))
@ -38,7 +41,7 @@
if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) {
SmallString<128> P(D.ResourceDir);
llvm::sys::path::append(P, "include");
@@ -968,7 +989,7 @@
@@ -903,7 +925,7 @@
}
bool Linux::isPIEDefault() const {