Merge remote-tracking branch 'origin/6.0' into 7

This commit is contained in:
Sylvestre Ledru 2018-10-18 16:45:57 +02:00
commit 8e3d8912ea
6 changed files with 101 additions and 1 deletions

17
debian/changelog vendored
View File

@ -380,6 +380,23 @@ 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
[ 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
llvm-toolchain-6.0 (1:6.0.1-9.1) unstable; urgency=medium
* Non-maintainer upload.
* Apply hurd fixes (Closes: #908847).
- hurd-lib_Support_Unix_Path.inc.diff
- hurd-pathmax.diff
- hurd-tools_llvm-shlib_CMakeLists.txt.diff
-- Samuel Thibault <sthibault@debian.org> Tue, 16 Oct 2018 20:18:39 +0000
llvm-toolchain-6.0 (1:6.0.1-8) unstable; urgency=medium
[ John Paul Adrian Glaubitz ]

View File

@ -0,0 +1,52 @@
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
@@ -98,7 +98,7 @@
#define STATVFS_F_FRSIZE(vfs) static_cast<uint64_t>(vfs.f_bsize)
#endif
-#if defined(__NetBSD__)
+#if defined(__NetBSD__) || defined(__GNU__)
#define STATVFS_F_FLAG(vfs) (vfs).f_flag
#else
#define STATVFS_F_FLAG(vfs) (vfs).f_flags
@@ -111,7 +111,7 @@ namespace sys {
namespace fs {
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \
defined(__minix) || defined(__FreeBSD_kernel__) || defined(__linux__) || \
- defined(__CYGWIN__) || defined(__DragonFly__) || defined(_AIX)
+ defined(__CYGWIN__) || defined(__DragonFly__) || defined(_AIX) || defined(__GNU__)
static int
test_dir(char ret[PATH_MAX], const char *dir, const char *bin)
{
@@ -187,7 +187,7 @@ std::string getMainExecutable(const char
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)) {
@@ -360,7 +360,7 @@ std::error_code remove(const Twine &path
}
static bool is_local_impl(struct STATVFS &Vfs) {
-#if defined(__linux__)
+#if defined(__linux__) || defined(__GNU__)
#ifndef NFS_SUPER_MAGIC
#define NFS_SUPER_MAGIC 0x6969
#endif
@@ -370,7 +370,11 @@ static bool is_local_impl(struct STATVFS
#ifndef CIFS_MAGIC_NUMBER
#define CIFS_MAGIC_NUMBER 0xFF534D42
#endif
+#ifdef __GNU__
+ switch ((uint32_t)Vfs.__f_type) {
+#else
switch ((uint32_t)Vfs.f_type) {
+#endif
case NFS_SUPER_MAGIC:
case SMB_SUPER_MAGIC:
case CIFS_MAGIC_NUMBER:

View File

@ -75,3 +75,19 @@ Index: llvm-toolchain-snapshot_6.0~svn317126/polly/lib/External/ppcg/cuda_common
/* Open the host .cu file and the kernel .hu and .cu files for writing.
* Add the necessary includes.
*/
Index: llvm-toolchain-6.0-6.0.1/clang/lib/Frontend/ModuleDependencyCollector.cpp
===================================================================
--- llvm-toolchain-6.0-6.0.1.orig/clang/lib/Frontend/ModuleDependencyCollector.cpp
+++ llvm-toolchain-6.0-6.0.1/clang/lib/Frontend/ModuleDependencyCollector.cpp
@@ -97,6 +97,11 @@ struct ModuleDependencyMMCallbacks : pub
}
+// For GNU Hurd
+#if defined(__GNU__) && !defined(PATH_MAX)
+# define PATH_MAX 4096
+#endif
+
// TODO: move this to Support/Path.h and check for HAVE_REALPATH?
static bool real_path(StringRef SrcPath, SmallVectorImpl<char> &RealPath) {
#ifdef LLVM_ON_UNIX

View File

@ -0,0 +1,12 @@
Index: llvm-toolchain-6.0-6.0.1/tools/llvm-shlib/CMakeLists.txt
===================================================================
--- llvm-toolchain-6.0-6.0.1.orig/tools/llvm-shlib/CMakeLists.txt
+++ llvm-toolchain-6.0-6.0.1/tools/llvm-shlib/CMakeLists.txt
@@ -40,6 +40,7 @@ set_property(TARGET LLVM PROPERTY VERSIO
list(REMOVE_DUPLICATES LIB_NAMES)
if(("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") OR (MINGW) OR (HAIKU)
OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
+ OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "GNU")
OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")
OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS")) # FIXME: It should be "GNU ld for elf"
configure_file(

View File

@ -78,3 +78,6 @@ scan-build-clang-X.diff
0001-analyzer-scan-build-if-status-bugs-is-passed-don-t-f.patch
#bootstrap-fix-include-next.diff
#bootstrap-with-openmp-version-export-missing.diff
hurd-lib_Support_Unix_Path.inc.diff
hurd-tools_llvm-shlib_CMakeLists.txt.diff

2
debian/rules vendored
View File

@ -86,7 +86,7 @@ else
control_vars = '-Vdep:devlibs=libstdc++6-$(GCC_VERSION)-dev'
endif
BINUTILS_GOLD_ARCHS := amd64 arm64 armhf i386 ppc64 ppc64el sparc sparc64 x32 s390x
BINUTILS_GOLD_ARCHS := amd64 arm64 armhf i386 ppc64 ppc64el sparc sparc64 x32 s390x hurd-i386
ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' binutils) ge 2.23.1-1~exp3 ; echo $$?),0)
ifneq (,$(filter $(DEB_HOST_ARCH),$(BINUTILS_GOLD_ARCHS)))
# -fused-ld=gold enables the gold linker (but is not supported by all archs / distro)