pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
compiler-rt-netbsd: Fix build of compiler-rt
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Wed Jun 14 02:29:04 2017 +0200
Changeset: fe9c6fb774cc51045f7272215cf856311ea27a8c
Modified Files:
compiler-rt-netbsd/distinfo
compiler-rt-netbsd/patches/patch-lib_builtins_gcc__personality__v0.c
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h
Added Files:
compiler-rt-netbsd/patches/patch-lib_interception_interception.h
compiler-rt-netbsd/patches/patch-lib_interception_interception__linux.h
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__common__interceptors.inc
compiler-rt-netbsd/patches/patch-lib_ubsan_ubsan__platform.h
Log Message:
compiler-rt-netbsd: Fix build of compiler-rt
This pushes forward porting of sanitizers and this package builds again.
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=fe9c6fb774cc51045f7272215cf856311ea27a8c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
compiler-rt-netbsd/distinfo | 8 ++++--
.../patch-lib_builtins_gcc__personality__v0.c | 2 +-
.../patches/patch-lib_interception_interception.h | 31 ++++++++++++++++++++++
.../patch-lib_interception_interception__linux.h | 19 +++++++++++++
...zer__common_sanitizer__common__interceptors.inc | 18 +++++++++++++
...er__common_sanitizer__platform__limits__posix.h | 4 +--
.../patches/patch-lib_ubsan_ubsan__platform.h | 13 +++++++++
7 files changed, 90 insertions(+), 5 deletions(-)
diffs:
diff --git a/compiler-rt-netbsd/distinfo b/compiler-rt-netbsd/distinfo
index bc57882047..034ee84bce 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -14,12 +14,16 @@ RMD160 (llvm-3.6.2.src.tar.xz) = 521cbc5fe2925ea3c6e90c7a31f752a04045c972
Size (llvm-3.6.2.src.tar.xz) = 12802380 bytes
SHA1 (patch-cmake_config-ix.cmake) = 6b0644c422eaf3e2721398c2575e31e07b535984
SHA1 (patch-lib_asan_scripts_asan__symbolize.py) = d6c079e7092b22b5379293dbb8d1e2445e077932
-SHA1 (patch-lib_builtins_gcc__personality__v0.c) = 0a48656e68614730ea05e8fb2588434e774b3c45
+SHA1 (patch-lib_builtins_gcc__personality__v0.c) = 66c36733afc7043f662328303de2573fd9005bf3
+SHA1 (patch-lib_interception_interception.h) = f18c140feec3c88fec57ac7ba1fbedb03db2bac6
+SHA1 (patch-lib_interception_interception__linux.h) = 2f37344082e935a99fc04203453d387fe78bd6d3
SHA1 (patch-lib_sanitizer__common_CMakeLists.txt) = 45b18179c5d1d9f284ccfe4670a989ac30d05e92
+SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors.inc) = da22dbf5942941b0f8be6e1075ea6d71f14a9069
SHA1 (patch-lib_sanitizer__common_sanitizer__platform.h) = 47360a8352cc34fddc71c8f71081d7d589a63dad
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h) = dbbd4ac2b1356fe37b8b63c88c1dbf7bce403d86
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h) = bd02af170d2ead22c646a0eb18f518895a2e71cf
SHA1 (patch-lib_sanitizer__common_sanitizer__procmaps.h) = ec0b5c576463639a3ee66c33ff7e9d94076f40df
SHA1 (patch-lib_sanitizer__common_sanitizer__procmaps__netbsd.cc) = 965b6d98cd4499649df98d77dbe327c0003c5aab
+SHA1 (patch-lib_ubsan_ubsan__platform.h) = 8b9419ed6d3f40357eb73e71680d070bd64bd5cc
SHA1 (patch-test_asan_lit.cfg) = 259b0e262b5975b862a51f015ec6b646ce2af10a
SHA1 (patch-test_sanitizer__common_CMakeLists.txt) = 6af4c5ca42f17bb09823c36bf32d5576fbc0b4c8
SHA1 (patch-test_ubsan_lit.common.cfg) = d60d738aaf8525cf3f5f028dc2fc2fe54a7d691b
diff --git a/compiler-rt-netbsd/patches/patch-lib_builtins_gcc__personality__v0.c b/compiler-rt-netbsd/patches/patch-lib_builtins_gcc__personality__v0.c
index 2d9021ff16..9e39ff79a1 100644
--- a/compiler-rt-netbsd/patches/patch-lib_builtins_gcc__personality__v0.c
+++ b/compiler-rt-netbsd/patches/patch-lib_builtins_gcc__personality__v0.c
@@ -6,7 +6,7 @@ $NetBSD$
#include "unwind-ehabi-helpers.h"
#endif
-+#if defined(__NetBSD__)
++#if defined(__NetBSD__) && !defined(__clang__)
+#define TYPE_UNWIND_PTR void*
+#else
+#define TYPE_UNWIND_PTR uintptr_t
diff --git a/compiler-rt-netbsd/patches/patch-lib_interception_interception.h b/compiler-rt-netbsd/patches/patch-lib_interception_interception.h
new file mode 100644
index 0000000000..7c2870d790
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-lib_interception_interception.h
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- lib/interception/interception.h.orig 2017-06-03 23:53:56.000000000 +0000
++++ lib/interception/interception.h
+@@ -15,7 +15,7 @@
+ #ifndef INTERCEPTION_H
+ #define INTERCEPTION_H
+
+-#if !defined(__linux__) && !defined(__FreeBSD__) && \
++#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && \
+ !defined(__APPLE__) && !defined(_WIN32)
+ # error "Interception doesn't work on this operating system."
+ #endif
+@@ -129,7 +129,7 @@ const interpose_substitution substitutio
+ extern "C" ret_type func(__VA_ARGS__);
+ # define DECLARE_WRAPPER_WINAPI(ret_type, func, ...) \
+ extern "C" __declspec(dllimport) ret_type __stdcall func(__VA_ARGS__);
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__NetBSD__)
+ # define WRAP(x) __interceptor_ ## x
+ # define WRAPPER_NAME(x) "__interceptor_" #x
+ # define INTERCEPTOR_ATTRIBUTE __attribute__((visibility("default")))
+@@ -241,7 +241,7 @@ typedef unsigned long uptr; // NOLINT
+
+ #define INCLUDED_FROM_INTERCEPTION_LIB
+
+-#if defined(__linux__) || defined(__FreeBSD__)
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
+ # include "interception_linux.h"
+ # define INTERCEPT_FUNCTION(func) INTERCEPT_FUNCTION_LINUX_OR_FREEBSD(func)
+ # define INTERCEPT_FUNCTION_VER(func, symver) \
diff --git a/compiler-rt-netbsd/patches/patch-lib_interception_interception__linux.h b/compiler-rt-netbsd/patches/patch-lib_interception_interception__linux.h
new file mode 100644
index 0000000000..0325239dfc
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-lib_interception_interception__linux.h
@@ -0,0 +1,19 @@
+$NetBSD$
+
+--- lib/interception/interception_linux.h.orig 2017-06-03 23:53:56.000000000 +0000
++++ lib/interception/interception_linux.h
+@@ -12,7 +12,7 @@
+ // Linux-specific interception methods.
+ //===----------------------------------------------------------------------===//
+
+-#if defined(__linux__) || defined(__FreeBSD__)
++#if defined(__linux__) || defined(__FreeBSD__) | defined(__NetBSD__)
+
+ #if !defined(INCLUDED_FROM_INTERCEPTION_LIB)
+ # error "interception_linux.h should be included from interception library only"
+@@ -44,4 +44,4 @@ void *GetFuncAddrVer(const char *func_na
+ #endif // !defined(__ANDROID__)
+
+ #endif // INTERCEPTION_LINUX_H
+-#endif // __linux__ || __FreeBSD__
++#endif // __linux__ || __FreeBSD__ || __NetBSD__
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__common__interceptors.inc b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__common__interceptors.inc
new file mode 100644
index 0000000000..94c9d3cb9a
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__common__interceptors.inc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- lib/sanitizer_common/sanitizer_common_interceptors.inc.orig 2017-06-12 15:01:29.000000000 +0000
++++ lib/sanitizer_common/sanitizer_common_interceptors.inc
+@@ -3799,10 +3799,13 @@ INTERCEPTOR(int, pthread_mutex_lock, voi
+ COMMON_INTERCEPTOR_ENTER(ctx, pthread_mutex_lock, m);
+ COMMON_INTERCEPTOR_MUTEX_PRE_LOCK(ctx, m);
+ int res = REAL(pthread_mutex_lock)(m);
++
++#if !SANITIZER_NETBSD
+ if (res == errno_EOWNERDEAD)
+ COMMON_INTERCEPTOR_MUTEX_REPAIR(ctx, m);
+ if (res == 0 || res == errno_EOWNERDEAD)
+ COMMON_INTERCEPTOR_MUTEX_POST_LOCK(ctx, m);
++#endif
+ if (res == errno_EINVAL)
+ COMMON_INTERCEPTOR_MUTEX_INVALID(ctx, m);
+ return res;
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
index 54c25a7fca..e40d9c1386 100644
--- 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
@@ -436,7 +436,7 @@ $NetBSD$
+ int _blksize;
+ u64 _offset;
+ };
-+# define SANITIZER_HAS_STRUCT_FILE 1
++# define SANITIZER_HAS_STRUCT_FILE 0 // not ported
#else
typedef void __sanitizer_FILE;
# define SANITIZER_HAS_STRUCT_FILE 0
@@ -455,7 +455,7 @@ $NetBSD$
};
#endif
-+#if !SANITIZER_NETBSD
++#if 1 // !SANITIZER_NETBSD
#define IOC_NRBITS 8
#define IOC_TYPEBITS 8
#if defined(__powerpc__) || defined(__powerpc64__) || defined(__mips__) || \
diff --git a/compiler-rt-netbsd/patches/patch-lib_ubsan_ubsan__platform.h b/compiler-rt-netbsd/patches/patch-lib_ubsan_ubsan__platform.h
new file mode 100644
index 0000000000..bc72a8f8de
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-lib_ubsan_ubsan__platform.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- lib/ubsan/ubsan_platform.h.orig 2017-06-03 23:53:57.000000000 +0000
++++ lib/ubsan/ubsan_platform.h
+@@ -14,7 +14,7 @@
+ #define UBSAN_PLATFORM_H
+
+ // Other platforms should be easy to add, and probably work as-is.
+-#if (defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__)) && \
++#if (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)) && \
+ (defined(__x86_64__) || defined(__i386__) || defined(__arm__) || \
+ defined(__aarch64__) || defined(__mips__) || defined(__powerpc64__) || \
+ defined(__s390__))
Home |
Main Index |
Thread Index |
Old Index