pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

compiler-rt-netbsd: Add kludge to disable shm/ipc unsupported code on NetBSD



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Wed Jun 28 03:30:31 2017 +0200
Changeset:	204e9514306d3bcaf7ab5460c506ff70ecc1aeaf

Modified Files:
	compiler-rt-netbsd/distinfo
	compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc

Log Message:
compiler-rt-netbsd: Add kludge to disable shm/ipc unsupported code on NetBSD

These calls in shm/ipc are Linux extensions.

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=204e9514306d3bcaf7ab5460c506ff70ecc1aeaf

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 compiler-rt-netbsd/distinfo                        |  2 +-
 ...r__common_sanitizer__platform__limits__posix.cc | 38 ++++++++++++++++------
 2 files changed, 29 insertions(+), 11 deletions(-)

diffs:
diff --git a/compiler-rt-netbsd/distinfo b/compiler-rt-netbsd/distinfo
index 81388b991c..de6fd4f529 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -33,7 +33,7 @@ SHA1 (patch-lib_sanitizer__common_sanitizer__linux__libcdep.cc) = 3f2be0e646495c
 SHA1 (patch-lib_sanitizer__common_sanitizer__netbsd.h) = c1c19a402137e21ddc5bb48f8825400a34f010cc
 SHA1 (patch-lib_sanitizer__common_sanitizer__platform.h) = 47360a8352cc34fddc71c8f71081d7d589a63dad
 SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = cb3ae73d6ea041180116112c2a6b081a13155e60
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc) = 243ea140b4da05e23e3eaa99c7744bac87fc77e8
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc) = dcc754f1711fe3391b9c59b5cc003f8dfbdf6a93
 SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__posix.h) = 4046349ebafb006b63b7d7a1b84b558a66cf9aa4
 SHA1 (patch-lib_sanitizer__common_sanitizer__procmaps.h) = ec0b5c576463639a3ee66c33ff7e9d94076f40df
 SHA1 (patch-lib_sanitizer__common_sanitizer__procmaps__common.cc) = 0c30494654cfc0294804434d40468f6f722a6786
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc
index 2450382b16..3e51df77dc 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__posix.cc
@@ -107,7 +107,25 @@ $NetBSD$
  
    uptr sig_ign = (uptr)SIG_IGN;
    uptr sig_dfl = (uptr)SIG_DFL;
-@@ -310,7 +320,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
+@@ -274,9 +284,16 @@ namespace __sanitizer {
+ #endif
+ 
+ 
+-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
++#if (SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD) && !SANITIZER_ANDROID
+   unsigned struct_shminfo_sz = sizeof(struct shminfo);
++#if !SANITIZER_NETBSD
+   unsigned struct_shm_info_sz = sizeof(struct shm_info);
++#else
++#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;
+@@ -310,7 +327,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
  unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
  #endif
  
@@ -116,7 +134,7 @@ $NetBSD$
    int glob_nomatch = GLOB_NOMATCH;
    int glob_altdirfunc = GLOB_ALTDIRFUNC;
  #endif
-@@ -452,7 +462,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
+@@ -452,7 +469,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
    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);
@@ -125,7 +143,7 @@ $NetBSD$
  
  #if SANITIZER_LINUX && !SANITIZER_ANDROID
    unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct);
-@@ -479,7 +489,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
+@@ -479,7 +496,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
    unsigned struct_unimapinit_sz = sizeof(struct unimapinit);
  #endif // SANITIZER_LINUX && !SANITIZER_ANDROID
  
@@ -134,7 +152,7 @@ $NetBSD$
    unsigned struct_audio_buf_info_sz = sizeof(struct audio_buf_info);
    unsigned struct_ppp_stats_sz = sizeof(struct ppp_stats);
  #endif // (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
-@@ -535,7 +545,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
+@@ -535,7 +552,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
    unsigned IOCTL_TIOCSPGRP = TIOCSPGRP;
    unsigned IOCTL_TIOCSTI = TIOCSTI;
    unsigned IOCTL_TIOCSWINSZ = TIOCSWINSZ;
@@ -143,7 +161,7 @@ $NetBSD$
    unsigned IOCTL_SIOCGETSGCNT = SIOCGETSGCNT;
    unsigned IOCTL_SIOCGETVIFCNT = SIOCGETVIFCNT;
  #endif
-@@ -975,7 +985,7 @@ COMPILER_CHECK(IOC_NR(0x12345678) == _IO
+@@ -975,7 +992,7 @@ COMPILER_CHECK(IOC_NR(0x12345678) == _IO
  COMPILER_CHECK(IOC_TYPE(0x12345678) == _IOC_TYPE(0x12345678));
  #endif // SANITIZER_LINUX
  
@@ -152,7 +170,7 @@ $NetBSD$
  // There are more undocumented fields in dl_phdr_info that we are not interested
  // in.
  COMPILER_CHECK(sizeof(__sanitizer_dl_phdr_info) <= sizeof(dl_phdr_info));
-@@ -983,9 +993,9 @@ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi
+@@ -983,9 +1000,9 @@ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi
  CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_name);
  CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phdr);
  CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phnum);
@@ -164,7 +182,7 @@ $NetBSD$
  CHECK_TYPE_SIZE(glob_t);
  CHECK_SIZE_AND_OFFSET(glob_t, gl_pathc);
  CHECK_SIZE_AND_OFFSET(glob_t, gl_pathv);
-@@ -1037,7 +1047,7 @@ COMPILER_CHECK(sizeof(__sanitizer_dirent
+@@ -1037,7 +1054,7 @@ COMPILER_CHECK(sizeof(__sanitizer_dirent
  CHECK_SIZE_AND_OFFSET(dirent, d_ino);
  #if SANITIZER_MAC
  CHECK_SIZE_AND_OFFSET(dirent, d_seekoff);
@@ -173,7 +191,7 @@ $NetBSD$
  // There is no 'd_off' field on FreeBSD.
  #else
  CHECK_SIZE_AND_OFFSET(dirent, d_off);
-@@ -1134,11 +1144,14 @@ CHECK_SIZE_AND_OFFSET(mntent, mnt_passno
+@@ -1134,11 +1151,14 @@ CHECK_SIZE_AND_OFFSET(mntent, mnt_passno
  
  CHECK_TYPE_SIZE(ether_addr);
  
@@ -189,7 +207,7 @@ $NetBSD$
  # else
  CHECK_SIZE_AND_OFFSET(ipc_perm, __key);
  CHECK_SIZE_AND_OFFSET(ipc_perm, __seq);
-@@ -1175,20 +1188,20 @@ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_next)
+@@ -1175,20 +1195,20 @@ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_next)
  CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_name);
  CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_addr);
  CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_netmask);
@@ -213,7 +231,7 @@ $NetBSD$
  #else
  CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_dstaddr);
  #endif // SANITIZER_LINUX
-@@ -1289,4 +1302,4 @@ CHECK_TYPE_SIZE(sem_t);
+@@ -1289,4 +1309,4 @@ CHECK_TYPE_SIZE(sem_t);
  COMPILER_CHECK(ARM_VFPREGS_SIZE == ARM_VFPREGS_SIZE_ASAN);
  #endif
  


Home | Main Index | Thread Index | Old Index