|
|
@ -1,18 +1,38 @@ |
|
|
|
--- ./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 @@
|
|
|
|
--- /home/builder/Linux.cpp.orig 2019-03-16 21:28:28.549998238 +0000
|
|
|
|
+++ ./tools/clang/lib/Driver/ToolChains/Linux.cpp 2019-03-16 22:08:24.730161072 +0000
|
|
|
|
@@ -291,7 +291,30 @@
|
|
|
|
// possible permutations of these directories, and seeing which ones it added |
|
|
|
// to the link paths. |
|
|
|
path_list &Paths = getFilePaths(); |
|
|
|
-
|
|
|
|
+ if(IsAndroid) {
|
|
|
|
+ if (Arch == llvm::Triple::arm || Arch == llvm::Triple::thumb) {
|
|
|
|
+ addPathIfExists(D, SysRoot + "@TERMUX_PREFIX@/arm-linux-androideabi/lib", Paths);
|
|
|
|
+ addPathIfExists(D, SysRoot + "/system/lib", Paths);
|
|
|
|
+ ExtraOpts.push_back("-rpath=@TERMUX_PREFIX@/arm-linux-androideabi/lib");
|
|
|
|
+ }
|
|
|
|
+ if (Arch == llvm::Triple::x86) {
|
|
|
|
+ addPathIfExists(D, SysRoot + "@TERMUX_PREFIX@/i686-linux-android/lib", Paths);
|
|
|
|
+ addPathIfExists(D, SysRoot + "/system/lib", Paths);
|
|
|
|
+ ExtraOpts.push_back("-rpath=@TERMUX_PREFIX@/i686-linux-android/lib");
|
|
|
|
+ }
|
|
|
|
+ if (Arch == llvm::Triple::x86_64) {
|
|
|
|
+ addPathIfExists(D, SysRoot + "@TERMUX_PREFIX@/x86_64-linux-android/lib", Paths);
|
|
|
|
+ addPathIfExists(D, SysRoot + "/system/lib64", Paths);
|
|
|
|
+ ExtraOpts.push_back("-rpath=@TERMUX_PREFIX@/x86_64-linux-android/lib");
|
|
|
|
+ }
|
|
|
|
+ if (Arch == llvm::Triple::aarch64) {
|
|
|
|
+ addPathIfExists(D, SysRoot + "@TERMUX_PREFIX@/aarch64-linux-android/lib", Paths);
|
|
|
|
+ addPathIfExists(D, SysRoot + "/system/lib64", Paths);
|
|
|
|
+ ExtraOpts.push_back("-rpath=@TERMUX_PREFIX@/aarch64-linux-android/lib");
|
|
|
|
+ }
|
|
|
|
+ addPathIfExists(D, SysRoot + "@TERMUX_PREFIX@/lib", Paths);
|
|
|
|
+ ExtraOpts.push_back("-rpath=@TERMUX_PREFIX@/lib");
|
|
|
|
+ ExtraOpts.push_back("-rpath=@TERMUX_PREFIX@/lib");
|
|
|
|
+ }
|
|
|
|
const std::string OSLibDir = getOSLibDir(Triple, Args); |
|
|
|
const std::string MultiarchTriple = getMultiarchTriple(D, Triple, SysRoot); |
|
|
|
|
|
|
|
@@ -628,8 +631,27 @@
|
|
|
|
@@ -628,8 +651,27 @@
|
|
|
|
return; |
|
|
|
|
|
|
|
if (!DriverArgs.hasArg(options::OPT_nostdlibinc)) |
|
|
@ -41,7 +61,7 @@ |
|
|
|
if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) { |
|
|
|
SmallString<128> P(D.ResourceDir); |
|
|
|
llvm::sys::path::append(P, "include"); |
|
|
|
@@ -903,7 +925,7 @@
|
|
|
|
@@ -903,7 +945,7 @@
|
|
|
|
} |
|
|
|
|
|
|
|
bool Linux::isPIEDefault() const { |
|
|
|