1 diff -u -r ../llvm-5.0.0.src/tools/clang/lib/Driver/ToolChains/Gnu.cpp ./tools/clang/lib/Driver/ToolChains/Gnu.cpp
2 --- ../llvm-5.0.0.src/tools/clang/lib/Driver/ToolChains/Gnu.cpp 2017-08-11 03:47:32.000000000 +0200
3 +++ ./tools/clang/lib/Driver/ToolChains/Gnu.cpp 2017-09-10 20:14:54.636653647 +0200
8 - const std::string &customGCCName = D.getCCCGenericGCCName();
10 - if (!customGCCName.empty())
11 - GCCName = customGCCName.c_str();
12 - else if (D.CCCIsCXX()) {
16 + // Termux modification: Disable calling into gcc from clang.
17 + // Clang calls into gcc if it tries to compile a language it doesn't understand.
18 + // On Termux gcc is a symlink to clang, so this leads into fork loop until
19 + // the whole system runs out of memory.
20 + const char *GCCName = "false";
22 const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath(GCCName));
23 C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));