pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
compiler-rt-netbsd: Start splitting posix and netbsd code
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Sun Aug 27 08:36:25 2017 +0200
Changeset: 379ccb6363dc8ff902875bb6889cc56eac482cd0
Modified Files:
compiler-rt-netbsd/distinfo
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_CMakeLists.txt
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h
Added Files:
compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__linux.h
Log Message:
compiler-rt-netbsd: Start splitting posix and netbsd code
On demand from upstream split NetBSD from sanitizer_platform_limits_posix.h.
Part 4.
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=379ccb6363dc8ff902875bb6889cc56eac482cd0
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
compiler-rt-netbsd/distinfo | 7 +--
.../patch-lib_sanitizer__common_CMakeLists.txt | 10 +++-
.../patch-lib_sanitizer__common_sanitizer__linux.h | 16 ++++++
...__common_sanitizer__platform__limits__netbsd.cc | 58 ++--------------------
...r__common_sanitizer__platform__limits__netbsd.h | 12 ++---
5 files changed, 37 insertions(+), 66 deletions(-)
diffs:
diff --git a/compiler-rt-netbsd/distinfo b/compiler-rt-netbsd/distinfo
index 77d8b453ba..d7c7e35d8d 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -20,10 +20,11 @@ SHA1 (patch-lib_fuzzer_FuzzerExtraCounters.cpp) = 52fefa927397acd7e83df06df7ec13
SHA1 (patch-lib_fuzzer_FuzzerUtilLinux.cpp) = 30e0ead2deb98ac0a7f67403c47044ef6ec16185
SHA1 (patch-lib_fuzzer_afl_afl__driver.cpp) = a114e28152558b7147d0931eb638109c3d2f32a2
SHA1 (patch-lib_fuzzer_tests_CMakeLists.txt) = eaffd9f8f2621ad465b5c734a764bdff0243af3d
-SHA1 (patch-lib_sanitizer__common_CMakeLists.txt) = 41b67281e9c9498c0be923f8aca05e93ef92db35
+SHA1 (patch-lib_sanitizer__common_CMakeLists.txt) = e031b35f1cbdcc95184f9cae81c548b9b8aa32fd
+SHA1 (patch-lib_sanitizer__common_sanitizer__linux.h) = bcf367307bc52f1185a099fdb488c1e6f485dbde
SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = f179544393a9a884ab669c10f323539f80d8efad
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc) = 9c6d240b07b928e898408312624562fa26a26144
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = a72bc2b9e2ff38091f77a38a2f78d68e1d446900
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc) = 1c87fbccf0f3fe52e822b6437f456ffcf5d05e49
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = 222d699a5af20899d45b54b8746f9a514e0ffe35
SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h) = 86d872c585bfde552276a5f3e3d198338663bafd
SHA1 (patch-lib_sanitizer__common_sanitizer__posix.h) = e3c6e3f438dbc0911ec54f24bb5a325afe07fbe1
SHA1 (patch-lib_sanitizer__common_sanitizer__posix__libcdep.cc) = 24be4a422f108c24fd095ef725a3b3b582553e66
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_CMakeLists.txt b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_CMakeLists.txt
index f5441d119b..574b75da15 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_CMakeLists.txt
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_CMakeLists.txt
@@ -2,7 +2,15 @@ $NetBSD$
--- lib/sanitizer_common/CMakeLists.txt.orig 2017-08-03 21:24:37.000000000 +0000
+++ lib/sanitizer_common/CMakeLists.txt
-@@ -118,6 +118,7 @@ set(SANITIZER_HEADERS
+@@ -18,6 +18,7 @@ set(SANITIZER_SOURCES_NOTERMINATION
+ sanitizer_mac.cc
+ sanitizer_persistent_allocator.cc
+ sanitizer_platform_limits_linux.cc
++ sanitizer_platform_limits_netbsd.cc
+ sanitizer_platform_limits_posix.cc
+ sanitizer_posix.cc
+ sanitizer_printf.cc
+@@ -118,6 +119,7 @@ set(SANITIZER_HEADERS
sanitizer_placement_new.h
sanitizer_platform.h
sanitizer_platform_interceptors.h
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__linux.h b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__linux.h
new file mode 100644
index 0000000000..fd506cda51
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__linux.h
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- lib/sanitizer_common/sanitizer_linux.h.orig 2017-08-08 20:43:41.000000000 +0000
++++ lib/sanitizer_common/sanitizer_linux.h
+@@ -18,7 +18,11 @@
+ #include "sanitizer_common.h"
+ #include "sanitizer_internal_defs.h"
+ #include "sanitizer_posix.h"
++#if SANITIZER_NETBSD
++#include "sanitizer_platform_limits_netbsd.h"
++#else
+ #include "sanitizer_platform_limits_posix.h"
++#endif
+
+ struct link_map; // Opaque type returned by dlopen().
+
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc
index 7d7939de06..bd74ebe71f 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc
@@ -1,8 +1,8 @@
$NetBSD$
---- lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc.orig 2017-08-27 06:19:05.500119741 +0000
+--- lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc.orig 2017-08-27 06:20:41.501062305 +0000
+++ lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc
-@@ -0,0 +1,422 @@
+@@ -0,0 +1,372 @@
+//===-- sanitizer_platform_limits_posix.cc --------------------------------===//
+//
+// The LLVM Compiler Infrastructure
@@ -68,11 +68,6 @@ $NetBSD$
+#include <utmp.h>
+#include <utmpx.h>
+#include <wchar.h>
-+#define statfs statvfs
-+#define d_ino d_fileno
-+
-+#undef IOC_DIRMASK
-+
+#include <ifaddrs.h>
+#include <semaphore.h>
+#include <sys/ptrace.h>
@@ -82,7 +77,7 @@ $NetBSD$
+
+// Include these after system headers to avoid name clashes and ambiguities.
+#include "sanitizer_internal_defs.h"
-+#include "sanitizer_platform_limits_posix.h"
++#include "sanitizer_platform_limits_netbsd.h"
+
+namespace __sanitizer {
+unsigned struct_utsname_sz = sizeof(struct utsname);
@@ -106,7 +101,6 @@ $NetBSD$
+unsigned struct_tms_sz = sizeof(struct tms);
+unsigned struct_sigevent_sz = sizeof(struct sigevent);
+unsigned struct_sched_param_sz = sizeof(struct sched_param);
-+unsigned struct_statfs_sz = sizeof(struct statfs);
+unsigned struct_sockaddr_sz = sizeof(struct sockaddr);
+unsigned ucontext_t_sz = sizeof(ucontext_t);
+unsigned struct_rlimit_sz = sizeof(struct rlimit);
@@ -123,16 +117,6 @@ $NetBSD$
+uptr sa_siginfo = (uptr)SA_SIGINFO;
+
+unsigned struct_shminfo_sz = sizeof(struct shminfo);
-+#define IPC_INFO -1
-+#define SHM_INFO -1
-+#define SHM_STAT -1
-+unsigned struct_shm_info_sz = -1;
-+#endif
-+int shmctl_ipc_stat = (int)IPC_STAT;
-+int shmctl_ipc_info = (int)IPC_INFO;
-+int shmctl_shm_info = (int)SHM_INFO;
-+
-+#endif
+
+unsigned struct_utmp_sz = sizeof(struct utmp);
+unsigned struct_utmpx_sz = sizeof(struct utmpx);
@@ -160,13 +144,8 @@ $NetBSD$
+unsigned struct_ifreq_sz = sizeof(struct ifreq);
+unsigned struct_termios_sz = sizeof(struct termios);
+unsigned struct_winsize_sz = sizeof(struct winsize);
-+unsigned struct_midi_info_sz = sizeof(struct midi_info);
+unsigned struct_mtget_sz = sizeof(struct mtget);
+unsigned struct_mtop_sz = sizeof(struct mtop);
-+unsigned struct_sbi_instrument_sz = sizeof(struct sbi_instrument);
-+unsigned struct_seq_event_rec_sz = sizeof(struct seq_event_rec);
-+unsigned struct_synth_info_sz = sizeof(struct synth_info);
-+unsigned struct_vt_mode_sz = sizeof(struct vt_mode);
+unsigned struct_audio_buf_info_sz = sizeof(struct audio_buf_info);
+unsigned struct_ppp_stats_sz = sizeof(struct ppp_stats);
+unsigned struct_sioc_sg_req_sz = sizeof(struct sioc_sg_req);
@@ -220,34 +199,6 @@ $NetBSD$
+unsigned IOCTL_TIOCSWINSZ = TIOCSWINSZ;
+unsigned IOCTL_SIOCGETSGCNT = SIOCGETSGCNT;
+unsigned IOCTL_SIOCGETVIFCNT = SIOCGETVIFCNT;
-+unsigned IOCTL_TCFLSH = TCFLSH;
-+unsigned IOCTL_TCGETA = TCGETA;
-+unsigned IOCTL_TCGETS = TCGETS;
-+unsigned IOCTL_TCSBRK = TCSBRK;
-+unsigned IOCTL_TCSBRKP = TCSBRKP;
-+unsigned IOCTL_TCSETA = TCSETA;
-+unsigned IOCTL_TCSETAF = TCSETAF;
-+unsigned IOCTL_TCSETAW = TCSETAW;
-+unsigned IOCTL_TCSETS = TCSETS;
-+unsigned IOCTL_TCSETSF = TCSETSF;
-+unsigned IOCTL_TCSETSW = TCSETSW;
-+unsigned IOCTL_TCXONC = TCXONC;
-+unsigned IOCTL_TIOCGLCKTRMIOS = TIOCGLCKTRMIOS;
-+unsigned IOCTL_TIOCGSOFTCAR = TIOCGSOFTCAR;
-+unsigned IOCTL_TIOCINQ = TIOCINQ;
-+unsigned IOCTL_TIOCLINUX = TIOCLINUX;
-+unsigned IOCTL_TIOCSERCONFIG = TIOCSERCONFIG;
-+unsigned IOCTL_TIOCSERGETLSR = TIOCSERGETLSR;
-+unsigned IOCTL_TIOCSERGWILD = TIOCSERGWILD;
-+unsigned IOCTL_TIOCSERSWILD = TIOCSERSWILD;
-+unsigned IOCTL_TIOCSLCKTRMIOS = TIOCSLCKTRMIOS;
-+unsigned IOCTL_TIOCSSOFTCAR = TIOCSSOFTCAR;
-+unsigned IOCTL_VT_DISALLOCATE = VT_DISALLOCATE;
-+unsigned IOCTL_VT_GETSTATE = VT_GETSTATE;
-+unsigned IOCTL_VT_RESIZE = VT_RESIZE;
-+unsigned IOCTL_VT_RESIZEX = VT_RESIZEX;
-+unsigned IOCTL_VT_SENDSIG = VT_SENDSIG;
-+#endif // SANITIZER_LINUX
+
+const int si_SEGV_MAPERR = SEGV_MAPERR;
+const int si_SEGV_ACCERR = SEGV_ACCERR;
@@ -315,8 +266,7 @@ $NetBSD$
+CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_type);
+
+COMPILER_CHECK(sizeof(__sanitizer_dirent) <= sizeof(dirent));
-+CHECK_SIZE_AND_OFFSET(dirent, d_ino);
-+// There is no 'd_off' field on FreeBSD.
++CHECK_SIZE_AND_OFFSET(dirent, d_fileno);
+CHECK_SIZE_AND_OFFSET(dirent, d_reclen);
+
+CHECK_TYPE_SIZE(ifconf);
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h
index 7c06e9709c..c1b20c55b0 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h
@@ -1,8 +1,8 @@
$NetBSD$
---- lib/sanitizer_common/sanitizer_platform_limits_netbsd.h.orig 2017-08-27 06:19:05.500321760 +0000
+--- lib/sanitizer_common/sanitizer_platform_limits_netbsd.h.orig 2017-08-27 06:20:41.507773424 +0000
+++ lib/sanitizer_common/sanitizer_platform_limits_netbsd.h
-@@ -0,0 +1,566 @@
+@@ -0,0 +1,562 @@
+//===-- sanitizer_platform_limits_posix.h ---------------------------------===//
+//
+// The LLVM Compiler Infrastructure
@@ -17,8 +17,8 @@ $NetBSD$
+// Sizes and layouts of platform-specific NetBSD data structures.
+//===----------------------------------------------------------------------===//
+
-+#ifndef SANITIZER_PLATFORM_LIMITS_POSIX_H
-+#define SANITIZER_PLATFORM_LIMITS_POSIX_H
++#ifndef SANITIZER_PLATFORM_LIMITS_NETBSD_H
++#define SANITIZER_PLATFORM_LIMITS_NETBSD_H
+
+#include "sanitizer_internal_defs.h"
+#include "sanitizer_platform.h"
@@ -349,9 +349,7 @@ $NetBSD$
+#define IOC_NRMASK ((1 << IOC_NRBITS) - 1)
+#define IOC_TYPEMASK ((1 << IOC_TYPEBITS) - 1)
+#define IOC_SIZEMASK ((1 << IOC_SIZEBITS) - 1)
-+#if defined(IOC_DIRMASK)
+#undef IOC_DIRMASK
-+#endif
+#define IOC_DIRMASK ((1 << IOC_DIRBITS) - 1)
+#define IOC_NRSHIFT 0
+#define IOC_TYPESHIFT (IOC_NRSHIFT + IOC_NRBITS)
@@ -435,7 +433,6 @@ $NetBSD$
+extern unsigned IOCTL_TIOCSWINSZ;
+extern unsigned IOCTL_SIOCGETSGCNT;
+extern unsigned IOCTL_SIOCGETVIFCNT;
-+
+extern unsigned IOCTL_MTIOCGET;
+extern unsigned IOCTL_MTIOCTOP;
+extern unsigned IOCTL_SIOCADDRT;
@@ -536,7 +533,6 @@ $NetBSD$
+extern unsigned IOCTL_VT_RELDISP;
+extern unsigned IOCTL_VT_SETMODE;
+extern unsigned IOCTL_VT_WAITACTIVE;
-+
+extern unsigned IOCTL_KDDISABIO;
+extern unsigned IOCTL_KDENABIO;
+extern unsigned IOCTL_KDGETLED;
Home |
Main Index |
Thread Index |
Old Index