diff --git a/debian/changelog b/debian/changelog index 7c9b15f0..29fa8755 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-3.4 (1:3.4~+rc2-4) UNRELEASED; urgency=low + + * Relative call in the chroot without proc failed. + See: fix-an-issue-in-chroot-witout-proc.diff + + -- Sylvestre Ledru Mon, 09 Dec 2013 17:37:49 +0100 + llvm-toolchain-3.4 (1:3.4~+rc2-3) unstable; urgency=low * Fix the bad declaration on the lldb desactivation diff --git a/debian/patches/fix-an-issue-in-chroot-witout-proc.diff b/debian/patches/fix-an-issue-in-chroot-witout-proc.diff new file mode 100644 index 00000000..631303a9 --- /dev/null +++ b/debian/patches/fix-an-issue-in-chroot-witout-proc.diff @@ -0,0 +1,61 @@ +Index: llvm-toolchain-3.4-3.4~+rc1/lib/Support/Unix/Path.inc +=================================================================== +--- llvm-toolchain-3.4-3.4~+rc1.orig/lib/Support/Unix/Path.inc (révision 196790) ++++ llvm-toolchain-3.4-3.4~+rc1/lib/Support/Unix/Path.inc (révision 196791) +@@ -184,15 +184,15 @@ + defined(__OpenBSD__) || defined(__minix) || defined(__FreeBSD_kernel__) || \ + defined(__linux__) || defined(__CYGWIN__) || defined(__DragonFly__) + static int +-test_dir(char buf[PATH_MAX], char ret[PATH_MAX], +- const char *dir, const char *bin) +-{ ++test_dir(char ret[PATH_MAX], const char *dir, const char *bin) ++{ + struct stat sb; ++ char fullpath[PATH_MAX]; + +- snprintf(buf, PATH_MAX, "%s/%s", dir, bin); +- if (realpath(buf, ret) == NULL) ++ snprintf(fullpath, PATH_MAX, "%s/%s", dir, bin); ++ if (realpath(fullpath, ret) == NULL) + return (1); +- if (stat(buf, &sb) != 0) ++ if (stat(fullpath, &sb) != 0) + return (1); + + return (0); +@@ -201,20 +201,21 @@ + static char * + getprogpath(char ret[PATH_MAX], const char *bin) + { +- char *pv, *s, *t, buf[PATH_MAX]; ++ char *pv, *s, *t; + + /* First approach: absolute path. */ + if (bin[0] == '/') { +- if (test_dir(buf, ret, "/", bin) == 0) ++ if (test_dir(ret, "/", bin) == 0) + return (ret); + return (NULL); + } + + /* Second approach: relative path. */ + if (strchr(bin, '/') != NULL) { +- if (getcwd(buf, PATH_MAX) == NULL) ++ char cwd[PATH_MAX]; ++ if (getcwd(cwd, PATH_MAX) == NULL) + return (NULL); +- if (test_dir(buf, ret, buf, bin) == 0) ++ if (test_dir(ret, cwd, bin) == 0) + return (ret); + return (NULL); + } +@@ -226,7 +227,7 @@ + if (pv == NULL) + return (NULL); + while ((t = strsep(&s, ":")) != NULL) { +- if (test_dir(buf, ret, t, bin) == 0) { ++ if (test_dir(ret, t, bin) == 0) { + free(pv); + return (ret); + } diff --git a/debian/patches/series b/debian/patches/series index d3485c7a..148f8e9d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -32,3 +32,4 @@ debian-mips64-n32-multiarch.diff force-gcc-header-obj.diff do-not-fail-on-unexpected-pass.diff +fix-an-issue-in-chroot-witout-proc.diff