pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
compiler-rt-netbsd: Add SVN r. 305178
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Mon Jun 12 18:13:25 2017 +0200
Changeset: 4a07b420b2b2eb2699cab6192709842eca4cdcfa
Modified Files:
compiler-rt-netbsd/Makefile
compiler-rt-netbsd/distinfo
Added Files:
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h
Log Message:
compiler-rt-netbsd: Add SVN r. 305178
Define GET_LINK_MAP_BY_DLOPEN_HANDLE() for NetBSD on amd64 and i386.
Follow FreeBSD implementation and handle shift of N bytes that
incorporates the map structure.
FreeBSD sets 544 bytes on amd64 of sizeof(Obj_Entry) in linker.
NetBSD sets 608 for amd64 and 324 for i386.
Reference:
[Sanitizers] Introduce GET_LINK_MAP_BY_DLOPEN_HANDLE() macro
https://reviews.llvm.org/D7233
Sponsored by <The NetBSD Foundation>
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=4a07b420b2b2eb2699cab6192709842eca4cdcfa
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
compiler-rt-netbsd/Makefile | 3 +-
compiler-rt-netbsd/distinfo | 1 +
...er__common_sanitizer__platform__limits__posix.h | 41 ++++++++++++++++++++++
3 files changed, 43 insertions(+), 2 deletions(-)
diffs:
diff --git a/compiler-rt-netbsd/Makefile b/compiler-rt-netbsd/Makefile
index 6367ade0b6..4b2c8b4fae 100644
--- a/compiler-rt-netbsd/Makefile
+++ b/compiler-rt-netbsd/Makefile
@@ -5,8 +5,7 @@ CATEGORIES= lang devel
SVN_REPOSITORIES= compiler-rt
SVN_REPO.compiler-rt= http://llvm.org/svn/llvm-project/compiler-rt/trunk
-SVN_REVISION.compiler-rt= 304308
-
+SVN_REVISION.compiler-rt= 305178
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
HOMEPAGE= http://compiler-rt.llvm.org/
COMMENT= LLVM runtime libraries
diff --git a/compiler-rt-netbsd/distinfo b/compiler-rt-netbsd/distinfo
index 1607d8e580..12d8f69ebb 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -17,6 +17,7 @@ SHA1 (patch-lib_asan_scripts_asan__symbolize.py) = d6c079e7092b22b5379293dbb8d1e
SHA1 (patch-lib_builtins_gcc__personality__v0.c) = 0a48656e68614730ea05e8fb2588434e774b3c45
SHA1 (patch-lib_sanitizer__common_CMakeLists.txt) = 45b18179c5d1d9f284ccfe4670a989ac30d05e92
SHA1 (patch-lib_sanitizer__common_sanitizer__platform.h) = 47360a8352cc34fddc71c8f71081d7d589a63dad
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h) = f3c35dda4baa3bf539ceb3c0cf652fb5073349b6
SHA1 (patch-lib_sanitizer__common_sanitizer__procmaps__netbsd.cc) = 0b8d88529f7374a1159c65c0bccd946ccf6a65f3
SHA1 (patch-test_asan_lit.cfg) = 259b0e262b5975b862a51f015ec6b646ce2af10a
SHA1 (patch-test_sanitizer__common_CMakeLists.txt) = 6af4c5ca42f17bb09823c36bf32d5576fbc0b4c8
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h
new file mode 100644
index 0000000000..68166f1efe
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h
@@ -0,0 +1,41 @@
+$NetBSD$
+
+--- lib/sanitizer_common/sanitizer_platform_limits_posix.h.orig 2017-06-12 15:01:29.910328073 +0000
++++ lib/sanitizer_common/sanitizer_platform_limits_posix.h
+@@ -18,18 +18,31 @@
+ #include "sanitizer_internal_defs.h"
+ #include "sanitizer_platform.h"
+
++// FreeBSD's and NetBSD's dlopen() returns a pointer to an Obj_Entry structure
++// that incorporates the map structure.
+ #if SANITIZER_FREEBSD
+-// FreeBSD's dlopen() returns a pointer to an Obj_Entry structure that
+-// incorporates the map structure.
+ # define GET_LINK_MAP_BY_DLOPEN_HANDLE(handle) \
+ ((link_map*)((handle) == nullptr ? nullptr : ((char*)(handle) + 544)))
+-// Get sys/_types.h, because that tells us whether 64-bit inodes are
+-// used in struct dirent below.
+-#include <sys/_types.h>
++#elif SANITIZER_NETBSD
++#if defined(__x86_64__)
++# define GET_LINK_MAP_BY_DLOPEN_HANDLE(handle) \
++ ((link_map*)((handle) == nullptr ? nullptr : ((char*)(handle) + 608)))
++#elif defined(__i386__)
++# define GET_LINK_MAP_BY_DLOPEN_HANDLE(handle) \
++ ((link_map*)((handle) == nullptr ? nullptr : ((char*)(handle) + 324)))
++#else
++#error Port sanitizer_platform_limits_posix.h.
++#endif
+ #else
+ # define GET_LINK_MAP_BY_DLOPEN_HANDLE(handle) ((link_map*)(handle))
+ #endif // !SANITIZER_FREEBSD
+
++#if SANITIZER_FREEBSD
++// Get sys/_types.h, because that tells us whether 64-bit inodes are
++// used in struct dirent below.
++#include <sys/_types.h>
++#endif
++
+ #ifndef __GLIBC_PREREQ
+ #define __GLIBC_PREREQ(x, y) 0
+ #endif
Home |
Main Index |
Thread Index |
Old Index