X-Git-Url: https://git.distorted.org.uk/~mdw/termux-packages/blobdiff_plain/fde18d473cfb856fc5e9e100eae2cbe83c7c04db..2d124b6737dab1e87ff47153c8e3e231a42f4e5e:/packages/libllvm/tools-clang-lib-Driver-ToolChains-Gnu.cpp.patch diff --git a/packages/libllvm/tools-clang-lib-Driver-ToolChains-Gnu.cpp.patch b/packages/libllvm/tools-clang-lib-Driver-ToolChains-Gnu.cpp.patch index 0317941a..df480ee2 100644 --- a/packages/libllvm/tools-clang-lib-Driver-ToolChains-Gnu.cpp.patch +++ b/packages/libllvm/tools-clang-lib-Driver-ToolChains-Gnu.cpp.patch @@ -21,17 +21,3 @@ diff -u -r ../llvm-5.0.0.src/tools/clang/lib/Driver/ToolChains/Gnu.cpp ./tools/c const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath(GCCName)); C.addCommand(llvm::make_unique(JA, *this, Exec, CmdArgs, Inputs)); -@@ -415,9 +412,12 @@ - const llvm::Triple::ArchType Arch = ToolChain.getArch(); - const bool isAndroid = ToolChain.getTriple().isAndroid(); - const bool IsIAMCU = ToolChain.getTriple().isOSIAMCU(); -+ // Termux modification: Enable pie by default for Android -+ // and support the nopie flag. - const bool IsPIE = - !Args.hasArg(options::OPT_shared) && !Args.hasArg(options::OPT_static) && -- (Args.hasArg(options::OPT_pie) || ToolChain.isPIEDefault()); -+ (Args.hasArg(options::OPT_pie) || ToolChain.isPIEDefault() || isAndroid) && -+ !Args.hasArg(options::OPT_nopie); - const bool HasCRTBeginEndFiles = - ToolChain.getTriple().hasEnvironment() || - (ToolChain.getTriple().getVendor() != llvm::Triple::MipsTechnologies);