Package: llvm-3.1
Version: 3.1~+rc1-1
Severity: important
Tags: patch
User: [email protected]
Usertags: hurd
Hi,
currently[1], llvm-3.1 fails to build on GNU/Hurd.
The problem is that the struct file_status on UNIX systems has two
members called st_dev and st_ino; those are also members of the
struct stat, and they are reserved identifiers which can also be
provided as #define (and this is the case for st_dev on Hurd).
The solution (attached) is to rename them, for example adding a
"fs_" prefix (= file status) to them.
Regarding the test suite, the situation wrt running it is the same as
described in #652283 (i.e. no $ORIGIN in RPATH); running it with
LD_LIBRARY_PATH properly exported gives the same result of linux-i386
(i.e. the only failure is CodeGen/X86/2010-06-14-fast-isel-fs-load.ll).
[1]
https://buildd.debian.org/status/fetch.php?pkg=llvm-3.1&arch=hurd-i386&ver=3.1%7E%2Brc1-1&stamp=1334882462
Thanks,
--
Pino
--- a/include/llvm/Support/FileSystem.h
+++ b/include/llvm/Support/FileSystem.h
@@ -99,8 +99,8 @@
class file_status
{
#if defined(LLVM_ON_UNIX)
- dev_t st_dev;
- ino_t st_ino;
+ dev_t fs_st_dev;
+ ino_t fs_st_ino;
#elif defined (LLVM_ON_WIN32)
uint32_t LastWriteTimeHigh;
uint32_t LastWriteTimeLow;
--- a/lib/Support/Unix/PathV2.inc
+++ b/lib/Support/Unix/PathV2.inc
@@ -285,8 +285,8 @@
bool equivalent(file_status A, file_status B) {
assert(status_known(A) && status_known(B));
- return A.st_dev == B.st_dev &&
- A.st_ino == B.st_ino;
+ return A.fs_st_dev == B.fs_st_dev &&
+ A.fs_st_ino == B.fs_st_ino;
}
error_code equivalent(const Twine &A, const Twine &B, bool &result) {
@@ -340,8 +340,8 @@
else
result = file_status(file_type::type_unknown);
- result.st_dev = status.st_dev;
- result.st_ino = status.st_ino;
+ result.fs_st_dev = status.st_dev;
+ result.fs_st_ino = status.st_ino;
return error_code::success();
}