From 56c9025048d0aed1c4d5b8cf90b171c834900f42 Mon Sep 17 00:00:00 2001 From: Mo Zhou Date: Mon, 14 Jan 2019 05:38:18 +0000 Subject: [PATCH 1/7] merge changes from 1:6.0.1-9.2 --- debian/changelog | 8 +++ .../D53557-hurd-self-exe-realpath.diff | 72 +++++++++++++++++++ debian/patches/series | 2 +- 3 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 debian/patches/D53557-hurd-self-exe-realpath.diff diff --git a/debian/changelog b/debian/changelog index 3091889d..db8fc767 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,14 @@ llvm-toolchain-6.0 (1:6.0.1-10) UNRELEASED; urgency=medium -- Sylvestre Ledru Thu, 18 Oct 2018 16:43:31 +0200 +llvm-toolchain-6.0 (1:6.0.1-9.2) unstable; urgency=medium + + * Non-maintainer upload. + * debian/patches/D53557-hurd-self-exe-realpath.diff: Fix paths returned by + llvm-config (Closes: Bug#911817). + + -- Samuel Thibault Wed, 24 Oct 2018 22:44:54 +0000 + llvm-toolchain-6.0 (1:6.0.1-9.1) unstable; urgency=medium * Non-maintainer upload. diff --git a/debian/patches/D53557-hurd-self-exe-realpath.diff b/debian/patches/D53557-hurd-self-exe-realpath.diff new file mode 100644 index 00000000..781a473b --- /dev/null +++ b/debian/patches/D53557-hurd-self-exe-realpath.diff @@ -0,0 +1,72 @@ +[hurd] Make getMainExecutable get the real binary path + +On GNU/Hurd, llvm-config is returning bogus value, such as: + +$ llvm-config-6.0 --includedir +/usr/include + +while it should be: +$ llvm-config-6.0 --includedir +/usr/lib/llvm-6.0/include + +This is because getMainExecutable does not get the actual installation +path. On GNU/Hurd, /proc/self/exe is indeed a symlink to the path that +was used to start the program, and not the eventual binary file. Llvm's +getMainExecutable thus needs to run realpath over it to get the actual +place where llvm was installed (/usr/lib/llvm-6.0/bin/llvm-config), and +not /usr/bin/llvm-config-6.0. This will not change the result on Linux, +where /proc/self/exe already points to the eventual file. + +Patch by Samuel Thibault! + +While making changes here, I reformatted this block a bit to reduce +indentation and match 2 space indent style. + +Differential Revision: https://reviews.llvm.org/D53557 + +Index: llvm-toolchain-6.0-6.0.1/lib/Support/Unix/Path.inc +=================================================================== +--- llvm-toolchain-6.0-6.0.1.orig/lib/Support/Unix/Path.inc ++++ llvm-toolchain-6.0-6.0.1/lib/Support/Unix/Path.inc +@@ -191,14 +191,34 @@ std::string getMainExecutable(const char + char exe_path[MAXPATHLEN]; + StringRef aPath("/proc/self/exe"); + if (sys::fs::exists(aPath)) { +- // /proc is not always mounted under Linux (chroot for example). +- ssize_t len = readlink(aPath.str().c_str(), exe_path, sizeof(exe_path)); +- if (len >= 0) +- return std::string(exe_path, len); ++ // /proc is not always mounted under Linux (chroot for example). ++ ssize_t len = readlink(aPath.str().c_str(), exe_path, sizeof(exe_path)); ++ if (len < 0) ++ return ""; ++ ++ // Null terminate the string for realpath. readlink never null ++ // terminates its output. ++ len = std::min(len, ssize_t(sizeof(exe_path) - 1)); ++ exe_path[len] = '\0'; ++ ++ // At least on GNU/Hurd, /proc/self/exe is a symlink to the path that ++ // was used to start the program, and not the eventual binary file. ++ // We thus needs to run realpath over it to get the actual place ++ // where llvm was installed. ++#if _POSIX_VERSION >= 200112 || defined(__GLIBC__) ++ char *real_path = realpath(exe_path, NULL); ++ std::string ret = std::string(real_path); ++ free(real_path); ++ return ret; ++#else ++ char real_path[MAXPATHLEN]; ++ realpath(exe_path, real_path); ++ return std::string(real_path); ++#endif + } else { +- // Fall back to the classical detection. +- if (getprogpath(exe_path, argv0)) +- return exe_path; ++ // Fall back to the classical detection. ++ if (getprogpath(exe_path, argv0)) ++ return exe_path; + } + #elif defined(HAVE_DLFCN_H) && defined(HAVE_DLADDR) + // Use dladdr to get executable path if available. diff --git a/debian/patches/series b/debian/patches/series index f0d1e58e..8234140e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -71,4 +71,4 @@ powerpcspe-add-missing-include-path.diff x32-fix-driver-search-paths.diff hurd-lib_Support_Unix_Path.inc.diff hurd-tools_llvm-shlib_CMakeLists.txt.diff - +D53557-hurd-self-exe-realpath.diff From 4be97db289019af93212c094065b8a67387e94c5 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 17 Jan 2019 11:52:01 +0100 Subject: [PATCH 2/7] fix a syntax issue --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 7b877485..cc788b89 100644 --- a/debian/control +++ b/debian/control @@ -44,7 +44,7 @@ Description: C, C++ and Objective-C compiler Package: clang-tools-8 Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, clang-8 (= ${binary:Version}) +Depends: ${shlibs:Depends}, ${misc:Depends}, clang-8 (= ${binary:Version}), python Description: clang-based tools for C/C++ developments Clang project is a C, C++, Objective C and Objective C++ front-end From aec23e9a5d8bf96aecfc0d655f24750a6dad418b Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Thu, 17 Jan 2019 19:55:07 +0200 Subject: [PATCH 3/7] Fix baseline violations on armhf Patch is already in LLVM 7 --- .../clang-arm-default-vfp3-on-armv7a.patch | 23 +++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 24 insertions(+) create mode 100644 debian/patches/clang-arm-default-vfp3-on-armv7a.patch diff --git a/debian/patches/clang-arm-default-vfp3-on-armv7a.patch b/debian/patches/clang-arm-default-vfp3-on-armv7a.patch new file mode 100644 index 00000000..ec81b866 --- /dev/null +++ b/debian/patches/clang-arm-default-vfp3-on-armv7a.patch @@ -0,0 +1,23 @@ +--- llvm-toolchain-6.0-6.0.1.orig/include/llvm/Support/ARMTargetParser.def ++++ llvm-toolchain-6.0-6.0.1/include/llvm/Support/ARMTargetParser.def +@@ -75,7 +75,7 @@ ARM_ARCH("armv6kz", ARMV6KZ, "6KZ", "v6k + ARM_ARCH("armv6-m", ARMV6M, "6-M", "v6m", ARMBuildAttrs::CPUArch::v6_M, + FK_NONE, ARM::AEK_NONE) + ARM_ARCH("armv7-a", ARMV7A, "7-A", "v7", ARMBuildAttrs::CPUArch::v7, +- FK_NEON, ARM::AEK_DSP) ++ FK_VFPV3_D16, ARM::AEK_DSP) + ARM_ARCH("armv7ve", ARMV7VE, "7VE", "v7ve", ARMBuildAttrs::CPUArch::v7, + FK_NEON, (ARM::AEK_SEC | ARM::AEK_MP | ARM::AEK_VIRT | + ARM::AEK_HWDIVARM | ARM::AEK_HWDIVTHUMB | ARM::AEK_DSP)) +--- llvm-toolchain-6.0-6.0.1.orig/lib/Target/ARM/ARM.td ++++ llvm-toolchain-6.0-6.0.1/lib/Target/ARM/ARM.td +@@ -530,7 +530,8 @@ def ARMv6sm : Architecture<"armv6s-m", + FeatureMClass]>; + + def ARMv7a : Architecture<"armv7-a", "ARMv7a", [HasV7Ops, +- FeatureNEON, ++ FeatureVFP3, ++ FeatureD16, + FeatureDB, + FeatureDSP, + FeatureAClass]>; diff --git a/debian/patches/series b/debian/patches/series index 8234140e..5c5f3b7c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -72,3 +72,4 @@ x32-fix-driver-search-paths.diff hurd-lib_Support_Unix_Path.inc.diff hurd-tools_llvm-shlib_CMakeLists.txt.diff D53557-hurd-self-exe-realpath.diff +clang-arm-default-vfp3-on-armv7a.patch From 37435e71f9f57ac85096a9e925c9f9f788b55a94 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 23 Jan 2019 22:52:28 +0100 Subject: [PATCH 4/7] Fix a baseline violation on armhf (Closes: #914268) Thanks to Adrian Bunk --- debian/changelog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/debian/changelog b/debian/changelog index db8fc767..f991f785 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,8 @@ llvm-toolchain-6.0 (1:6.0.1-10) UNRELEASED; urgency=medium + * Fix a baseline violation on armhf (Closes: #914268) + Thanks to Adrian Bunk + [ John Paul Adrian Glaubitz ] * Add patch to fix missing include and library paths on x32 From a5130e12be004b2498ff6341c037923f62fed98a Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 23 Jan 2019 23:26:23 +0100 Subject: [PATCH 5/7] doing that for the Julia package. --- debian/changelog | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index f991f785..b6244e65 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,12 +1,13 @@ -llvm-toolchain-6.0 (1:6.0.1-10) UNRELEASED; urgency=medium +llvm-toolchain-6.0 (1:6.0.1-10) unstable; urgency=medium * Fix a baseline violation on armhf (Closes: #914268) Thanks to Adrian Bunk + doing that for the Julia package. [ John Paul Adrian Glaubitz ] * Add patch to fix missing include and library paths on x32 - -- Sylvestre Ledru Thu, 18 Oct 2018 16:43:31 +0200 + -- Sylvestre Ledru Wed, 23 Jan 2019 23:25:50 +0100 llvm-toolchain-6.0 (1:6.0.1-9.2) unstable; urgency=medium From 05d312140c5464ca96a33ad82f5e654bf043a310 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 24 Jan 2019 08:45:08 +0100 Subject: [PATCH 6/7] Remove 'Multi-Arch: same' in libclang (Closes: #874248) --- debian/changelog | 7 +++++++ debian/control | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index b6244e65..d8950755 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-6.0 (1:6.0.1-11) unstable; urgency=medium + + * Remove 'Multi-Arch: same' in libclang + (Closes: #874248) + + -- Sylvestre Ledru Thu, 24 Jan 2019 08:44:24 +0100 + llvm-toolchain-6.0 (1:6.0.1-10) unstable; urgency=medium * Fix a baseline violation on armhf (Closes: #914268) diff --git a/debian/control b/debian/control index 89350a75..8f36c89d 100644 --- a/debian/control +++ b/debian/control @@ -101,7 +101,6 @@ Section: libs Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Pre-Depends: ${misc:Pre-Depends} -Multi-Arch: same Description: C interface to the clang library Clang project is a C, C++, Objective C and Objective C++ front-end based on the LLVM compiler. Its goal is to offer a replacement to the From 943cd6d23e66df348b2c3db85040c186bc5457d0 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 24 Jan 2019 08:49:39 +0100 Subject: [PATCH 7/7] Remove 'Multi-Arch: same' in libclang (Closes: #874248) --- debian/changelog | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 2d56e5c0..db1e63b0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-8 (1:8~svn351401-1~exp3) experimental; urgency=medium + + * Remove 'Multi-Arch: same' in libclang + (Closes: #874248) + + -- Sylvestre Ledru Thu, 24 Jan 2019 08:49:34 +0100 + llvm-toolchain-8 (1:8~svn351401-1~exp2) experimental; urgency=medium * Fix debian-changelog-line-too-long @@ -517,8 +524,6 @@ llvm-toolchain-7 (1:7.0.1-5) unstable; urgency=medium * Add 'Rules-Requires-Root: no' in debian/control * Because more and more tools in clang-tools are in python, add the dependency - * Remove 'Multi-Arch: same' in libclang - (Closes: #874248) -- Sylvestre Ledru Fri, 04 Jan 2019 16:00:41 +0100