From: LLVM Packaging Team Date: Sat, 15 Aug 2020 20:34:33 +0000 (+0100) Subject: D69683-impl-path-hurd X-Git-Tag: archive/raspbian/1%8.0.1-10+rpi1^2~32 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d67bea17c84ae540e73d2ba8eb91b9f92fb3027e;p=llvm-toolchain-8.git D69683-impl-path-hurd [Hurd]: use /proc/self/exe to get program path https://reviews.llvm.org/D69683 Gbp-Pq: Topic hurd Gbp-Pq: Name D69683-impl-path-hurd.diff --- diff --git a/lib/Support/Unix/Path.inc b/lib/Support/Unix/Path.inc index d7cc0d627..69f3131dc 100644 --- a/lib/Support/Unix/Path.inc +++ b/lib/Support/Unix/Path.inc @@ -177,7 +177,7 @@ std::string getMainExecutable(const char *argv0, void *MainAddr) { if (getprogpath(exe_path, argv0) != NULL) return exe_path; -#elif defined(__linux__) || defined(__CYGWIN__) +#elif defined(__linux__) || defined(__CYGWIN__) || defined(__GNU__) char exe_path[MAXPATHLEN]; StringRef aPath("/proc/self/exe"); if (sys::fs::exists(aPath)) {