Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Apr 2018 21:06:34 +0000 (UTC)
From:      Brooks Davis <brooks@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r467737 - in head/devel/llvm40: . files files/compiler-rt
Message-ID:  <201804182106.w3IL6Yrp007393@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brooks
Date: Wed Apr 18 21:06:33 2018
New Revision: 467737
URL: https://svnweb.freebsd.org/changeset/ports/467737

Log:
  Remove a needless include of vm/pmap.h which broke the i386 build with
  COMPILER_RT enabled on recent CURRENT.
  
  Rename files as if EXTRA_PATCHS+=compiler-rt were used, but don't use it
  due to compiler-rt's odd location in WRKDIR.
  
  No functional change.

Added:
  head/devel/llvm40/files/compiler-rt/
  head/devel/llvm40/files/compiler-rt/patch-lib_sanitizer__common_sanitizer__linux.cc
     - copied unchanged from r467736, head/devel/llvm40/files/compiler-rt-patch-canonical-syscalls
  head/devel/llvm40/files/compiler-rt/patch-lib_sanitizer__common_sanitizer__platfrom__limit__posix.h
     - copied unchanged from r467736, head/devel/llvm40/files/compiler-rt-patch-ino64
Deleted:
  head/devel/llvm40/files/compiler-rt-patch-canonical-syscalls
  head/devel/llvm40/files/compiler-rt-patch-ino64
Modified:
  head/devel/llvm40/Makefile

Modified: head/devel/llvm40/Makefile
==============================================================================
--- head/devel/llvm40/Makefile	Wed Apr 18 21:06:00 2018	(r467736)
+++ head/devel/llvm40/Makefile	Wed Apr 18 21:06:33 2018	(r467737)
@@ -367,8 +367,8 @@ post-patch-CLANG-on:
 	    ${PATCH_WRKSRC}/tools/clang/tools/clang-format/git-clang-format
 
 post-patch-COMPILER_RT-on:
-	cd ${WRKSRC_compiler_rt} && patch < ${PATCHDIR}/compiler-rt-patch-canonical-syscalls
-	cd ${WRKSRC_compiler_rt} && patch < ${PATCHDIR}/compiler-rt-patch-ino64
+	cd ${WRKSRC_compiler_rt} && patch < ${PATCHDIR}/compiler-rt/patch-lib_sanitizer__common_sanitizer__linux.cc
+	cd ${WRKSRC_compiler_rt} && patch < ${PATCHDIR}/compiler-rt/patch-lib_sanitizer__common_sanitizer__platfrom__limit__posix.h
 
 post-build-COMPILER_RT-on:
 	${MKDIR} ${WRKDIR}/compiler-rt-build

Copied: head/devel/llvm40/files/compiler-rt/patch-lib_sanitizer__common_sanitizer__linux.cc (from r467736, head/devel/llvm40/files/compiler-rt-patch-canonical-syscalls)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/llvm40/files/compiler-rt/patch-lib_sanitizer__common_sanitizer__linux.cc	Wed Apr 18 21:06:33 2018	(r467737, copy of r467736, head/devel/llvm40/files/compiler-rt-patch-canonical-syscalls)
@@ -0,0 +1,35 @@
+diff --git lib/sanitizer_common/sanitizer_linux.cc lib/sanitizer_common/sanitizer_linux.cc
+index 7328a5c0ac1..4b59a39ee27 100644
+--- lib/sanitizer_common/sanitizer_linux.cc
++++ lib/sanitizer_common/sanitizer_linux.cc
+@@ -223,7 +223,8 @@ static void kernel_stat_to_stat(struct kernel_stat *in, struct stat *out) {
+ 
+ uptr internal_stat(const char *path, void *buf) {
+ #if SANITIZER_FREEBSD
+-  return internal_syscall(SYSCALL(stat), path, buf);
++  return internal_syscall(SYSCALL(fstatat), AT_FDCWD, (uptr)path,
++                          (uptr)buf, 0);
+ #elif SANITIZER_USES_CANONICAL_LINUX_SYSCALLS
+   return internal_syscall(SYSCALL(newfstatat), AT_FDCWD, (uptr)path,
+                           (uptr)buf, 0);
+@@ -247,7 +248,8 @@ uptr internal_stat(const char *path, void *buf) {
+ 
+ uptr internal_lstat(const char *path, void *buf) {
+ #if SANITIZER_FREEBSD
+-  return internal_syscall(SYSCALL(lstat), path, buf);
++  return internal_syscall(SYSCALL(fstatat), AT_FDCWD, (uptr)path,
++                         (uptr)buf, AT_SYMLINK_NOFOLLOW);
+ #elif SANITIZER_USES_CANONICAL_LINUX_SYSCALLS
+   return internal_syscall(SYSCALL(newfstatat), AT_FDCWD, (uptr)path,
+                          (uptr)buf, AT_SYMLINK_NOFOLLOW);
+@@ -590,7 +592,9 @@ uptr internal_getppid() {
+ }
+ 
+ uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count) {
+-#if SANITIZER_USES_CANONICAL_LINUX_SYSCALLS
++#if SANITIZER_FREEBSD
++  return internal_syscall(SYSCALL(getdirentries), fd, (uptr)dirp, count, NULL);
++#elif SANITIZER_USES_CANONICAL_LINUX_SYSCALLS
+   return internal_syscall(SYSCALL(getdents64), fd, (uptr)dirp, count);
+ #else
+   return internal_syscall(SYSCALL(getdents), fd, (uptr)dirp, count);

Copied: head/devel/llvm40/files/compiler-rt/patch-lib_sanitizer__common_sanitizer__platfrom__limit__posix.h (from r467736, head/devel/llvm40/files/compiler-rt-patch-ino64)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/llvm40/files/compiler-rt/patch-lib_sanitizer__common_sanitizer__platfrom__limit__posix.h	Wed Apr 18 21:06:33 2018	(r467737, copy of r467736, head/devel/llvm40/files/compiler-rt-patch-ino64)
@@ -0,0 +1,15 @@
+--- lib/sanitizer_common/sanitizer_platform_limits_posix.h.orig	2017-05-24 19:09:24.000000000 +0000
++++ lib/sanitizer_common/sanitizer_platform_limits_posix.h	2017-05-24 20:12:47.183536000 +0000
+@@ -485,7 +485,12 @@
+   };
+ #elif SANITIZER_FREEBSD
+   struct __sanitizer_dirent {
++#if __FreeBSD_version < 1200031
+     unsigned int d_fileno;
++#else
++    unsigned long long d_fileno;
++    unsigned long long d_off;
++#endif
+     unsigned short d_reclen;
+     // more fields that we don't care about
+   };



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804182106.w3IL6Yrp007393>