Merge remote-tracking branch 'origin/8' into snapshot

This commit is contained in:
Sylvestre Ledru 2019-01-24 08:50:49 +01:00
commit 23c66b8d1b
3 changed files with 85 additions and 3 deletions

23
debian/changelog vendored
View File

@ -35,6 +35,13 @@ llvm-toolchain-snapshot (1:9~svn351375-1~exp1) experimental; urgency=medium
-- Sylvestre Ledru <sylvestre@debian.org> Wed, 16 Jan 2019 21:59:29 +0100
llvm-toolchain-8 (1:8~svn351401-1~exp3) experimental; urgency=medium
* Remove 'Multi-Arch: same' in libclang
(Closes: #874248)
-- Sylvestre Ledru <sylvestre@debian.org> Thu, 24 Jan 2019 08:49:34 +0100
llvm-toolchain-8 (1:8~svn351401-1~exp1) experimental; urgency=medium
* New snapshot release (branch 8 created)
@ -849,12 +856,24 @@ llvm-toolchain-snapshot (1:7~svn322880-1) unstable; urgency=medium
-- Sylvestre Ledru <sylvestre@debian.org> Thu, 18 Jan 2018 20:50:03 +0100
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 <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

1
debian/control vendored
View File

@ -105,7 +105,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

View File

@ -0,0 +1,64 @@
[hurd] Fix unconditional use of PATH_MAX
The GNU/Hurd system does not define an arbitrary PATH_MAX limitation, the POSIX 2001 realpath extension can be used instead, and the size of symlinks can be determined.
https://reviews.llvm.org/D54677
Index: llvm-toolchain-snapshot_8~svn347511/libcxx/src/filesystem/operations.cpp
===================================================================
--- llvm-toolchain-snapshot_8~svn347511.orig/libcxx/src/filesystem/operations.cpp
+++ llvm-toolchain-snapshot_8~svn347511/libcxx/src/filesystem/operations.cpp
@@ -530,11 +530,20 @@ path __canonical(path const& orig_p, err
ErrorHandler<path> err("canonical", ec, &orig_p, &cwd);
path p = __do_absolute(orig_p, &cwd, ec);
+#if _POSIX_VERSION >= 200112 || defined(__GLIBC__)
+ char *buff;
+ if ((buff = ::realpath(p.c_str(), NULL)) == nullptr)
+ return err.report(capture_errno());
+ path ret = {buff};
+ free(buff);
+ return ret;
+#else
char buff[PATH_MAX + 1];
char* ret;
if ((ret = ::realpath(p.c_str(), buff)) == nullptr)
return err.report(capture_errno());
return {ret};
+#endif
}
void __copy(const path& from, const path& to, copy_options options,
@@ -1076,16 +1085,27 @@ void __permissions(const path& p, perms
path __read_symlink(const path& p, error_code* ec) {
ErrorHandler<path> err("read_symlink", ec, &p);
- char buff[PATH_MAX + 1];
- error_code m_ec;
+ struct stat sb;
+ if (lstat(p.c_str(), &sb) == -1) {
+ return err.report(capture_errno());
+ }
+ size_t size = sb.st_size + 1;
+ char *buff = (char*) malloc(size);
+ if (buff == NULL) {
+ return err.report(capture_errno());
+ }
+
::ssize_t ret;
- if ((ret = ::readlink(p.c_str(), buff, PATH_MAX)) == -1) {
+ if ((ret = ::readlink(p.c_str(), buff, size)) == -1) {
+ free(buff);
return err.report(capture_errno());
}
- _LIBCPP_ASSERT(ret <= PATH_MAX, "TODO");
+ _LIBCPP_ASSERT(ret < size, "TODO");
_LIBCPP_ASSERT(ret > 0, "TODO");
buff[ret] = 0;
- return {buff};
+ path res = {buff};
+ free(buff);
+ return res;
}
bool __remove(const path& p, error_code* ec) {