Commit c13ed54e authored by Sylvestre Ledru's avatar Sylvestre Ledru

Merge branch '6.0' of salsa.debian.org:pkg-llvm-team/llvm-toolchain into 6.0

parents f39874ac 05d31214
llvm-toolchain-6.0 (1:6.0.1-10) UNRELEASED; urgency=medium llvm-toolchain-6.0 (1:6.0.1-11) unstable; urgency=medium
* Remove 'Multi-Arch: same' in libclang
(Closes: #874248)
-- Sylvestre Ledru <sylvestre@debian.org> 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)
Thanks to Adrian Bunk
doing that for the Julia package.
[ John Paul Adrian Glaubitz ] [ John Paul Adrian Glaubitz ]
* Add patch to fix missing include and library paths on x32 * Add patch to fix missing include and library paths on x32
-- Sylvestre Ledru <sylvestre@debian.org> Thu, 18 Oct 2018 16:43:31 +0200 -- Sylvestre Ledru <sylvestre@debian.org> Wed, 23 Jan 2019 23:25:50 +0100
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 <sthibault@debian.org> Wed, 24 Oct 2018 22:44:54 +0000
llvm-toolchain-6.0 (1:6.0.1-9.1) unstable; urgency=medium llvm-toolchain-6.0 (1:6.0.1-9.1) unstable; urgency=medium
......
...@@ -101,7 +101,6 @@ Section: libs ...@@ -101,7 +101,6 @@ Section: libs
Architecture: any Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends} Depends: ${shlibs:Depends}, ${misc:Depends}
Pre-Depends: ${misc:Pre-Depends} Pre-Depends: ${misc:Pre-Depends}
Multi-Arch: same
Description: C interface to the clang library Description: C interface to the clang library
Clang project is a C, C++, Objective C and Objective C++ front-end 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 based on the LLVM compiler. Its goal is to offer a replacement to the
......
[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.
--- 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]>;
...@@ -71,4 +71,5 @@ powerpcspe-add-missing-include-path.diff ...@@ -71,4 +71,5 @@ powerpcspe-add-missing-include-path.diff
x32-fix-driver-search-paths.diff x32-fix-driver-search-paths.diff
hurd-lib_Support_Unix_Path.inc.diff hurd-lib_Support_Unix_Path.inc.diff
hurd-tools_llvm-shlib_CMakeLists.txt.diff hurd-tools_llvm-shlib_CMakeLists.txt.diff
D53557-hurd-self-exe-realpath.diff
clang-arm-default-vfp3-on-armv7a.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment